model documentation
#1
by
nazneen
- opened
README.md
CHANGED
|
@@ -1,11 +1,171 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
The code for model conversion was originated from [this notebook](https://colab.research.google.com/drive/1KsCUkFW45d5_ROSv2aHtXgeBa2Z98r03?usp=sharing) mentioned [here](https://github.com/huggingface/datasets/issues/224).
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
```python
|
| 11 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
@@ -22,4 +182,7 @@ with torch.no_grad():
|
|
| 22 |
scores = model(**tokenizer(references, candidates, return_tensors='pt'))[0].squeeze()
|
| 23 |
|
| 24 |
print(scores) # tensor([-0.9414, -0.5678])
|
| 25 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- text-classification
|
| 4 |
+
- bert
|
| 5 |
+
---
|
| 6 |
|
| 7 |
+
# Model Card for bleurt-tiny-512
|
| 8 |
+
|
| 9 |
+
# Model Details
|
| 10 |
+
|
| 11 |
+
## Model Description
|
| 12 |
+
|
| 13 |
+
Pytorch version of the original BLEURT models from ACL paper
|
| 14 |
+
|
| 15 |
+
- **Developed by:** Elron Bandel, Thibault Sellam, Dipanjan Das and Ankur P. Parikh of Google Research
|
| 16 |
+
- **Shared by [Optional]:** Elron Bandel
|
| 17 |
+
- **Model type:** Text Classification
|
| 18 |
+
- **Language(s) (NLP):** More information needed
|
| 19 |
+
- **License:** More information needed
|
| 20 |
+
- **Parent Model:** BERT
|
| 21 |
+
- **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 |
+
# Uses
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Direct Use
|
| 32 |
+
This model can be used for the task of Text Classification
|
| 33 |
+
|
| 34 |
+
## Downstream Use [Optional]
|
| 35 |
+
|
| 36 |
+
More information needed.
|
| 37 |
+
|
| 38 |
+
## Out-of-Scope Use
|
| 39 |
+
|
| 40 |
+
The model should not be used to intentionally create hostile or alienating environments for people.
|
| 41 |
+
|
| 42 |
+
# Bias, Risks, and Limitations
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
Significant 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 |
+
## Recommendations
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
Users (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 Details
|
| 55 |
+
|
| 56 |
+
## Training Data
|
| 57 |
+
The 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 Procedure
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
### Preprocessing
|
| 65 |
+
|
| 66 |
+
More information needed
|
| 67 |
+
|
| 68 |
+
### Speeds, Sizes, Times
|
| 69 |
+
More information needed
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# Evaluation
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
## Testing Data, Factors & Metrics
|
| 76 |
+
|
| 77 |
+
### Testing Data
|
| 78 |
+
|
| 79 |
+
The test sets for years 2018 and 2019 [of the WMT Metrics Shared Task, to-English language pairs.] are noisier,
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
### Factors
|
| 84 |
+
More information needed
|
| 85 |
+
|
| 86 |
+
### Metrics
|
| 87 |
+
|
| 88 |
+
More information needed
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
## Results
|
| 92 |
+
|
| 93 |
+
More information needed
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
# Model Examination
|
| 97 |
+
|
| 98 |
+
More information needed
|
| 99 |
+
|
| 100 |
+
# Environmental Impact
|
| 101 |
+
|
| 102 |
+
Carbon 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 needed
|
| 105 |
+
- **Hours used:** More information needed
|
| 106 |
+
- **Cloud Provider:** More information needed
|
| 107 |
+
- **Compute Region:** More information needed
|
| 108 |
+
- **Carbon Emitted:** More information needed
|
| 109 |
+
|
| 110 |
+
# Technical Specifications [optional]
|
| 111 |
+
|
| 112 |
+
## Model Architecture and Objective
|
| 113 |
+
|
| 114 |
+
More information needed
|
| 115 |
+
|
| 116 |
+
## Compute Infrastructure
|
| 117 |
+
|
| 118 |
+
More information needed
|
| 119 |
+
|
| 120 |
+
### Hardware
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
More information needed
|
| 124 |
+
|
| 125 |
+
### Software
|
| 126 |
+
|
| 127 |
+
More information needed.
|
| 128 |
+
|
| 129 |
+
# Citation
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
**BibTeX:**
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
```bibtex
|
| 136 |
+
@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]
|
| 148 |
+
More information needed
|
| 149 |
+
|
| 150 |
+
# More Information [optional]
|
| 151 |
+
More information needed
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
# Model Card Authors [optional]
|
| 155 |
+
|
| 156 |
+
Elron Bandel in collaboration with Ezi Ozoani and the Hugging Face team
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
# Model Card Contact
|
| 160 |
+
|
| 161 |
+
More information needed
|
| 162 |
+
|
| 163 |
+
# How to Get Started with the Model
|
| 164 |
+
|
| 165 |
+
Use the code below to get started with the model.
|
| 166 |
+
|
| 167 |
+
<details>
|
| 168 |
+
<summary> Click to expand </summary>
|
| 169 |
|
| 170 |
```python
|
| 171 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
|
|
| 182 |
scores = model(**tokenizer(references, candidates, return_tensors='pt'))[0].squeeze()
|
| 183 |
|
| 184 |
print(scores) # tensor([-0.9414, -0.5678])
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
See [this notebook](https://colab.research.google.com/drive/1KsCUkFW45d5_ROSv2aHtXgeBa2Z98r03?usp=sharing) for model conversion code.
|
| 188 |
+
</details>
|