26 · Text analytics · Open weights

The writer's own sentiment, in 13 languages.

cbx-indim-sentiment-classifier-32M

Reads the writer's own sentiment in 12 Indian languages and English: positive, negative or neutral.

Real inputs it was built for.

Not in the hosted Playground yet. Run it from the open weights on Hugging Face.

Hindi

फ़ोन की बैटरी बहुत अच्छी है, पूरा दिन चलती है।

On Hugging Face

Telugu

డెలివరీ చాలా ఆలస్యమైంది, ప్యాకింగ్ కూడా బాగాలేదు.

On Hugging Face

Benchmark

Measured against the alternative.

0.000

Two-way accuracy, IndicSentiment (12,946 product reviews, 13 languages)

Full results ↗
  • cbx-indim-sentiment-classifier-32M0.822
  • IndicBERT v2 (278M)0.944
  • mmBERT-base (307M)0.901
  • mmBERT-small (140M)0.839

From the model card

A sentiment classifier for 12 Indian languages and English: Hindi, Bengali, Marathi, Tamil, Telugu, Kannada, Malayalam, Gujarati, Punjabi, Odia, Assamese, Urdu and English, in native script, romanized or code-mixed. Give it a comment, review, post or sentence and it returns positive, negative or neutral: the writer's own sentiment. It is InDIM-small (32M) fine-tuned for sentiment, and runs in a few milliseconds on a CPU.

Model

32M

Licence

Apache 2.0

Fine-tuned from

CobuildX-AI/InDIM-small

Read the full model card ↗

Full results. Every number, from the card.

Two test sets labelled by people (not used in training). Every model was fine-tuned with the same recipe and data (plain fine-tuning, learning rate picked on validation); mean of 3 training runs ± SD unless marked.

  • IndicSentiment (AI4Bharat, CC0): 12,946 product reviews in 13 languages, each positive or negative. Scored by comparing the positive and negative scores only (two-way accuracy).
  • Source-labelled test: 8,712 texts with their datasets' own labels: Telugu sentences (6,796), English tweets (870) and romanized Hindi YouTube comments (1,046). Their labelling rules differ from ours, so every model scores near 0.5 macro F1; read it for the order between models.
ModelParametersIndicSentiment accuracySource-labelled macro F1English tweetsRomanized HindiTelugu
InDIM-small (this model's base)32M0.822 ± 0.0160.512 ± 0.0050.6400.5600.443
mmBERT-small140M0.839 ± 0.0040.508 ± 0.0150.7060.5650.415
mmBERT-base (1 run)307M0.9010.5240.7160.6010.421
IndicBERT v2278M0.944 ± 0.0030.547 ± 0.0020.7130.5770.475

(The last three columns are macro F1 within each source.)

  • This repository holds the training run with the best validation score: IndicSentiment 0.811, source-labelled 0.518.
  • InDIM-small is level with mmBERT-small at a quarter of its size and better on Telugu; the larger models, especially IndicBERT v2, are clearly better on IndicSentiment. Its weakest languages there are English, Hindi and Urdu.

CPU latency (Intel i7-10700, 8 threads, one text at a time, PyTorch fp32): 5.7 ms for a 15-token sentence, 22.8 ms for a long (about 200-word) input.

Precision: fp16 gives the same labels as fp32 on both test sets. PyTorch dynamic int8 (per-channel) keeps 95–97% of labels unchanged; ONNX int8 changed 4% of decisions in our test, so only the fp32 ONNX file is provided.

Know its limits. Before you ship it.

Limitations

  • Too many opinions are called neutral. On IndicSentiment, where every review is positive or negative, a three-way decision often says neutral. Compare positive and negative only if your texts always carry an opinion.
  • Training labels come from LLMs, following a written guide, not from people; data labelled under different rules (for example, reported news as negative) will score lower.
  • Context: sarcasm, irony, quotes and replies to content the model cannot see are often misread.
  • Bias: errors are not spread evenly across languages, scripts, dialects or topics; political, religious and community-related text may be judged less accurately.

Training data

What it learned from.

InDIM-small (32M) fine-tuned on about 63,000 texts in 13 languages (social-media comments, tweets, reviews and web text, about 15% written by LLMs to fill gaps), labelled to the guide above by LLMs (plain fine-tuning, learning rate 4e-4). The source datasets are credited in NOTICE.

One size. Smaller is faster, larger is more accurate.

Run it on your own infrastructure. Open weights on Hugging Face.

Download the model, run it beside your own systems, and talk to us about tuning it to your data.