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 message
  • spam โ€” spam message

Author

Razak Shaik โ€” VIT-AP University, CS Final Year

Downloads last month
8
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using RazakAIhub/distilbert-spam-classifier 1