Instructions to use michelecafagna26/gpt2-medium-finetuned-sst2-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use michelecafagna26/gpt2-medium-finetuned-sst2-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="michelecafagna26/gpt2-medium-finetuned-sst2-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("michelecafagna26/gpt2-medium-finetuned-sst2-sentiment") model = AutoModelForSequenceClassification.from_pretrained("michelecafagna26/gpt2-medium-finetuned-sst2-sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
d0ce5a5
1
Parent(s): 72c7e74
Update config.json
Browse files- config.json +8 -0
config.json
CHANGED
|
@@ -4,6 +4,14 @@
|
|
| 4 |
"architectures": [
|
| 5 |
"GPT2ForSequenceClassification"
|
| 6 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"attn_pdrop": 0.1,
|
| 8 |
"bos_token_id": 50256,
|
| 9 |
"embd_pdrop": 0.1,
|
|
|
|
| 4 |
"architectures": [
|
| 5 |
"GPT2ForSequenceClassification"
|
| 6 |
],
|
| 7 |
+
"id2label": {
|
| 8 |
+
"0": "NEGATIVE",
|
| 9 |
+
"1": "POSITIVE"
|
| 10 |
+
},
|
| 11 |
+
"label2id": {
|
| 12 |
+
"NEGATIVE": 0,
|
| 13 |
+
"POSITIVE": 1
|
| 14 |
+
},
|
| 15 |
"attn_pdrop": 0.1,
|
| 16 |
"bos_token_id": 50256,
|
| 17 |
"embd_pdrop": 0.1,
|