CoolFace
Modelpublic

Horizon-Labs/multilingual-zeroshot-large

sourceHugging Faceapache-2.0updated 18m agoView on Hugging Face
0likes
Model Card

Multilingual Zero-Shot Classifier (large, 568M)

Classify text in 30+ languages into any labels you choose, with no training. Use it with the transformers zero-shot-classification pipeline, like facebook/bart-large-mnli, but multilingual and with an 8k-token context window (fine-tuned at up to 1,024 tokens).

  • —Multilingual: the text can be in any of the languages below; labels and the hypothesis template stay in English.
  • —Commercially clean: Apache-2.0, trained only on data that allows commercial use (no XNLI, ANLI or other non-commercial sets). See Training.
  • —Most accurate of the family: 568M parameters (bge-m3 / XLM-RoBERTa-large backbone, MIT), 8k context. Use a GPU for throughput; ONNX included for CPU (fp32, and int8 embeddings at 1.5 GB with 99-100% top-label agreement).
  • —Honest numbers: all models below were run by us with the same script and templates.

Try it in the browser: Horizon-Labs/multilingual-zeroshot demo.

Part of Horizon Labs' open models (collection). Source code: github.com/horizon-ai-labs/agent-io-guards.

Quick start

python
from transformers import pipeline

clf = pipeline("zero-shot-classification", model="Horizon-Labs/multilingual-zeroshot-large")
clf("Mi pedido llegó roto y quiero que me devuelvan el dinero.",
    candidate_labels=["refund request", "shipping question", "product praise", "account problem"])
# {'labels': ['refund request', ...], 'scores': [...]}

# several labels can apply at once
clf("The camera is great but the battery dies by noon.", ["camera", "battery", "screen", "price"], multi_label=True)

# a task-specific template often helps
clf("¿Me pones una alarma a las siete?", ["set an alarm", "play music", "weather"], hypothesis_template="The user wants to {}.")

Labels: not_entailment (0) and entailment (1). For each candidate label the model scores whether the text entails "This example is {label}." (or your hypothesis_template). Any NLI-style use works too: pass text and text_pair to a text-classification pipeline.

Evaluation

Accuracy, single-label (multi_label=False: the label with the highest entailment score wins). English templates and labels for every language; the same template for every model (e.g. "This text is about {}." for SIB-200). No model saw these datasets' training splits, except where marked. ‡ = trained partly on data with non-commercial licenses (their -c variants are the commercially usable ones). Script: zeroshot/evaluate_zs.py.

§ = label names seen in our synthetic training data. Since v1.1 our training data includes generic label taxonomies (topics, news sections, Q&A question topics, emotions, sentiment) whose label names overlap these benchmarks' label sets; for Yahoo Answers and AG News almost exactly. No benchmark texts were used, but on these rows our models are not zero-shot with respect to the label names, so compare with care. MASSIVE, Banking77 and XNLI label sets were not used.

Multilingual

**this model** (568M)small (141M)base (308M)bge-m3-zeroshot-v2.0-c (568M)mDeBERTa-v3-base-xnli (278M)xlm-roberta-large-xnli (560M)bge-m3-zeroshot-v2.0 (568M) ‡
MASSIVE intents (60 labels), 16 languages0.5350.4020.5070.4110.3510.4040.611
SIB-200 topics (7 labels), 16 languages §0.8340.7890.8190.7820.6540.5260.837

Per language, mean of MASSIVE and SIB-200:

**this model** (568M)small (141M)base (308M)bge-m3-zeroshot-v2.0-c (568M)mDeBERTa-v3-base-xnli (278M)xlm-roberta-large-xnli (560M)bge-m3-zeroshot-v2.0 (568M) ‡
English0.7160.6540.7080.5960.5370.5040.752
German0.6850.5950.6660.6070.5270.4720.748
French0.7040.6500.7070.6170.5260.4870.753
Spanish0.6580.6020.6510.5610.4880.4560.742
Portuguese0.6790.6170.6820.5850.4910.4460.713
Russian0.6630.6230.6510.5970.4970.4530.724
Polish0.7120.6420.6970.6400.5330.4860.756
Turkish0.6800.6010.6850.6050.4910.4550.713
Arabic0.6660.5510.6280.5590.4760.4330.681
Hindi0.6750.5410.6020.5890.5110.4590.719
Chinese0.7090.6250.6880.6270.5140.4810.760
Japanese0.6950.6510.7140.6370.5300.4920.752
Korean0.7070.5780.6700.6100.4940.4860.714
Vietnamese0.6710.5630.6480.6050.4780.4900.735
Indonesian0.7330.6090.6820.6250.5200.4830.749
Swahili0.5950.4250.5310.4840.4300.3590.573

