Update README.md
Browse files
README.md
CHANGED
@@ -24,55 +24,15 @@ widget:
|
|
24 |
- **Task:** Fill-Mask
|
25 |
- **Data:** Crawling
|
26 |
|
27 |
-
|
28 |
## Model description
|
29 |
|
30 |
-
This model is a distilled version of [projecte-aina/roberta-base-ca-v2](https://huggingface.co/projecte-aina/roberta-base-ca-v2).
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
This model is ready-to-use only for masked language modeling (MLM) to perform the Fill-Mask task. However, it is intended to be fine-tuned on non-generative downstream tasks such as Question Answering, Text Classification or Named Entity Recognition.
|
39 |
-
|
40 |
-
## How to use
|
41 |
-
|
42 |
-
Usage example where the model is passed to a fill-mask pipeline to predict the masked word (`<mask>`) from a given text.
|
43 |
-
```python
|
44 |
-
from pprint import pprint
|
45 |
-
from transformers import pipeline
|
46 |
-
pipe = pipeline("fill-mask", model="projecte-aina/distilroberta-base-ca")
|
47 |
-
text = "El <mask> és el meu dia preferit de la setmana."
|
48 |
-
pprint(pipe(text))
|
49 |
-
```
|
50 |
-
```
|
51 |
-
[{'score': 0.2531125545501709,
|
52 |
-
'sequence': ' El dilluns és el meu dia preferit de la setmana.',
|
53 |
-
'token': 2885,
|
54 |
-
'token_str': ' dilluns'},
|
55 |
-
{'score': 0.13626143336296082,
|
56 |
-
'sequence': ' El divendres és el meu dia preferit de la setmana.',
|
57 |
-
'token': 2539,
|
58 |
-
'token_str': ' divendres'},
|
59 |
-
{'score': 0.11026635020971298,
|
60 |
-
'sequence': ' El dijous és el meu dia preferit de la setmana.',
|
61 |
-
'token': 2868,
|
62 |
-
'token_str': ' dijous'},
|
63 |
-
{'score': 0.10040736198425293,
|
64 |
-
'sequence': ' El dissabte és el meu dia preferit de la setmana.',
|
65 |
-
'token': 2480,
|
66 |
-
'token_str': ' dissabte'},
|
67 |
-
{'score': 0.09762872755527496,
|
68 |
-
'sequence': ' El diumenge és el meu dia preferit de la setmana.',
|
69 |
-
'token': 2587,
|
70 |
-
'token_str': ' diumenge'}]
|
71 |
-
```
|
72 |
-
|
73 |
-
## Limitations and bias
|
74 |
-
|
75 |
-
At the time of submission, no measures have been taken to estimate the bias embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
|
76 |
|
77 |
## Training
|
78 |
|
@@ -130,63 +90,4 @@ This is how it compares to its teacher when fine-tuned on the aforementioned dow
|
|
130 |
| RoBERTa-base-ca-v2 | 89.29 | 98.96 | 79.07 | 74.26 | 83.14 | 89.50/76.63 | 73.64/55.42 |
|
131 |
| DistilRoBERTa-base-ca | 87.88 | 98.83 | 77.26 | 73.20 | 76.00 | 84.07/70.77 | 62.93/45.08 |
|
132 |
|
133 |
-
<sup>1</sup> : Trained on CatalanQA, tested on XQuAD-ca.
|
134 |
-
|
135 |
-
## Additional information
|
136 |
-
|
137 |
-
### Authors
|
138 |
-
|
139 |
-
The Text Mining Unit (TeMU) from Barcelona Supercomputing Center ([bsc-temu@bsc.es](bsc-temu@bsc.es)).
|
140 |
-
|
141 |
-
### Contact information
|
142 |
-
|
143 |
-
For further information, send an email to [aina@bsc.es](aina@bsc.es).
|
144 |
-
|
145 |
-
### Copyright
|
146 |
-
|
147 |
-
Copyright by the Text Mining Unit at Barcelona Supercomputing Center.
|
148 |
-
|
149 |
-
### Licensing information
|
150 |
-
|
151 |
-
This work is licensed under a [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
152 |
-
|
153 |
-
### Funding
|
154 |
-
|
155 |
-
This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
|
156 |
-
|
157 |
-
### Citation information
|
158 |
-
|
159 |
-
There is no publication for this specific model, but you can cite the paper where the teacher model was presented:
|
160 |
-
```bibtex
|
161 |
-
@inproceedings{armengol-estape-etal-2021-multilingual,
|
162 |
-
title = "Are Multilingual Models the Best Choice for Moderately Under-resourced Languages? {A} Comprehensive Assessment for {C}atalan",
|
163 |
-
author = "Armengol-Estap{\'e}, Jordi and
|
164 |
-
Carrino, Casimiro Pio and
|
165 |
-
Rodriguez-Penagos, Carlos and
|
166 |
-
de Gibert Bonet, Ona and
|
167 |
-
Armentano-Oller, Carme and
|
168 |
-
Gonzalez-Agirre, Aitor and
|
169 |
-
Melero, Maite and
|
170 |
-
Villegas, Marta",
|
171 |
-
booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
|
172 |
-
month = aug,
|
173 |
-
year = "2021",
|
174 |
-
address = "Online",
|
175 |
-
publisher = "Association for Computational Linguistics",
|
176 |
-
url = "https://aclanthology.org/2021.findings-acl.437",
|
177 |
-
doi = "10.18653/v1/2021.findings-acl.437",
|
178 |
-
pages = "4933--4946",
|
179 |
-
}]
|
180 |
-
```
|
181 |
-
|
182 |
-
### Disclaimer
|
183 |
-
|
184 |
-
<details>
|
185 |
-
<summary>Click to expand</summary>
|
186 |
-
|
187 |
-
The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.
|
188 |
-
|
189 |
-
When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.
|
190 |
-
|
191 |
-
In no event shall the owner and creator of the models (BSC) be liable for any results arising from the use made by third parties of these models.
|
192 |
-
</details>
|
|
|
24 |
- **Task:** Fill-Mask
|
25 |
- **Data:** Crawling
|
26 |
|
|
|
27 |
## Model description
|
28 |
|
29 |
+
This model is a distilled version of [projecte-aina/roberta-base-ca-v2](https://huggingface.co/projecte-aina/roberta-base-ca-v2).
|
30 |
+
It follows the same training procedure as [DistilBERT](https://arxiv.org/abs/1910.01108), using the implementation of Knowledge Distillation
|
31 |
+
from the paper's [official repository](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation).
|
32 |
+
|
33 |
+
The resulting architecture consists of 6 layers, 768 dimensional embeddings and 12 attention heads.
|
34 |
+
This adds up to a total of 82M parameters, which is considerably less than the 125M of standard RoBERTa-base models.
|
35 |
+
This makes the model lighter and faster than the original, at the cost of a slightly lower performance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
## Training
|
38 |
|
|
|
90 |
| RoBERTa-base-ca-v2 | 89.29 | 98.96 | 79.07 | 74.26 | 83.14 | 89.50/76.63 | 73.64/55.42 |
|
91 |
| DistilRoBERTa-base-ca | 87.88 | 98.83 | 77.26 | 73.20 | 76.00 | 84.07/70.77 | 62.93/45.08 |
|
92 |
|
93 |
+
<sup>1</sup> : Trained on CatalanQA, tested on XQuAD-ca.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|