DistilBERT Spam Classifier
Model Description
Fine-tuned DistilBERT model for SMS spam detection. Trained on the SMS Spam Collection dataset. Achieves 99.1% accuracy and 96.9% F1 score.
How to Use
from transformers import pipeline
pipe = pipeline("text-classification",
model="RazakAIhub/distilbert-spam-classifier")
result = pipe("Congratulations! You've won a free prize!")
print(result) # [{'label': 'spam', 'score': 0.99}]
Training Details
- Base model: distilbert-base-uncased
- Dataset: SMS Spam Collection (5,574 messages)
- Training accuracy: 99.1%
- F1 Score: 96.9%
- Epochs: 3
- Learning rate: 2e-5
Labels
hamโ legitimate messagespamโ spam message
Author
Razak Shaik โ VIT-AP University, CS Final Year
- Downloads last month
- 8