Elron/bleurt-tiny-512
4112k
1---2tags:3- text-classification4- bert5---6 7# Model Card for bleurt-tiny-512 8 9# Model Details10 11## Model Description12 13Pytorch version of the original BLEURT models from ACL paper14 15- **Developed by:** Elron Bandel, Thibault Sellam, Dipanjan Das and Ankur P. Parikh of Google Research16- **Shared by [Optional]:** Elron Bandel17- **Model type:** Text Classification 18- **Language(s) (NLP):** More information needed19- **License:** More information needed 20- **Parent Model:** BERT21- **Resources for more information:**22 - [GitHub Repo](https://github.com/google-research/bleurt/tree/master)23 - [Associated Paper](https://aclanthology.org/2020.acl-main.704/)24 - [Blog Post](https://ai.googleblog.com/2020/05/evaluating-natural-language-generation.html)25 26 27 28# Uses29 30 31## Direct Use32This model can be used for the task of Text Classification 33 34## Downstream Use [Optional]35 36More information needed.37 38## Out-of-Scope Use39 40The model should not be used to intentionally create hostile or alienating environments for people. 41 42# Bias, Risks, and Limitations43 44 45Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.46 47 48 49## Recommendations50 51 52Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.53 54# Training Details55 56## Training Data57The model authors note in the [associated paper](https://aclanthology.org/2020.acl-main.704.pdf): 58> We use years 2017 to 2019 of the WMT Metrics Shared Task, to-English language pairs. For each year, we used the of- ficial WMT test set, which include several thou- sand pairs of sentences with human ratings from the news domain. The training sets contain 5,360, 9,492, and 147,691 records for each year. 59 60 61## Training Procedure62 63 64### Preprocessing65 66More information needed 67 68### Speeds, Sizes, Times69More information needed 70 71 72# Evaluation73 74 75## Testing Data, Factors & Metrics76 77### Testing Data78 79The test sets for years 2018 and 2019 [of the WMT Metrics Shared Task, to-English language pairs.] are noisier,80 81 82 83### Factors84More information needed85 86### Metrics87 88More information needed89 90 91## Results 92 93More information needed94 95 96# Model Examination97 98More information needed99 100# Environmental Impact101 102Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).103 104- **Hardware Type:** More information needed105- **Hours used:** More information needed106- **Cloud Provider:** More information needed107- **Compute Region:** More information needed108- **Carbon Emitted:** More information needed109 110# Technical Specifications [optional]111 112## Model Architecture and Objective113 114More information needed 115 116## Compute Infrastructure117 118More information needed 119 120### Hardware121 122 123More information needed124 125### Software126 127More information needed.128 129# Citation130 131 132**BibTeX:**133 134 135```bibtex136@inproceedings{sellam2020bleurt,137 title = {BLEURT: Learning Robust Metrics for Text Generation},138 author = {Thibault Sellam and Dipanjan Das and Ankur P Parikh},139 year = {2020},140 booktitle = {Proceedings of ACL}141}142```143 144 145 146 147# Glossary [optional]148More information needed 149 150# More Information [optional]151More information needed 152 153 154# Model Card Authors [optional]155 156 Elron Bandel in collaboration with Ezi Ozoani and the Hugging Face team157 158 159# Model Card Contact160 161More information needed162 163# How to Get Started with the Model164 165Use the code below to get started with the model.166 167<details>168<summary> Click to expand </summary>169 170```python171from transformers import AutoModelForSequenceClassification, AutoTokenizer172import torch173 174tokenizer = AutoTokenizer.from_pretrained("Elron/bleurt-tiny-512")175model = AutoModelForSequenceClassification.from_pretrained("Elron/bleurt-tiny-512")176model.eval()177 178references = ["hello world", "hello world"]179candidates = ["hi universe", "bye world"]180 181with torch.no_grad():182 scores = model(**tokenizer(references, candidates, return_tensors='pt'))[0].squeeze()183 184print(scores) # tensor([-0.9414, -0.5678])185 ```186 187See [this notebook](https://colab.research.google.com/drive/1KsCUkFW45d5_ROSv2aHtXgeBa2Z98r03?usp=sharing) for model conversion code. 188</details>189 