Horizon-Labs/multilingual-sentiment-base

Model

Multilingual Sentiment (base, 308M): negative / neutral / positive

0

2 commits

1 linked in READMEs

updated Sep 30, 2026

See the code

README

Multilingual Sentiment (base, 308M): negative / neutral / positive

A multilingual sentiment classifier built on mmBERT-base. It returns negative, neutral or positive for reviews, social posts, comments, messages and support tickets in many languages. It is Apache-2.0 and trained only on openly licensed text with labels from an Apache-2.0 LLM, so it can be used commercially. It includes ONNX files for CPU and the browser (transformers.js). A smaller, faster version is available as multilingual-sentiment-small. Try it in the browser.

  • Mixed or balanced opinions ("good quality but too expensive") are neutral. Plain facts, questions and requests are neutral too.
  • The scores are probabilities, e.g. positive - negative gives a -1 to 1 polarity score.
  • onnx/model_quantized.onnx (int8 embeddings, 641 MB) gives the same label as fp32 on 99.5% of 430 benchmark texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/multilingual-sentiment-base")
clf(["I love this phone, the camera is amazing!", "Le colis est arrivé cassé.", "Der Termin ist am Montag."])
# [{'label': 'positive', ...}, {'label': 'negative', ...}, {'label': 'neutral', ...}]

transformers.js:

import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "Horizon-Labs/multilingual-sentiment-base", { dtype: "q8" });
console.log(await clf("Obrigado pela ajuda, vocês são incríveis!"));

Evaluation

These are public benchmarks, used only for evaluation. We never trained on them, and any training text that also appears in them was removed. The metric is macro-F1, averaged over the languages of each benchmark. On the two-class MTEB sets, each model's negative-vs-positive choice is scored, ignoring neutral. Every model is run with the same script on the same texts (code/), and each model's labels are mapped to negative/neutral/positive (1-2 stars = negative, 3 = neutral, 4-5 = positive; "very negative" = negative).

modellicenceTweets (8 languages, 3-class)Amazon reviews (6 languages, 3-class)MTEB MultilingualSentiment (29 languages, pos/neg)note
this model (308M)Apache-2.00.6600.7030.857
multilingual-sentiment-small (141M)Apache-2.00.6350.6950.822
cardiffnlp/twitter-xlm-roberta-base-sentiment (278M)none given0.7000.5330.772trained on the train split of the tweet benchmark
cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual (278M)none given0.6920.5550.760same tweet training data
lxyuan/distilbert-base-multilingual-cased-sentiments-student (135M)Apache-2.00.4140.4840.650
nlptown/bert-base-multilingual-uncased-sentiment (167M)MIT0.3900.6450.683trained on product reviews (1-5 stars)
tabularisai/multilingual-sentiment-analysis (135M)CC-BY-NC-4.00.4990.4940.670
clapAI/modernBERT-base-multilingual-sentiment (150M)Apache-2.00.7840.7750.653trained on an aggregate of public sentiment sets that may include these benchmarks' train splits
Qwen3.8-27B (our teacher, zero-shot prompt)Apache-2.00.6920.7240.89227B LLM, for reference
  • Numbers are for the released checkpoint (seed 0). Mean of two training seeds: small tweets .633 / Amazon .690 / MTEB .824; base tweets .658 / Amazon .703 / MTEB .855.
  • Tweets: cardiffnlp/tweet_sentiment_multilingual test (870 per language). Amazon: amazon_reviews_multi test (900 per language, balanced; 3 stars = neutral). MTEB: mteb/multilingual-sentiment-classification test (up to 600 per language; several languages are machine-translated, e.g. Welsh = translated IMDB).
  • Models ahead of this one: tweets: twitter-xlm-roberta-base-sentiment, twitter-xlm-roberta-base-sentiment-multilingual, modernBERT-base-multilingual-sentiment; Amazon: modernBERT-base-multilingual-sentiment; MTEB: none. Models trained on a benchmark's own training split have an in-domain advantage on it; this model has seen no benchmark data.

