Instructions to use typeform/squeezebert-mnli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typeform/squeezebert-mnli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="typeform/squeezebert-mnli")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("typeform/squeezebert-mnli", dtype="auto") - Notebooks
- Google Colab
- Kaggle
David Chu commited on
Commit ·
625d89b
1
Parent(s): cbe46fb
fix: add label2id and id2label
Browse files- config.json +11 -1
config.json
CHANGED
|
@@ -18,5 +18,15 @@
|
|
| 18 |
"post_attention_groups": 1,
|
| 19 |
"intermediate_groups": 4,
|
| 20 |
"output_groups": 4,
|
| 21 |
-
"num_labels": 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
|
|
|
| 18 |
"post_attention_groups": 1,
|
| 19 |
"intermediate_groups": 4,
|
| 20 |
"output_groups": 4,
|
| 21 |
+
"num_labels": 3,
|
| 22 |
+
"label2id": {
|
| 23 |
+
"ENTAILMENT": 0,
|
| 24 |
+
"NEUTRAL": 1,
|
| 25 |
+
"CONTRADICTION": 2,
|
| 26 |
+
},
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "ENTAILMENT",
|
| 29 |
+
"1": "NEUTRAL",
|
| 30 |
+
"2": "CONTRADICTION"
|
| 31 |
+
}
|
| 32 |
}
|