08 · Text analytics · Open weights
Sentiment in 12 Indian languages and English.
cbx-indic-sentiment-classifier-58M
Positive, negative or neutral: the writer's own sentiment, in 12 Indian languages and English, in native script, romanized or code-mixed.
Real inputs it was built for.
Open any example in the Playground to see the live output.
Hinglish praise
Bahut badhiya phone hai, battery poora din chalti hai.
Bengali complaint
ডেলিভারি তিন দিন দেরিতে এসেছে, খুবই হতাশ।
Romanized complaint
yaar kya bakwaas movie thi, paisa barbaad
Hindi news (neutral)
सरकार ने नई योजना की घोषणा की है।
Kannada praise
ಈ ಸಿನಿಮಾ ತುಂಬಾ ಚೆನ್ನಾಗಿದೆ, ಎಲ್ಲರೂ ನೋಡಿ!
Benchmark
Measured against the alternative.
- cbx-indic-sentiment-classifier-58M0.721
- TF-IDF + logistic regression0.685
- twitter-xlm-roberta-base-sentiment0.601
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, written in native script, in Latin letters (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 has 57.6M parameters: mmBERT-small with its vocabulary pruned to the 40,000 tokens these languages use, distilled from a fine-tuned mmBERT-base. Other sizes: 36M. On a CPU (8 threads, fp32) one short text (17 tokens) takes about 13 ms and a full 256-token text about 52 ms.
Licence: Apache License, Version 2.0. Read Intended use and disclaimer before using it.
Full results. Every number, from the card.
Real text test: 2,575 real texts, about 200 per language, never used in training: web text (Sangraha, FineWeb-2), social-media comments, tweets and reviews from the datasets credited below, with at least 50 opinionated texts per language (53% neutral, 27% positive, 20% negative). Each text was labelled independently by two LLMs (Gemma 4 31B and Claude Sonnet 5.5) following the written guide; gpt-5.4-mini decided their disagreements. No person reviewed the labels, so they contain errors.
Web text test: 1,252 real texts (80–150 per language; web text and Dravidian comments, 72% neutral), labelled the same way. Smaller and mostly neutral; reported for comparison with the real text test.
IndicSentiment: 12,946 product reviews (AI4Bharat IndicSentiment, test and validation splits, 13 languages), each positive or negative as labelled by the dataset's authors. The model's positive and negative scores are compared (neutral is ignored), so this is a two-way accuracy. Not used in training.
| Model | Real text test (macro F1) | Web text test (macro F1) | IndicSentiment (accuracy) |
|---|---|---|---|
| this model (58M) | 0.721 | 0.680 | 0.849 |
| 36M (same family) | 0.713 | 0.650 | 0.818 |
| TF-IDF + logistic regression | 0.685 | 0.623 | 0.726 |
| cardiffnlp/twitter-xlm-roberta-base-sentiment | 0.601 | – | 0.847 |
| cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual | 0.606 | – | 0.758 |
| tabularisai/multilingual-sentiment-analysis | 0.524 | – | 0.779 |
TF-IDF: character n-grams with logistic regression, trained on the same data. The three public models were used as published, with their labels mapped to ours; they were not trained on our data or guide, so part of their gap on the real text tests is a difference in what counts as neutral. tabularisai/multilingual-sentiment-analysis is licensed for non-commercial use only.
By language (Real text test, macro F1):
| Language | 58M (this model) | 36M | Texts |
|---|---|---|---|
Hindi (hi) | 0.67 | 0.68 | 199 |
Bengali (bn) | 0.87 | 0.86 | 200 |
Marathi (mr) | 0.73 | 0.70 | 199 |
Tamil (ta) | 0.78 | 0.75 | 197 |
Telugu (te) | 0.57 | 0.59 | 199 |
Kannada (kn) | 0.80 | 0.77 | 195 |
Malayalam (ml) | 0.73 | 0.72 | 196 |
Gujarati (gu) | 0.71 | 0.70 | 196 |
Punjabi (pa) | 0.57 | 0.56 | 200 |
Odia (or) | 0.46 | 0.53 | 199 |
Assamese (as) | 0.82 | 0.81 | 200 |
Urdu (ur) | 0.61 | 0.61 | 197 |
English (en) | 0.74 | 0.68 | 198 |
By script (this model, accuracy): code-mixed 0.86 (28 texts), native script 0.78 (1700 texts), romanized 0.73 (847 texts)
Know its limits. Before you ship it.
Limitations
- Too many opinions are called neutral. On IndicSentiment, where every review is positive or negative, the model labels 47% of reviews
neutral. Negative opinions are missed most (negativeF1 0.61 on the real text test). If your texts always carry an opinion, comparepositiveandnegativescores only. - Weaker languages: Odia (0.46), Punjabi (0.57), Telugu (0.57) and Urdu (0.61) score well below the other languages on the real text test. Expect more errors there.
- Code-mixed text is in training, but the real text test has only 28 code-mixed texts, so its accuracy there is not well measured.
- Labels are from LLMs, not people, for training and for the tests. The guide's choices (for example, that reported news is neutral) are one reasonable reading, not the only one; data labelled another way will score lower.
- Context. The model sees one text. Sarcasm, irony, quotes and replies to content it 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.
About 63,000 labelled texts from the eleven training datasets credited below: social-media comments, tweets and reviews, plus web text from Sangraha and FineWeb-2. All of them were labelled to the written guide by two LLMs, with a third deciding disagreements; the datasets' own labels were not used. About 15% of the training texts (9,500) were written by LLMs to fill language and label combinations with little real text; no generated text is in any test set. The models were distilled from mmBERT-base fine-tuned on the same data.
2 sizes. Smaller is faster, larger is more accurate.
Run it on your own data. In the CobuildX Console.
Sign in to the console to call this model live, compare sizes and create an API key.