Instructions to use entfane/gpt2_constitutional_classifier_violence with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use entfane/gpt2_constitutional_classifier_violence with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="entfane/gpt2_constitutional_classifier_violence")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("entfane/gpt2_constitutional_classifier_violence") model = AutoModelForSequenceClassification.from_pretrained("entfane/gpt2_constitutional_classifier_violence") - Notebooks
- Google Colab
- Kaggle
| { | |
| "add_prefix_space": false, | |
| "backend": "tokenizers", | |
| "bos_token": "<|endoftext|>", | |
| "eos_token": "<|endoftext|>", | |
| "errors": "replace", | |
| "is_local": false, | |
| "model_max_length": 1024, | |
| "pad_token": "<|endoftext|>", | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": "<|endoftext|>" | |
| } | |