Instructions to use XSY/albert-base-v2-imdb-calssification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XSY/albert-base-v2-imdb-calssification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="XSY/albert-base-v2-imdb-calssification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("XSY/albert-base-v2-imdb-calssification") model = AutoModelForSequenceClassification.from_pretrained("XSY/albert-base-v2-imdb-calssification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Align label mapping with imdb dataset
#1
by lewtun HF Staff - opened
- config.json +10 -2
config.json
CHANGED
|
@@ -30,5 +30,13 @@
|
|
| 30 |
"torch_dtype": "float32",
|
| 31 |
"transformers_version": "4.12.3",
|
| 32 |
"type_vocab_size": 2,
|
| 33 |
-
"vocab_size": 30000
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
"torch_dtype": "float32",
|
| 31 |
"transformers_version": "4.12.3",
|
| 32 |
"type_vocab_size": 2,
|
| 33 |
+
"vocab_size": 30000,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"neg": 0,
|
| 36 |
+
"pos": 1
|
| 37 |
+
},
|
| 38 |
+
"id2label": {
|
| 39 |
+
"0": "neg",
|
| 40 |
+
"1": "pos"
|
| 41 |
+
}
|
| 42 |
+
}
|