[Image blocked: image/png]
[Image blocked: Multilingual Quality vs Throughput]
GLiClass Multilang: Efficient multilingual zero-shot and few-shot multi-task model via sequence classification
GLiClass is an efficient zero-shot sequence classification model designed to achieve SoTA performance while being much faster than cross-encoders and LLMs, while preserving strong generalization capabilities.
The model supports text classification with any labels and can be used for the following tasks:
- Topic Classification
- Sentiment Analysis
- Intent Classification
- Reranking
- Hallucination Detection
- Rule-following Verification
- LLM-safety Classification
- Natural Language Inference
✨ What's New in GLiClass Multilang
- Multilingual Training — Natively trained on 20 languages: Swedish, Norwegian, Czech, Polish, Lithuanian, Estonian, Latvian, Spanish, Finnish, German, French, Romanian, Italian, Portuguese, Dutch, Ukrainian, Hindi, Chinese, Arabic, and Hebrew.
- Cross-lingual Classification — Labels and input texts can be in different languages; classify a German document with English labels, or mix languages freely across inputs and labels.
- CrossAttn Scorer — A new cross-attention scorer enables more efficient pooling independently for each label with unpadding and flash-attn.
- Hierarchical Labels — Organize labels into groups using dot notation or dictionaries (e.g.,
sentiment.positive, topic.product).
- Few-Shot Examples — Provide in-context examples to boost accuracy on your specific task.
- Label Descriptions — Add natural-language descriptions to labels for more precise classification.
- Task Prompts — Prepend a custom prompt to guide the model's classification behavior.
See the GLiClass library README for full details on these features.
Installation
Quick Start
Multilingual & Cross-lingual Capabilities
Natively trained on 20 languages. Labels and texts can be in different languages.
Same language (German):
Cross-lingual (French text, English labels):
Cross-lingual (Arabic text, English labels):
Cross-lingual (English text, Spanish labels):
General Examples
1. Topic Classification
With hierarchical labels
2. Sentiment Analysis
With a task prompt
3. Intent Classification
4. Natural Language Inference
Represent your premise as the text and the hypothesis as a label. The model works best with a single hypothesis at a time.
5. Reranking
Score query–passage relevance by treating passages as texts and the query as the label:
6. Rule-following Verification
Include the domain and rules as part of the text:
Benchmarks
Model Overview
Summary across all evaluated multilingual-capable models (zero-shot, no fine-tuning). Speed averaged over all label counts and text lengths at batch_size=8 on NVIDIA RTX PRO 6000 Blackwell.
Multilingual avg F1 is the mean of 6 dataset-level scores (GermEval2017, MASSIVE, PolygloToxicityPrompts, SIB-200, TextDetox, TweetSentiment). Models without multilingual results (—) were only evaluated on English datasets.
F1 scores on zero-shot text classification (no fine-tuning on these datasets):
Table A: GLiClass Multilang (macro F1)
Table B: Baselines (macro F1)
Table C: GLiClass-V1 Multitask (macro F1)
Multilingual Benchmarks
Macro F1 averaged per dataset across all evaluated languages:
Per-language macro F1 (16-language fair comparison on massive + sib200):
Throughput
[Image blocked: English Quality vs Throughput]
Throughput (samples/sec), batch_size=8, GPU: NVIDIA RTX PRO 6000 Blackwell. Averaged over text lengths (64 / 256 / 512 tokens).
NLI models (bge-m3, mDeBERTa) run one forward pass per label — throughput drops linearly with label count. GLiClass and GLiNER2 encode all labels in a single pass, so throughput stays nearly flat.
Citation