Text Classification
Transformers
PyTorch
ONNX
English
albert
text-classfication
int8
Intel® Neural Compressor
neural-compressor
PostTrainingStatic
Instructions to use INC4AI/albert-base-v2-sst2-int8-static-inc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INC4AI/albert-base-v2-sst2-int8-static-inc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="INC4AI/albert-base-v2-sst2-int8-static-inc")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("INC4AI/albert-base-v2-sst2-int8-static-inc") model = AutoModelForSequenceClassification.from_pretrained("INC4AI/albert-base-v2-sst2-int8-static-inc") - Notebooks
- Google Colab
- Kaggle
Align label mapping with sst2 config of glue dataset
#1
by lewtun HF Staff - opened
- config.json +10 -2
config.json
CHANGED
|
@@ -31,5 +31,13 @@
|
|
| 31 |
"torch_dtype": "int8",
|
| 32 |
"transformers_version": "4.18.0",
|
| 33 |
"type_vocab_size": 2,
|
| 34 |
-
"vocab_size": 30000
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"torch_dtype": "int8",
|
| 32 |
"transformers_version": "4.18.0",
|
| 33 |
"type_vocab_size": 2,
|
| 34 |
+
"vocab_size": 30000,
|
| 35 |
+
"label2id": {
|
| 36 |
+
"negative": 0,
|
| 37 |
+
"positive": 1
|
| 38 |
+
},
|
| 39 |
+
"id2label": {
|
| 40 |
+
"0": "negative",
|
| 41 |
+
"1": "positive"
|
| 42 |
+
}
|
| 43 |
+
}
|