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
File size: 129 Bytes
63fda1d | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:d45ca546d037a972650be3c0b44d6127d499a70c3bef6409499d6f1dd8734faf
size 5713
|