Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
This is the
DeepPavlov/rubert-base-cased
fine-tuned to predict the logical relationship between two short texts: entailment, contradiction, or neutral.
Usage
How to run the model for NLI:
# !pip install transformers sentencepiece --quietimport torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_checkpoint = 'cointegrated/rubert-base-cased-nli-threeway'
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)
if torch.cuda.is_available():
model.cuda()
text1 = 'Сократ - человек, а все люди смертны.'
text2 = 'Сократ никогда не умрёт.'with torch.inference_mode():
out = model(**tokenizer(text1, text2, return_tensors='pt').to(model.device))
proba = torch.softmax(out.logits, -1).cpu().numpy()[0]
print({v: proba[k] for k, v in model.config.id2label.items()})
# {'entailment': 0.009525929, 'contradiction': 0.9332064, 'neutral': 0.05726764}
You can also use this model for zero-shot short text classification (by labels only), e.g. for sentiment analysis:
Runs of cointegrated rubert-base-cased-nli-threeway on huggingface.co
9.0K
Total runs
199
24-hour runs
1.2K
3-day runs
-6.1K
7-day runs
-8.7K
30-day runs
More Information About rubert-base-cased-nli-threeway huggingface.co Model
rubert-base-cased-nli-threeway huggingface.co
rubert-base-cased-nli-threeway huggingface.co is an AI model on huggingface.co that provides rubert-base-cased-nli-threeway's model effect (), which can be used instantly with this cointegrated rubert-base-cased-nli-threeway model. huggingface.co supports a free trial of the rubert-base-cased-nli-threeway model, and also provides paid use of the rubert-base-cased-nli-threeway. Support call rubert-base-cased-nli-threeway model through api, including Node.js, Python, http.
rubert-base-cased-nli-threeway huggingface.co is an online trial and call api platform, which integrates rubert-base-cased-nli-threeway's modeling effects, including api services, and provides a free online trial of rubert-base-cased-nli-threeway, you can try rubert-base-cased-nli-threeway online for free by clicking the link below.
cointegrated rubert-base-cased-nli-threeway online free url in huggingface.co:
rubert-base-cased-nli-threeway is an open source model from GitHub that offers a free installation service, and any user can find rubert-base-cased-nli-threeway on GitHub to install. At the same time, huggingface.co provides the effect of rubert-base-cased-nli-threeway install, users can directly use rubert-base-cased-nli-threeway installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
rubert-base-cased-nli-threeway install url in huggingface.co: