SAVRN
Search Contact SAVRN

Open-weight model · Text classification

indicbert-scam-classifier-v2

by Anmol Shrivastav anmolshrivastav/indicbert-scam-classifier-v2

indicbert-scam-classifier-v2 is an open-weight model for text classification from Anmol Shrivastav, released under MIT License. It has 278M parameters and a 512-token context. At 16-bit it needs about 0.7 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index. It draws 34 downloads a month.

A sequence classification model fine-tuned on top of ai4bharat/IndicBERTv2-MLM-only to detect fraudulent, phishing, and scam messages across 14 Indian languages and language varieties[cite: 4].

Parameters278M
Context512
Weights2.5 GB
Licensemit
AccessOpen weights
Monthly Downloads34

Runs On

What it takes to serve indicbert-scam-classifier-v2 (278M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.6 GB 0.7 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.3 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 7, 2026.

indicbert-scam-classifier-v2 on every accelerator the SAVRN Index prices, at every precision

Model Card

By Anmol Shrivastav, published under mit, revision 076cd5a48cf6.

A sequence classification model fine-tuned on top of ai4bharat/IndicBERTv2-MLM-only to detect fraudulent, phishing, and scam messages across 14 Indian languages and language varieties[cite: 4]. This v2 model represents a significant upgrade over the baseline v1 iteration, leveraging advanced entity masking and continuous feedback loop training on a T4 GPU to heavily reduce False Negatives (scam $ightarrow$ ham misclassifications). The original v1 baseline achieved a highly respectable 98.29% accuracy but exhibited vulnerabilities to specific scam evasion tactics (e.g., protocol obfuscation like hxxp://, naked domains, and specific tele-fraud requests)[cite: 4]. To resolve this, v2 was…

Read Anmol Shrivastav's full model card

IndicBERT Multilingual Scam & Fraud Classifier (v2)

A sequence classification model fine-tuned on top of ai4bharat/IndicBERTv2-MLM-only to detect fraudulent, phishing, and scam messages across 14 Indian languages and language varieties[cite: 4].

This v2 model represents a significant upgrade over the baseline v1 iteration, leveraging advanced entity masking and continuous feedback loop training on a T4 GPU to heavily reduce False Negatives (scam $ightarrow$ ham misclassifications).


Supported Languages

Language Code
Assamese as
Bengali bn
English en
Gujarati gu
Hindi hi
Hinglish (Hindi in Latin script) hi-Latn
Kannada kn
Kashmiri ks
Malayalam ml
Marathi mr
Odia or
Punjabi pa
Tamil ta
Telugu te

Training Methodology: v2 Upgrades

The original v1 baseline achieved a highly respectable 98.29% accuracy but exhibited vulnerabilities to specific scam evasion tactics (e.g., protocol obfuscation like hxxp://, naked domains, and specific tele-fraud requests)[cite: 4]. To resolve this, v2 was engineered on Nvidia T4 hardware using the following pipeline:

  1. Aggressive Entity Masking: Texts are preprocessed using complex regular expressions to capture evasive links and contact numbers.
    • URLs, naked domains, and obfuscated protocols are masked with a [URL] token.
    • 10-digit formats and international phone codes are masked with a [PHONE] token.
  2. Imbalanced Class Weighting: The loss function was modified to heavily penalize missed scams (False Negatives) exponentially more than False Positives.
  3. Continuous Feedback Loop (Hard Negative Mining): Errors generated by the v1 baseline were logged as "Hard Mistakes", oversampled, mixed with a fractional batch of original data to prevent catastrophic forgetting, and retrained at a remarkably low learning rate (1e-5) for targeted semantic updates.

Intended Use & Capabilities

This model is intended to detect common fraud and scam patterns prevalent across Indian communications, including:

  • Electricity and utility disconnection threats[cite: 4].
  • Impersonation of major institutions such as banks, India Post, and courier services[cite: 4].
  • Fake lottery, subsidy, and government-scheme claims[cite: 4].
  • Suspicious payment requests and fee demands[cite: 4].
  • Phishing and malicious links[cite: 4].
  • Requests for OTPs, passwords, PINs, or banking information[cite: 4].
  • Fake delivery, refund, account-verification, and KYC messages[cite: 4].
  • Suspicious promotional and reward messages[cite: 4].

The model is also trained to distinguish potentially legitimate transactional messages, such as:

  • OTP notifications[cite: 4].
  • Bank debit/transaction alerts[cite: 4].
  • Utility bill reminders[cite: 4].
  • Official-style service notifications[cite: 4].

Note: Classification depends on the text provided to the model. A legitimate message can resemble a scam, and a sophisticated scam can resemble a legitimate notification. The model should therefore be treated as a classification aid rather than a definitive fraud-verification system[cite: 4].


Evaluation (v2 Results)

The model was evaluated using a manually curated multilingual evaluation set containing 100 samples per language across all 14 supported languages[cite: 4]. Each language contains 50 SCAM samples and 50 HAM (legitimate) samples, for a total of 1,400 evaluation samples[cite: 4].

Overall Results (Highest Score on Unseen Dataset)

Metric v1 Baseline Result v2 Optimized Result
Evaluation Samples 1,400[cite: 4] 1,400
Correct Predictions 1,376[cite: 4] 1,395
Incorrect Predictions 24[cite: 4] 5
Overall Accuracy 98.29%[cite: 4] 99.64%

Per-Language Evaluation (v2 Breakdown)

Language Samples Correct Accuracy
Assamese (as) 100 99 99.00%
Bengali (bn) 100 100 100.00%
English (en) 100 100 100.00%
Gujarati (gu) 100 100 100.00%
Hindi (hi) 100 100 100.00%
Hinglish (hi-Latn) 100 100 100.00%
Kannada (kn) 100 100 100.00%
Kashmiri (ks) 100 99 99.00%
Malayalam (ml) 100 100 100.00%
Marathi (mr) 100 99 99.00%
Odia (or) 100 100 100.00%
Punjabi (pa) 100 99 99.00%
Tamil (ta) 100 100 100.00%
Telugu (te) 100 99 99.00%
Total 1,400 1,395 99.64%

Observations

The feedback loop iterations completely eliminated the systemic errors found in v1's Hinglish and Kannada evaluations. Nine out of fourteen languages now demonstrate a perfect 100.00% accuracy rate on the test suite. The remaining five languages missed a maximum of 1 sample out of 100, bringing the overall performance tightly to an exceptionally stable production-ready threshold.


Quick Usage

Preprocessing Requirements

Because v2 was trained using explicit structural anchors, you must apply regex masking to URLs and Phone Numbers before passing text to the model.

Using Hugging Face Pipelines

from transformers import pipeline

# Load pipeline (Ensure you are pointing to the v2 model repo)
classifier = pipeline(
    "text-classification",
    model="anmolshrivastav/indicbert-scam-classifier-v2",
    device_map="auto"
)

sample = "Aapka Bijli bill baki hai, connection aaj raat cut ho jayega. Turant call karein 9876543210"

# Note: Mask URLs and Phones using regex matching BEFORE inference for optimal results
# processed_sample = apply_regex_masks(sample) 

result = classifier(sample)
print(result)

Programmatic Usage

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

class IndicScamClassifier:
    def __init__(self, model_path: str = repo_id, device: str = None):
        if device is None:
            self.device = "cuda" if torch.cuda.is_available() else "cpu"
        else:
            self.device = device

        self.tokenizer = AutoTokenizer.from_pretrained(model_path)
        self.model = AutoModelForSequenceClassification.from_pretrained(model_path).to(self.device)
        self.model.eval()

    def predict(self, texts, threshold: float = 0.5):
        is_single = isinstance(texts, str)
        if is_single:
            texts = [texts]

        inputs = self.tokenizer(
            texts,
            padding=True,
            truncation=True,
            max_length=128,
            return_tensors="pt"
        ).to(self.device)

        with torch.no_grad():
            outputs = self.model(**inputs)
            probs = torch.softmax(outputs.logits, dim=-1)

        results = []
        for prob in probs:
            scam_score = prob[1].item()
            label = "scam" if scam_score >= threshold else "ham"
            results.append({
                "label": label,
                "confidence": scam_score if label == "scam" else prob[0].item(),
                "scam_probability": scam_score
            })

        return results[0] if is_single else results

# Quick test
detector = IndicScamClassifier()
sample = "Congratulations, you won lottery. Call 9876543210 immediately."
print(detector.predict(sample))

Configuration

Architecture
BertForSequenceClassification
Context length (tokens)
512
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
250,000
Model type
bert

Identity and Version

Repository
anmolshrivastav/indicbert-scam-classifier-v2
Publisher
Anmol Shrivastav
Task
Text classification
Modality
Text
Library
transformers
Parameters
278M parameters
Languages
as, bn, en, gu, hi, kn, ks, ml
Revision
076cd5a48cf6d23783e4531f2e71363fad9080ec
First published
2026-10-02
Last updated
2026-10-04

Files and Weights

14 files, 3.1 GB in total. The weights are 3 files totalling 2.5 GB in onnx, safetensors.

Weights3 files · 2.5 GB
Configuration4 files · 3.0 KB
Tokenizer4 files · 15.5 MB
Documentation1 file · 8.5 KB
Other1 file · 556.3 MB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights1.1 GB 0670fde274b3
onnx/model.onnxWeights278.8 MB 9d14280ac159
onnx/model_fp32.onnxWeights1.1 GB 7576e598b8d7
config.jsonConfiguration860 B —
onnx/config.jsonConfiguration726 B —
onnx/ort_config.jsonConfiguration764 B —
onnx/special_tokens_map.jsonConfiguration695 B —
README.mdDocumentation8.5 KB —
onnx/model_fp16.with_runtime_opt.ortOther556.3 MB 818016a7bdcb
.gitattributesRepository1.6 KB —
onnx/tokenizer.jsonTokenizer7.7 MB —
onnx/tokenizer_config.jsonTokenizer5.4 KB —
tokenizer.jsonTokenizer7.7 MB —
tokenizer_config.jsonTokenizer489 B —

License and Download

License
mit
Access
Open weights, no gate
Download size
2.5 GB
Download from Anmol Shrivastav

Released by Anmol Shrivastav through its official repository on Hugging Face. Read the license.

Built From

  • Derived from ai4bharat/IndicBERTv2-MLM-only
  • Quantized from ai4bharat/IndicBERTv2-MLM-only
  • Trained on (disclosed) anmolshrivastav/scam_ham_india_14_languages

Memory Requirements

PrecisionWeights in memory
As published2.5 GB
16-bit0.6 GB
8-bit0.3 GB
4-bit0.1 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About indicbert-scam-classifier-v2

How much GPU memory does indicbert-scam-classifier-v2 need?

About 0.7 GB at 16-bit and 0.2 GB at 4-bit: the weights (278M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run indicbert-scam-classifier-v2 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use indicbert-scam-classifier-v2 commercially?

Yes. indicbert-scam-classifier-v2 is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is indicbert-scam-classifier-v2's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text classification

indicbert-scam-classifier

Anmol Shrivastav

A sequence classification model fine-tuned on top of ai4bharat/IndicBERTv2-MLM-only to detect fraudulent, phishing, and scam messages across 14 Indian languages and language varieties. The model is designed with a focus on lightweight multilingual scam detection for Indian communications and common fraud patterns. This model is intended to detect common fraud and scam patterns prevalent across Indian communications, including: - Electricity and utility disconnection threats. - Impersonation of major institutions such as banks, India Post, and courier services. - Fake lottery, subsidy, and government-scheme claims. - Suspicious payment requests and fee demands. - Phishing and malicious…

Open weights mit 278M parameters 512 tokens transformers

We have updated the new reranker, supporting larger lengths, more languages, and achieving better performance. More details please refer to our Github: FlagEmbedding. FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following projects currently: - 3/18/2024: Release new rerankers, built upon powerful M3 and LLM (GEMMA and MiniCPM, not so large actually) backbones, supporitng multi-lingual processing and larger inputs, massive improvements of ranking performances on BEIR, C-MTEB/Retrieval, MIRACL, LlamaIndex Evaluation. - 3/18/2024: Release Visualized-BGE, equipping BGE with visual capabilities. Visualized-BGE can be utilized to generate embeddings for hybrid image-text…

Open weights mit 278M parameters 514 tokens sentence-transformers

Model · Text classification

Bangla-twoclass-Sentiment-Analyzer

Arunava Kar

This model is a fine-tuned version of xlm-roberta-base on the None dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 3e-05 - trainbatchsize: 16 - evalbatchsize: 16 - lrschedulertype: linear - trainingsteps: 1800 - mixedprecisiontraining: Native AMP - Transformers 4.37.2 - Pytorch 2.1.0+cu121 - Datasets 2.17.1 - Tokenizers 0.15.2

Open weights mit 278M parameters 514 tokens transformers

Model · Text classification

snd_sentiment_analysis

Danish Mahdi

This repository contains a fine-tuned XLM-RoBERTa Base model for 3-class sentiment classification in Sindhi. The model predicts one of the following labels: - positive - neutral - negative This model is intended for research, experimentation, and lightweight production prototyping on Sindhi-language sentiment analysis tasks. It may be useful for short-text classification such as reviews, feedback, and social-media snippets. It should not be used as the only basis for high-stakes decisions. Performance can vary by domain, dialect, and writing style, and human review is recommended when errors could affect people or organizations. The saved model artifacts in this repository report the…

Open weights mit 278M parameters 514 tokens transformers

Model · Text classification

multilingual-intent-router

Gaurav Gandhi

This is v1, the shipped model (branch main): a 12-class intent classifier for logistics chat messages, fine-tuned from intfloat/multilingual-e5-base, with an optional abstention flag for messages unlike the training data. A robustness variant (v3) is on branch robust-v3. Model fingerprint (sha256 of fp32 state dict): 7ca22e16d2ace345d9dcf7737887e85fedf400a1dfc863678c2fc2663bf102bd Abstention (the out-of-distribution flag) is NOT part of the plain model: it needs predict.py and oodbank.safetensors from the same repository, used as follows. Confidences are temperature-scaled (T = 1.0228); messages whose Mahalanobis score falls below the threshold (-128.06 v1 / -178.56 v3; this model's…

Open weights mit 278M parameters 514 tokens transformers

This model is a fine-tuned version of xlm-roberta-base on the Language Identification dataset. This model is an XLM-RoBERTa transformer model with a classification head on top (i.e. a linear layer on top of the pooled output). For additional information please refer to the xlm-roberta-base model card or to the paper Unsupervised Cross-lingual Representation Learning at Scale by Conneau et al. You can directly use this model as a language detector, i.e. for sequence classification tasks. Currently, it supports the following 20 languages: arabic (ar), bulgarian (bg), german (de), modern greek (el), english (en), spanish (es), french (fr), hindi (hi), italian (it), japanese (ja), dutch (nl)…

Open weights mit 278M parameters 514 tokens transformers