File size: 1,141 Bytes
2f83883 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
---
datasets:
- cjvt/si_nli
language:
- sl
---
# CrossEncoder for Slovene NLI
The model was trained using [SentenceTransformers](https://sbert.net/) [CrossEncoder](https://www.sbert.net/examples/applications/cross-encoder/README.html) class.
It is based on [SloBerta](https://huggingface.co/EMBEDDIA/sloberta), a monolingual Slovene model.
## Training
This model was trained on the [SI-NLI](https://huggingface.co/datasets/cjvt/si_nli) and the [slovene_mnli_snli](https://huggingface.co/datasets/jacinthes/slovene_mnli_snli) datasets.
More details and the training script are available here: [repo](https://github.com/jacinthes/slovene-nli-benchmark)
## Performance
-Accuracy on the SI-NLI validation set: 77.51
## Usage
The model can be used for inference using the below code:
```python
from sentence_transformers import CrossEncoder
model = CrossEncoder('jacinthes/cross-encoder-sloberta-si-nli-snli-mnli')
premise = 'Pojdi z menoj v toplice.'
hypothesis = 'Bova lepa bova fit.'
prediction = model.predict([premise, hypothesis])
int2label = {0: 'entailment', 1: 'neutral', 2:'contradiction'}
print(int2label[prediction.argmax()])
``` |