Downloads · 30 days
99
1% of all-time downloads
Recognai/zeroshot_selectra_small
zeroshot_selectra_small is a zero-shot classification model from Recognai. Use it when you need labels you did not train the model on. It is set up for transformers. The card lists the license as apache-2.0.
Zero-shot SELECTRA is a SELECTRA model fine-tuned on the Spanish portion of the XNLI dataset. You can use it with Hugging Face's Zero-shot pipeline to make zero-shot classifications.
Downloads · 30 days
99
1% of all-time downloads
All-time downloads
17.4K
Public
Parameters
22.5M
180 MB on disk
Likes
9
Trending 1
Click a slice to open those files.
.bin90 MB · 50%
How the weights are stored.
F3222.5M · 100%
From the Hugging Face model README
Zero-shot SELECTRA is a SELECTRA model fine-tuned on the Spanish portion of the XNLI dataset. You can use it with Hugging Face's Zero-shot pipeline to make zero-shot classifications.
In comparison to our previous zero-shot classifier based on BETO, zero-shot SELECTRA is much more lightweight. As shown in the Metrics section, the small version (5 times fewer parameters) performs slightly worse, while the medium version (3 times fewer parameters) outperforms the BETO based zero-shot classifier.
from transformers import pipeline
classifier = pipeline("zero-shot-classification",
model="Recognai/zeroshot_selectra_medium")
classifier(
"El autor se perfila, a los 50 años de su muerte, como uno de los grandes de su siglo",
candidate_labels=["cultura", "sociedad", "economia", "salud", "deportes"],
hypothesis_template="Este ejemplo es {}."
)
"""Output
{'sequence': 'El autor se perfila, a los 50 años de su muerte, como uno de los grandes de su siglo',
'labels': ['sociedad', 'cultura', 'salud', 'economia', 'deportes'],
'scores': [0.3711881935596466,
0.25650349259376526,
0.17355826497077942,
0.1641489565372467,
0.03460107371211052]}
"""
The hypothesis_template parameter is important and should be in Spanish. In the widget on the right, this parameter is set to its default value: "This example is {}.", so different results are expected.
| Model | Params | XNLI (acc) | *MLSUM (acc) |
|---|---|---|---|
| zs BETO | 110M | 0.799 | 0.530 |
| zs SELECTRA medium | 41M | 0.807 | 0.589 |
| zs SELECTRA small | 22M | 0.795 | 0.446 |
*evaluated with zero-shot learning (ZSL)
Check out our training notebook for all the details.