At a glance
| Upstream & ONNX | MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli · ONNX: Xenova/DeBERTa-v3-base-mnli-fever-anli (base: microsoft/deberta-v3-base) |
|---|---|
| Task / pipeline | zero-shot-classification (3-class NLI cross-encoder) |
| Backbone & NLI head |
deberta-v2 (DebertaV2ForSequenceClassification) · 12
layers · 768 hidden · 12 heads · 3072 intermediate ·
id2label: {"0":"entailment","1":"neutral","2":"contradiction"}
|
| Tokenizer & context |
DebertaV2Tokenizer (SentencePiece vocab_type: "spm",
vocab_size: 128,100, [CLS]/[SEP],
model_max_length: 512)
|
| Training & eval |
763,913 pairs across MultiNLI + FEVER-NLI + ANLI · card accuracy: MNLI-m
0.903, FEVER-NLI 0.777, ANLI-all 0.579,
ANLI-r3 0.495
|
| Quantization & size |
q8 (onnx/model_quantized.onnx 244,291,931 B +
tokenizer.json 8,656,551 B + configs 1,605 B =
252,950,087 B / 252.95 MB)
|
| 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 — 3-Class Zero-Shot Classifier
Initialise DeBERTa-v3-Base MNLI/FEVER/ANLI above to classify text locally on your device.
See inside — raw 3-class entailment, neutral & contradiction logits
Xenova/DeBERTa-v3-base-mnli-fever-anli outputs a 3-element logit vector
ordered by id2label = {0: "entailment", 1: "neutral", 2: "contradiction"}.
In single-label mode, ZeroShotClassificationPipeline runs
softmax() over entailment logits across labels; in multi-label
mode it runs softmax([contradiction, entailment])[1] independently per label
while preserving the full 3-way distribution below.
| Candidate label | Entailment [0] | Neutral [1] | Contradiction [2] | E − C Δ | 3-class split | Pair tokens |
|---|---|---|---|---|---|---|
| Run classification above to inspect raw 3-class NLI logits. | ||||||
Why it matters
Training on MNLI (multi-genre entailment), FEVER-NLI (Wikipedia claim verification), and ANLI (adversarial multi-round deduction) gives this 12-layer DeBERTa-v3-base checkpoint strong sensitivity to contradiction, negation, and unstated neutral claims without any fine-tuning.
-
Explicit Neutral state — unlike 2-class zero-shot heads, 3-class logits
distinguish unsupported extrapolations (
neutral) from direct falsehoods (contradiction). - ANLI adversarial robustness — trained on 763,913 NLI pairs, outperforming many larger models on Adversarial NLI benchmarks per the model card.
- Unified zero-shot + NLI verifier — power custom-label routing and direct premise-hypothesis fact-checking from one cached 252.95 MB q8 ONNX artifact.
Use-case ladder
Basics · 3-Way Fact Verification & Template Ablation
Verify MNLI, FEVER-NLI, and ANLI premise-hypothesis pairs with multi-step evidence chains, plus 4-template ablation and single-vs-multi-label calibration.
Practical · Batch Claim & Ticket Router
Upload CSV, JSONL, JSON, MD, or TXT queues, stream cancellable FIFO triage with escalation thresholds, and export OWASP formula-safe CSV + JSON.
Wild · Adversarial Traps, Double Negation & Dilution
Probe double negation, distractor clause traps, entity swaps, adversarial framing duels, and 3 → 8 → 12 distractor label dilution.
Multi-model · Arctic Embed Retrieval → DeBERTa-Base NLI Verifier
275.9 MB 2-stage pipeline: Stage 1 Arctic Embed XS (22.97 MB) retrieves Top-K evidence passages before Stage 2 DeBERTa-v3-Base runs 3-class NLI verification.
How the API works & source inspection
import { pipeline } from "@huggingface/transformers";
const classifier = await pipeline(
"zero-shot-classification",
"Xenova/DeBERTa-v3-base-mnli-fever-anli",
{ device: "wasm", dtype: "q8" },
);
const out = await classifier(
"Angela Merkel served as Chancellor of Germany and led the CDU.",
["politics", "economy", "entertainment", "environment"],
{ hypothesis_template: "This text is about {}.", multi_label: false },
);