Per benchmark language:

setthis modelcardiffnlp xlm-rteacher
amazon German0.7440.5390.754
amazon English0.7050.5480.721
amazon Spanish0.7230.5750.746
amazon French0.7280.4990.736
amazon Japanese0.7030.5430.768
amazon Chinese0.6130.4970.623
mteb Arabic0.8530.8580.897
mteb Bambara0.5770.5910.595
mteb Bulgarian0.8930.8530.927
mteb Chinese (cmn set)0.9270.7890.967
mteb Welsh0.8140.5270.938
mteb German0.8850.7220.906
mteb Algerian Arabic0.9270.8200.860
mteb Greek0.8600.7200.913
mteb English0.8930.8470.952
mteb Basque0.8510.5730.867
mteb Persian0.8040.7970.829
mteb Finnish0.8800.9050.917
mteb Hebrew0.8330.8430.873
mteb Croatian0.9430.8550.957
mteb Indonesian0.9450.9350.965
mteb Japanese0.9330.8270.960
mteb Korean0.8060.7780.865
mteb Maltese0.7880.4890.824
mteb Norwegian0.8380.7440.880
mteb Polish0.9850.8741.000
mteb Russian0.8940.7260.862
mteb Slovak0.9440.8450.947
mteb Spanish0.9450.9160.947
mteb Thai0.7750.7660.798
mteb Turkish0.8950.9070.961
mteb Uyghur0.6940.5800.887
mteb Urdu0.7800.7640.786
mteb Vietnamese0.8600.8080.923
mteb Chinese (zho set)0.8450.7310.875
tweets Arabic0.6550.6700.714
tweets English0.7220.7250.704
tweets French0.5940.7350.599
tweets German0.6960.7490.740
tweets Hindi (romanized)0.5900.5720.634
tweets Italian0.7240.6920.791
tweets Portuguese0.6270.7650.674
tweets Spanish0.6690.6910.684

Training

  • Text (about 433k training examples): snippets from FineWeb-2 and FineWeb (ODC-BY), in 67 languages, half of them from review, forum, comment and blog pages. We added synthetic reviews, posts, comments, messages and complaints in about 90 languages and varieties (including Hinglish and Arabic dialects), written by Qwen3.8-27B (Apache-2.0) in many genres, topics and lengths.
  • Labels: soft labels (probabilities for negative, neutral and positive) from Qwen3.8-27B with a fixed zero-shot instruction (code/sentiment/teacher_sent.py). The model is trained to match these probabilities. The teacher's scores on the benchmarks are in the table above.
  • Model: mmBERT-base with a 3-way head, 3 epochs, max length 512 tokens. The checkpoint was chosen by agreement with the teacher on held-out teacher-labelled data, never on the benchmarks.
  • Code: code/ in this repository.

Limitations

  • Labels come from an LLM, not from human annotators, so the model inherits the teacher's judgement. Its idea of "neutral" can differ from a given dataset's convention: tweet benchmarks mark many mildly opinionated posts as neutral.
  • Accuracy is lower on sarcasm, on very short or context-dependent messages (tweets), and on some low-resource languages. Benchmark sets below 0.70 macro-F1: amazon_zh, mteb_bam, mteb_uig, tweets_ar, tweets_fr, tweets_ge, tweets_hi, tweets_po, tweets_sp.
  • Trained on texts up to 512 tokens and evaluated on texts up to 2,000 characters. The model accepts up to 8,192 tokens, but longer documents are untested; for those, pass truncation=True, max_length=512, or score paragraphs separately.
  • Sentiment is not stance, emotion or toxicity. Don't use it to make decisions about individuals.
endpoints_compatible
mmbert
modernbert
multilingual
onnx
safetensors
sentiment
sentiment-analysis
text-classification
text-embeddings-inference
transformers
transformers.js