English

**this model** (568M)small (141M)base (308M)bge-m3-zeroshot-v2.0-c (568M)mDeBERTa-v3-base-xnli (278M)xlm-roberta-large-xnli (560M)bge-m3-zeroshot-v2.0 (568M) ‡bart-large-mnli (407M)deberta-v3-base-zeroshot-v2.0 (184M) ‡
AG News (4) §0.8140.8280.8240.7260.6700.5910.8860.6840.884
Yahoo Answers (10) §0.6580.6230.6400.5640.4970.5290.6540.5860.672
Banking77 (77)0.6230.5340.5550.4300.2870.1660.6950.4800.714
Emotion (6) §0.5110.4420.4830.4760.4830.3450.6770.4630.737
SST-2 (2) §0.8800.8370.8830.8650.8440.8200.9050.9220.947
MASSIVE, English only0.5830.5000.5830.4130.3970.4430.6800.5300.710
SIB-200, English only0.8480.8090.8330.7790.6760.5640.8240.7600.745

NLI

**this model** (568M)small (141M)base (308M)bge-m3-zeroshot-v2.0-c (568M)mDeBERTa-v3-base-xnli (278M)xlm-roberta-large-xnli (560M)bge-m3-zeroshot-v2.0 (568M) ‡
XNLI test, 12 languages (balanced acc.) †0.8000.7600.7920.8250.8450.9920.818

† XNLI is included for reference only: xlm-roberta-large-xnli and mDeBERTa-xnli were trained on XNLI data (the first scores 0.99, which suggests it saw the test sentences). Our models never saw XNLI.

Limitations

  • —English-only models trained with more (partly non-commercial) classification data are better on English topic and emotion benchmarks (e.g. deberta-v3-base-zeroshot-v2.0 on Emotion and Yahoo). If you only need English, compare them on your data.
  • —bge-m3-zeroshot-v2.0 (568M, trained partly on non-commercial data) scores higher on MASSIVE and SIB-200.
  • —Zero-shot accuracy depends a lot on label wording and the template. Use descriptive labels ("request a refund" rather than "refund_req") and try a template that fits your task. The model links explicit wording better than implied categories. Example (small model, multi-label, a gym review not like our training domains): "The machines are always taken after 5pm and half the treadmills are broken, but the coaches really know their stuff. For 60 euros a month I expected cleaner showers." gives equipment 0.99, trainers 0.97, membership cost 0.82, but hygiene only 0.28 and crowding 0.03 (v1.0: trainers 0.56, membership cost 0.58).
  • —Broad labels (e.g. "world news", "education") tend to win over specific ones. Emotions close in meaning (joy / love / surprise) are often confused.
  • —With multi_label=True, scores are independent; tune the threshold on a few examples of your own.
  • —Lower-resource languages (e.g. Swahili) score clearly lower than high-resource ones.
  • —Much of the training data is synthetic (Qwen3.8-27B) or machine-translated.

Training

  • —Backbone: BAAI/bge-m3 (MIT), sequence-pair classification, bf16, max length 1024.
  • —Data (label = does the text entail the hypothesis):
  • —English NLI: MultiNLI (OANC and CC-BY-SA-3.0 parts), SNLI (CC-BY-SA-4.0), WANLI (CC-BY-4.0).
  • —120k MultiNLI/WANLI pairs machine-translated by Qwen3.8-27B into 24 languages, with native and English hypotheses.
  • —Synthetic zero-shot tasks by Qwen3.8-27B: FineWeb-Edu / FineWeb-2 passages (ODC-BY) labelled by topic, genre, audience, tone and purpose with near-miss wrong labels, and ~90k short texts (requests, reviews, tickets, posts, headlines) over 26 task types, 32 domains and 33 languages, each with an invented label set and hypothesis template.
  • —(v1.1) Generic taxonomies by Qwen3.8-27B: 24k new FineWeb / FineWeb-2 passages labelled for topic, text type, sentiment, audience, purpose and news section; ~130k short texts written for fixed label sets (emotion, sentiment, Q&A question topic, news section, customer-message topic, urgency, formality, spam) without using the label words; ~25k reviews in 8 domains mentioning aspects (e.g. "internet", "food") without naming them.
  • —Not used: XNLI, ANLI, FEVER-NLI, any benchmark above.