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.

Run it

Bengali complaint

ডেলিভারি তিন দিন দেরিতে এসেছে, খুবই হতাশ।

Run it

Romanized complaint

yaar kya bakwaas movie thi, paisa barbaad

Run it

Hindi news (neutral)

सरकार ने नई योजना की घोषणा की है।

Run it

Kannada praise

ಈ ಸಿನಿಮಾ ತುಂಬಾ ಚೆನ್ನಾಗಿದೆ, ಎಲ್ಲರೂ ನೋಡಿ!

Run it

Benchmark

Measured against the alternative.

0.000

Macro F1 — real text test, 2,575 texts in 13 languages

Full results ↗
  • 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.

Model

58M

Licence

Apache 2.0

Fine-tuned from

jhu-clsp/mmBERT-small

Read the full model card ↗

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.

ModelReal text test (macro F1)Web text test (macro F1)IndicSentiment (accuracy)
this model (58M)0.7210.6800.849
36M (same family)0.7130.6500.818
TF-IDF + logistic regression0.6850.6230.726
cardiffnlp/twitter-xlm-roberta-base-sentiment0.601–0.847
cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual0.606–0.758
tabularisai/multilingual-sentiment-analysis0.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):

Language58M (this model)36MTexts
Hindi (hi)0.670.68199
Bengali (bn)0.870.86200
Marathi (mr)0.730.70199
Tamil (ta)0.780.75197
Telugu (te)0.570.59199
Kannada (kn)0.800.77195
Malayalam (ml)0.730.72196
Gujarati (gu)0.710.70196
Punjabi (pa)0.570.56200
Odia (or)0.460.53199
Assamese (as)0.820.81200
Urdu (ur)0.610.61197
English (en)0.740.68198

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 (negative F1 0.61 on the real text test). If your texts always carry an opinion, compare positive and negative scores 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.

DatasetLanguagesLicenceUsed for
Telugu_Sentiment, Marreddy et al. 2022teCC BY 4.0training and testing
XLM-T tweet_sentiment_multilingual, Barbieri et al. 2022en, hiCC BY 3.0 (tweets: X / Twitter terms)training and testing
Hinglish YouTube sentiments dataset (shae2977)hiCC BY 4.0training and testing
Roman Urdu Data Set, Sharf 2018, UCI Machine Learning RepositoryurCC BY 4.0training and testing
Assamese movie reviews sentiment, A. Dutta and S. DuttaasCC BY 4.0training and testing
Bangla sentiment benchmark corpus, Sazzed 2021bnCC BY 4.0training and testing
Motamot (Bengali political sentiment), arXiv:2407.19528bnMITtraining
Sangraha, AI4Bharatas, bn, en, gu, hi, kn, ml, mr, or, pa, ta, te, urCC BY 4.0training and testing
FineWeb-2, Hugging Faceas, bn, gu, hi, kn, ml, mr, or, pa, ta, te, urODC-By 1.0training and testing
DravidianCodeMix comments (OffensEval Dravidian), Chakravarthi et al.kn, ml, taCC BY 4.0training and testing
Gujarati-English code-mixed comments (ShrutiPatel3011)guCC BY 4.0training and testing
IndicSentiment, Doddapaneni et al. 2023 (IndicXTREME), AI4Bharatas, bn, en, gu, hi, kn, ml, mr, or, pa, ta, te, urCC0 1.0testing

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.