Downloads · 30 days
136
7% of all-time downloads
rmihaylov/bert-base-nli-theseus-bg
bert-base-nli-theseus-bg is a text classification model from rmihaylov. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Pretrained model on Bulgarian language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is cased: it does make a difference between bu…
Downloads · 30 days
136
7% of all-time downloads
All-time downloads
2K
Public
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.bin541 MB · 98%
From the Hugging Face model README
Pretrained model on Bulgarian language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is cased: it does make a difference between bulgarian and Bulgarian. The training data is Bulgarian text from OSCAR, Chitanka and Wikipedia.
It was finetuned on private NLI Bulgarian data.
Then, it was compressed via progressive module replacing.
Here is how to use this model in PyTorch:
>>> import torch
>>> from transformers import AutoModelForSequenceClassification, AutoTokenizer
>>>
>>> model_id = 'rmihaylov/bert-base-nli-theseus-bg'
>>> model = AutoModelForSequenceClassification.from_pretrained(model_id)
>>> tokenizer = AutoTokenizer.from_pretrained(model_id)
>>>
>>> inputs = tokenizer.encode_plus(
>>> 'Няколко момчета играят футбол.',
>>> 'Няколко момичета играят футбол.',
>>> return_tensors='pt')
>>>
>>> outputs = model(**inputs)
>>> contradiction, entailment, neutral = torch.softmax(outputs[0][0], dim=0).detach()
>>> contradiction, neutral, entailment
(tensor(0.9998), tensor(0.0001), tensor(5.9929e-05))