# Dataset: https://huggingface.co/datasets/xnli/viewer/vi/train

# Github: https://github.com/namlv97/vi-nli-xlm-roberta-base

```python
>>> import torch
>>> from transformers import AutoTokenizer,AutoModelForSequenceClassification
>>> tokenizer = AutoTokenizer.from_pretrained('xlm-roberta-base')
>>> model=AutoModelForSequenceClassification.from_pretrained('nam7197/vi-nli-xml-roberta-base')
>>> premise="Vâng, tôi thậm chí không nghĩ về điều đó, nhưng tôi đã rất thất vọng, và, tôi lại nói chuyện với anh ta lần nữa."
>>> hypothesis="Tôi đã không nói chuyện với anh ta nữa."
>>> label=2 #contradiction
>>> inputs=tokenizer(premise,hypothesis,return_tensors='pt')
>>> model.eval()
>>> with torch.no_grad():
>>>   outputs=model(**inputs)
>>>   probs= torch.nn.functional.softmax(outputs.logits,dim=-1)
>>>   pred_label=torch.argmax(probs,dim=-1)
```

# Performance

|              | precision | recall   | f1-score | support |
|--------------|-----------|----------|----------|---------|
| entailment   | 0.79256   | 0.77784  | 0.78513  | 1670    |
| neutral      | 0.77192   | 0.70120  | 0.73486  | 1670    |
| contradiction| 0.76429   | 0.84850  | 0.80420  | 1670    |
| accuracy     |           |          | 0.77585  | 5010    |
| macro avg    | 0.77626   | 0.77585  | 0.77473  | 5010    |
| weighted avg | 0.77626   | 0.77585  | 0.77473  | 5010    |
{}
transformers pytorch xlm-roberta text-classification autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #xlm-roberta #text-classification #autotrain_compatible #endpoints_compatible #region-us 

Dataset: URL
============


Github: URL
===========


Performance
===========




TAGS
#transformers #pytorch #xlm-roberta #text-classification #autotrain_compatible #endpoints_compatible #region-us 

passage: TAGS
#transformers #pytorch #xlm-roberta #text-classification #autotrain_compatible #endpoints_compatible #region-us 
