Harikrishna-Srinivasan/Hate-Speech
Viewer • Updated • 25k • 42
How to use Harikrishna-Srinivasan/Hate-Speech-DistilBERT with PEFT:
Task type is invalid.
How to use Harikrishna-Srinivasan/Hate-Speech-DistilBERT with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Harikrishna-Srinivasan/Hate-Speech-DistilBERT") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Harikrishna-Srinivasan/Hate-Speech-DistilBERT")
model = AutoModelForSequenceClassification.from_pretrained("Harikrishna-Srinivasan/Hate-Speech-DistilBERT", device_map="auto")Copyright 2026 Harikrishna Srinivasan
This model is a LoRA fine-tuned DistilBERT base uncased model for binary hate speech classification (Hate / Not Hate). It is optimized for efficient fine-tuning using Low-Rank Adaptation (LoRA) via the Hugging Face PEFT library.
distilbert/distilbert-base-uncased-finetuned-sst-2-englishThis model can be used directly for:
@misc{srinivasan2026hatespeech,
author = {Harikrishna Srinivasan},
title = {Hate-Speech Dataset},
year = {2026},
publisher = {Hugging Face Datasets},
url = {https://huggingface.co/datasets/Harikrishna-Srinivasan/Hate-Speech}
}
Example:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL_NAME = "Harikrishna-Srinivasan/Hate-Speech-DistilBERT"
model = PeftModel.from_pretrained(MODEL_NAME)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_fast=True)