Instructions to use morit/XLM-T-full-xnli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use morit/XLM-T-full-xnli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="morit/XLM-T-full-xnli")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("morit/XLM-T-full-xnli") model = AutoModelForSequenceClassification.from_pretrained("morit/XLM-T-full-xnli", device_map="auto") - Notebooks
- Google Colab
- Kaggle
add label2id mapping
Browse files- config.json +3 -3
config.json
CHANGED
|
@@ -20,9 +20,9 @@
|
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"label2id": {
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
},
|
| 27 |
"layer_norm_eps": 1e-05,
|
| 28 |
"max_position_embeddings": 514,
|
|
|
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"label2id": {
|
| 23 |
+
"entailment": 0,
|
| 24 |
+
"neutral": 1,
|
| 25 |
+
"contradiction": 2
|
| 26 |
},
|
| 27 |
"layer_norm_eps": 1e-05,
|
| 28 |
"max_position_embeddings": 514,
|