Downloads · 30 days
18
9% of all-time downloads
alusci/distilbert-smsafe
distilbert-smsafe is a text classification model from alusci. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
A lightweight DistilBERT model fine-tuned for spam detection in SMS messages. The model classifies input messages as either spam or ham (not spam), using a custom dataset of real-world OTP (One-Time Password) and spam…
Downloads · 30 days
18
9% of all-time downloads
All-time downloads
204
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
alusci/distilbert-smsafeA lightweight DistilBERT model fine-tuned for spam detection in SMS messages. The model classifies input messages as either spam or ham (not spam), using a custom dataset of real-world OTP (One-Time Password) and spam SMS messages.
distilbert-base-uncasedfrom transformers import pipeline
classifier = pipeline("text-classification", model="alusci/distilbert-smsafe")
result = classifier("Your verification code is 123456. Please do not share it with anyone.")
# Optional: map the label to human-readable terms
label_map = {"LABEL_0": "ham", "LABEL_1": "spam"}
print(f"Label: {label_map[result[0]['label']]} - Score: {result[0]['score']:.2f}")
alusci/sms-otp-spam-datasetdistilbert-base-uncasedLABEL_0 → hamLABEL_1 → spamEvaluation metrics after 5 epochs:
Performance:
For questions or feedback, please contact via Hugging Face profile.