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
| { | |
| "add_bos_token": false, | |
| "add_prefix_space": false, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "errors": "replace", | |
| "model_max_length": 1024, | |
| "name_or_path": "gpt2-medium", | |
| "pad_token": null, | |
| "special_tokens_map_file": null, | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |