At a glance
| Model (ONNX) | Xenova/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 (upstream: MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7) |
|---|---|
| Task / pipeline | zero-shot-classification (multilingual NLI) |
| Backbone & NLI head |
microsoft/mdeberta-v3-base (deberta-v2, 12 layers · 12
heads · 768 hidden · disentangled relative attention) ·
251,000 SentencePiece vocab · max_position_embeddings: 512 ·
id2label: {0: entailment, 1: neutral, 2: contradiction}
|
| Training corpus |
CC100 (100 languages) pretraining + XNLI, multilingual-NLI-26lang-2mil7
(2.73M pairs across 26 non-English languages), MultiNLI, ANLI, FEVER, LingNLI, WANLI
|
| Quantization & size |
q8 (onnx/model_quantized.onnx 338,679,132 B = 338.68 MB +
tokenizer.json 16,316,151 B = 16.32 MB + configs 1,553 B =
355.0 MB first-visit total)
|
| Runtime & backend |
Shared @huggingface/transformers@3.7.5 on WebAssembly (wasm)
in a dedicated module Web Worker
|
| License | MIT |
| Web APIs | WebAssembly, Web Workers, Cache Storage, File & Clipboard APIs |
Run it — 100-Language Zero-Shot Classifier
Initialise mDeBERTa-v3 Multilingual NLI above to classify text locally on your device.
See inside — 3-way NLI logits & 251k SentencePiece pieces
Each candidate label forms a premise-hypothesis pair scored across
id2label = {0: entailment, 1: neutral, 2: contradiction}. Below are the exact
3-way probabilities, raw logits, and the SentencePiece subwords emitted by the 251,000-token
multilingual vocabulary.
| Candidate label | Entailment (prob / logit) | Neutral (prob / logit) | Contradiction (prob / logit) | 3-way split | Pair tokens |
|---|---|---|---|---|---|
| Run classification above to inspect raw 3-way NLI logits. | |||||
Why it matters
Compared to English-only NLI checkpoints or older MNLI+XNLI runs,
mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 adds 2.73 million multilingual
NLI pairs across 26 non-English languages (Arabic, Chinese, Hindi, Japanese, Korean,
Russian, Spanish, German, French, Turkish, Swahili, and more). One 355 MB browser cache
replaces dozens of per-market classifiers.
- Cross-lingual zero-shot routing — maintain one English taxonomy and classify incoming tickets written in Japanese, Arabic, or Hindi with zero translation step.
-
Localized hypothesis framing — swap
hypothesis_templateinto native phrasing when domain nuance needs native grammar. - Multi-label vs mutual exclusion — toggle independent entailment-vs-contradiction scoring for overlapping intents or softmax competition for single-bucket triage.
Use-case ladder
Basics · Multi-Label vs Softmax & Template Localization
Compare independent multi-label vs softmax mutual exclusion, and benchmark English vs
native hypothesis_template across 11 languages.
Practical · Multilingual Ticket & Moderation Batch Router
Drag-drop multiple CSV/JSON/MD/TXT files, run cancellable 10-language triage, and export formula-safe CSV, JSON, and Markdown reports.
Wild · 6-Probe Cross-Lingual NLI Stress Lab
Stress-test premise-hypothesis script swaps, negation reversal, numeric contradictions, code-switching, ambiguous short labels, and template sensitivity.
Multi-model · Topic × Multilingual Sentiment Priority Matrix
Chain mDeBERTa-v3 Multilingual NLI (Stage 1) with DistilBERT Multilingual Sentiment (Stage 2) into a live Topic × Polarity Priority Matrix.
How the API works
import { pipeline } from "@huggingface/transformers";
const classifier = await pipeline(
"zero-shot-classification",
"Xenova/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7",
{ device: "wasm", dtype: "q8" },
);
const out = await classifier(
"新しいソフトウェアのアップデート後、決済ページが読み込めなくなりました。",
["technical software bug", "checkout & payment issue", "positive product review"],
{ hypothesis_template: "This text is about {}.", multi_label: true },
);
// → { labels: [...], scores: [...] }