Horizon-Labs/multilingual-sentiment-base

Model

Multilingual Sentiment (base, 308M): negative / neutral / positive

0

2 commits

1 linked in READMEs

updated Sep 30, 2026

See the code

README

Multilingual Sentiment (base, 308M): negative / neutral / positive

A multilingual sentiment classifier built on mmBERT-base. It returns negative, neutral or positive for reviews, social posts, comments, messages and support tickets in many languages. It is Apache-2.0 and trained only on openly licensed text with labels from an Apache-2.0 LLM, so it can be used commercially. It includes ONNX files for CPU and the browser (transformers.js). A smaller, faster version is available as multilingual-sentiment-small. Try it in the browser.

  • Mixed or balanced opinions ("good quality but too expensive") are neutral. Plain facts, questions and requests are neutral too.
  • The scores are probabilities, e.g. positive - negative gives a -1 to 1 polarity score.
  • onnx/model_quantized.onnx (int8 embeddings, 641 MB) gives the same label as fp32 on 99.5% of 430 benchmark texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/multilingual-sentiment-base")
clf(["I love this phone, the camera is amazing!", "Le colis est arrivé cassé.", "Der Termin ist am Montag."])
# [{'label': 'positive', ...}, {'label': 'negative', ...}, {'label': 'neutral', ...}]

transformers.js:

import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "Horizon-Labs/multilingual-sentiment-base", { dtype: "q8" });
console.log(await clf("Obrigado pela ajuda, vocês são incríveis!"));

Evaluation

These are public benchmarks, used only for evaluation. We never trained on them, and any training text that also appears in them was removed. The metric is macro-F1, averaged over the languages of each benchmark. On the two-class MTEB sets, each model's negative-vs-positive choice is scored, ignoring neutral. Every model is run with the same script on the same texts (code/), and each model's labels are mapped to negative/neutral/positive (1-2 stars = negative, 3 = neutral, 4-5 = positive; "very negative" = negative).

modellicenceTweets (8 languages, 3-class)Amazon reviews (6 languages, 3-class)MTEB MultilingualSentiment (29 languages, pos/neg)note
this model (308M)Apache-2.00.6600.7030.857
multilingual-sentiment-small (141M)Apache-2.00.6350.6950.822
cardiffnlp/twitter-xlm-roberta-base-sentiment (278M)none given0.7000.5330.772trained on the train split of the tweet benchmark
cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual (278M)none given0.6920.5550.760same tweet training data
lxyuan/distilbert-base-multilingual-cased-sentiments-student (135M)Apache-2.00.4140.4840.650
nlptown/bert-base-multilingual-uncased-sentiment (167M)MIT0.3900.6450.683trained on product reviews (1-5 stars)
tabularisai/multilingual-sentiment-analysis (135M)CC-BY-NC-4.00.4990.4940.670
clapAI/modernBERT-base-multilingual-sentiment (150M)Apache-2.00.7840.7750.653trained on an aggregate of public sentiment sets that may include these benchmarks' train splits
Qwen3.8-27B (our teacher, zero-shot prompt)Apache-2.00.6920.7240.89227B LLM, for reference
  • Numbers are for the released checkpoint (seed 0). Mean of two training seeds: small tweets .633 / Amazon .690 / MTEB .824; base tweets .658 / Amazon .703 / MTEB .855.
  • Tweets: cardiffnlp/tweet_sentiment_multilingual test (870 per language). Amazon: amazon_reviews_multi test (900 per language, balanced; 3 stars = neutral). MTEB: mteb/multilingual-sentiment-classification test (up to 600 per language; several languages are machine-translated, e.g. Welsh = translated IMDB).
  • Models ahead of this one: tweets: twitter-xlm-roberta-base-sentiment, twitter-xlm-roberta-base-sentiment-multilingual, modernBERT-base-multilingual-sentiment; Amazon: modernBERT-base-multilingual-sentiment; MTEB: none. Models trained on a benchmark's own training split have an in-domain advantage on it; this model has seen no benchmark data.

