Downloads · 30 days
28
13% of all-time downloads
anmolshrivastav/distilbert-scam-detector-india
distilbert-scam-detector-india is a text classification model from anmolshrivastav. 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.
Fine-tuned version of distilbert-base-uncased-finetuned-sst-2-english for binary classification of scam/spam vs. legitimate ("ham") text messages, with a focus on Indian scam patterns (lottery fraud, Aadhaar/KYC phish…
Downloads · 30 days
28
13% of all-time downloads
All-time downloads
208
Public
Parameters
67M
603 MB on disk
Likes
0
Public
Click a slice to open those files.
.onnx335 MB · 55%
From the Hugging Face model README
Fine-tuned version of distilbert-base-uncased-finetuned-sst-2-english
for binary classification of scam/spam vs. legitimate ("ham") text messages, with a focus on Indian scam patterns
(lottery fraud, Aadhaar/KYC phishing, UPI/bank fraud, fake job offers, OTP-theft attempts).
0 / ham: Legitimate message1 / spam: Scam or spam messagescam_hum_india.csv, real-world Indian SMS/message samples (telecom promos, government notices, casual messages), deduplicated.sklearn compute_class_weight="balanced") used during training to counter class imbalance (~1521 ham vs ~700 spam originally).distilbert-base-uncased-finetuned-sst-2-englishCrossEntropyLoss via custom Trainer subclass to address class imbalance| Metric | Score |
|---|---|
| Accuracy | 0.9971 |
| F1 | 0.9963 |
| Eval Loss | 0.0206 |
from transformers import pipeline
clf = pipeline("text-classification", model="anmolshrivastav/distilbert-scam-detector-india")
clf("Congratulations! You've won 50000 rupees, click link to claim")
A dynamically quantized (INT8) ONNX version model.onnx is available in the onnx/ subfolder for faster CPU inference with a smaller footprint. Also a onnx/model_fp32.onnx (unquantized ONNX version)
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline
model = ORTModelForSequenceClassification.from_pretrained(
"anmolshrivastav/distilbert-scam-detector-india", subfolder="onnx"
)
tokenizer = AutoTokenizer.from_pretrained(
"anmolshrivastav/distilbert-scam-detector-india", subfolder="onnx"
)
clf = pipeline("text-classification", model=model, tokenizer=tokenizer)
clf("Congratulations! You've won 50000 rupees, click link to claim")