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