Downloads · 30 days
352
61% of all-time downloads
ganmoor-ai-labs/sms-shield
sms-shield is a text classification model from ganmoor-ai-labs. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
SMS-Shield reads one SMS (sender header + body) and returns a structured safety verdict as JSON. Built for Indian SMS traffic in English, Hindi (Devanagari), and romanized Hinglish, including DLT sender-header reasoni…
Downloads · 30 days
352
61% of all-time downloads
All-time downloads
577
Public
Repo size
4 GB
Likes
3
Public
Click a slice to open those files.
.gguf3.8 GB · 94%
From the Hugging Face model README
SMS-Shield reads one SMS (sender header + body) and returns a structured safety
verdict as JSON. Built for Indian SMS traffic in English, Hindi (Devanagari),
and romanized Hinglish, including DLT sender-header reasoning (the same bank
alert is safe from JD-SBIINB and dangerous from a bare 10-digit mobile).
Trained entirely on-device on an NVIDIA DGX Spark (GB10, 128 GB unified memory).
| File | Model | Size | Use case |
|---|---|---|---|
sms-shield-q4_k_m.gguf | SMS-Shield 4B (Qwen3-4B-Instruct LoRA) | 2.4 GB | Maximum accuracy: 99.2% verdict acc, servers/desktops |
sms-shield-mini-q4_k_m.gguf | SMS-Shield Mini 1.7B (Qwen3-1.7B LoRA) | 1.2 GB | On-device/mobile: 99.0% verdict acc, 100% dangerous recall, 0 OTP false-flags, 3-4x faster |
adapter_model.safetensors | 4B LoRA adapter | 127 MB | Use with Qwen/Qwen3-4B-Instruct-2507 via PEFT |
The Mini was trained on the same verified dataset plus a targeted cashback-boundary booster, and passes the same release gates (zero genuine OTPs/bank alerts flagged).
Input:
sender: 9182736450
message: Dear customer aapka SBI account aaj band ho jayega. KYC turant update karein: sbi-kyc-renew.top/verify
Output:
{"verdict": "dangerous", "category": "scam", "scam_type": "kyc_fraud", "risk": 80,
"red_flags": ["account closure", "urgent update", "suspicious link"],
"explanation": "Yeh ek fraud message hai. SBI kabhi bhi SMS se aapka account band karne ki dhamki nahi deta. Link par click na karein."}
verdict: safe | suspicious | dangerous (risk bands 0-39 / 40-69 / 70-100)category: otp | banking | delivery | bill_utility | govt | promo | personal | scamscam_type: 15 fraud patterns (kyc_fraud, digital_arrest, upi_fraud, job_scam,
fake_delivery, investment_scam, lottery_prize, utility_scam, loan_app,
phishing_generic, refund_cashback, impersonation, apk_malware,
sextortion_threat, other_scam) — null unless flaggedexplanation: one sentence in the language/script of the input message| Metric | SMS-Shield 4B | Gemma3-27B zero-shot (same prompt) |
|---|---|---|
| Verdict accuracy | 99.2% | 49.2% |
| — English / Hindi / Hinglish / Mixed | 99.2 / 99.8 / 98.8 / 98.9 | 53.2 / 26.6 / — / 27.3 |
| Category accuracy | 99.1% | 74.0% |
| Dangerous recall | 99.5% | 87.2% |
| Safe precision | 100% | 100%* |
| Genuine OTP/bank alerts misflagged as scam | 0 / 1,390 | 22 |
| JSON parse failures | 0 | 0 |
*The baseline almost never predicts safe — it over-flags legitimate traffic,
including 22 genuine OTPs/bank alerts. Over-flagging is the deployment killer
for SMS safety apps; SMS-Shield was explicitly trained against it with ~40%
hard negatives (scary-but-legitimate messages).
suspicious vs dangerous) against the reference labels.safe as
proof of legitimacy for financial actions.Ollama:
ollama run santosh07401/sms-shield
Transformers (adapter in this repo):
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "ganmoor-ai-labs/sms-shield")
GGUF: sms-shield-q4_k_m.gguf (2.4 GB) — llama.cpp/Ollama ready; use a ChatML
template (no <think> block).
Defensive scam protection for Indian mobile users: on-device SMS filtering, inbox categorization, and fraud warnings. Not for generating scam content.