Per benchmark language:

setthis modelcardiffnlp xlm-rteacher
amazon German0.7440.5390.754
amazon English0.7050.5480.721
amazon Spanish0.7230.5750.746
amazon French0.7280.4990.736
amazon Japanese0.7030.5430.768
amazon Chinese0.6130.4970.623
mteb Arabic0.8530.8580.897
mteb Bambara0.5770.5910.595
mteb Bulgarian0.8930.8530.927
mteb Chinese (cmn set)0.9270.7890.967
mteb Welsh0.8140.5270.938
mteb German0.8850.7220.906
mteb Algerian Arabic0.9270.8200.860
mteb Greek0.8600.7200.913
mteb English0.8930.8470.952
mteb Basque0.8510.5730.867
mteb Persian0.8040.7970.829
mteb Finnish0.8800.9050.917
mteb Hebrew0.8330.8430.873
mteb Croatian0.9430.8550.957
mteb Indonesian0.9450.9350.965
mteb Japanese0.9330.8270.960
mteb Korean0.8060.7780.865
mteb Maltese0.7880.4890.824
mteb Norwegian0.8380.7440.880
mteb Polish0.9850.8741.000
mteb Russian0.8940.7260.862
mteb Slovak0.9440.8450.947
mteb Spanish0.9450.9160.947
mteb Thai0.7750.7660.798
mteb Turkish0.8950.9070.961
mteb Uyghur0.6940.5800.887
mteb Urdu0.7800.7640.786
mteb Vietnamese0.8600.8080.923
mteb Chinese (zho set)0.8450.7310.875
tweets Arabic0.6550.6700.714
tweets English0.7220.7250.704
tweets French0.5940.7350.599
tweets German0.6960.7490.740
tweets Hindi (romanized)0.5900.5720.634
tweets Italian0.7240.6920.791
tweets Portuguese0.6270.7650.674
tweets Spanish0.6690.6910.684

Training

  • Text (about 433k training examples): snippets from FineWeb-2 and FineWeb (ODC-BY), in 67 languages, half of them from review, forum, comment and blog pages. We added synthetic reviews, posts, comments, messages and complaints in about 90 languages and varieties (including Hinglish and Arabic dialects), written by Qwen3.8-27B (Apache-2.0) in many genres, topics and lengths.
  • Labels: soft labels (probabilities for negative, neutral and positive) from Qwen3.8-27B with a fixed zero-shot instruction (code/sentiment/teacher_sent.py). The model is trained to match these probabilities. The teacher's scores on the benchmarks are in the table above.
  • Model: mmBERT-base with a 3-way head, 3 epochs, max length 512 tokens. The checkpoint was chosen by agreement with the teacher on held-out teacher-labelled data, never on the benchmarks.
  • Code: code/ in this repository.

Limitations

  • Labels come from an LLM, not from human annotators, so the model inherits the teacher's judgement. Its idea of "neutral" can differ from a given dataset's convention: tweet benchmarks mark many mildly opinionated posts as neutral.
  • Accuracy is lower on sarcasm, on very short or context-dependent messages (tweets), and on some low-resource languages. Benchmark sets below 0.70 macro-F1: amazon_zh, mteb_bam, mteb_uig, tweets_ar, tweets_fr, tweets_ge, tweets_hi, tweets_po, tweets_sp.
  • Trained on texts up to 512 tokens and evaluated on texts up to 2,000 characters. The model accepts up to 8,192 tokens, but longer documents are untested; for those, pass truncation=True, max_length=512, or score paragraphs separately.
  • Sentiment is not stance, emotion or toxicity. Don't use it to make decisions about individuals.
endpoints_compatible
mmbert
modernbert
multilingual
onnx
safetensors
sentiment
sentiment-analysis
text-classification
text-embeddings-inference
transformers
transformers.js