Instructions to use advy/opt-350m-hate-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use advy/opt-350m-hate-classifier with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("facebook/opt-350m") model = PeftModel.from_pretrained(base_model, "advy/opt-350m-hate-classifier") - Transformers
How to use advy/opt-350m-hate-classifier with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("advy/opt-350m-hate-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer.json from advy/opt-350m-hate-classifier: direct link, hf CLI and curl.
- Browser
- Download file 3.56 MB
-
https://huggingface.co/advy/opt-350m-hate-classifier/resolve/main/tokenizer.json
- Command line
-
hf download hf://advy/opt-350m-hate-classifier/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/advy/opt-350m-hate-classifier/resolve/main/tokenizer.json
3.56 MB
File too large to display, you can check the raw version instead.