At a glance
| Upstream & ONNX HF repos | MoritzLaurer/deberta-v3-large-zeroshot-v2.0 → onnx-community/deberta-v3-large-zeroshot-v2.0-ONNX (base: microsoft/deberta-v3-large) |
|---|---|
| Task / pipeline | zero-shot-classification (2-class NLI cross-encoder) |
| Backbone & NLI head |
deberta-v2 (DebertaV2ForSequenceClassification) · 24
layers · 1024 hidden · 16 heads · 4096 FFN · 304M backbone + 131M vocab (435M
total) · id2label: {0: "entailment", 1: "not_entailment"}
|
| Tokenizer & context |
DebertaV2Tokenizer (SentencePiece vocab_type: "spm",
128,100 vocab, [CLS]/[SEP],
model_max_length: 512)
|
| Quantization & size |
int8 (onnx/model_int8.onnx 538,833,918 B /
538.8 MB; identical oid to model_quantized.onnx +
tokenizer.json 8.65 MB + configs 3.35 KB = 547.5 MB
total)
|
| Runtime & backend |
Shared @huggingface/transformers@3.7.5 on WebAssembly
(wasm) in a dedicated module Web Worker
|
| License | MIT (base model MIT; non--c mix includes MNLI, FEVER, ANLI, WANLI, LingNLI & Mixtral v4) |
| Web APIs | WebAssembly, Web Workers, Cache Storage, File & Clipboard APIs |
Run it — 2-Class Zero-Shot Classifier
Initialise DeBERTa-v3-Large Zero-Shot v2.0 above to classify text locally on your device.
See inside — SentencePiece tokens & 2-class entailment logits
onnx-community/deberta-v3-large-zeroshot-v2.0-ONNX encodes each
[CLS] premise [SEP] hypothesis [SEP] pair with a 128,100-token SentencePiece
vocabulary (▁ marks word boundaries) and emits raw 2-class logits for
id2label = {0: "entailment", 1: "not_entailment"}.
DeBERTa SentencePiece token sequence (first hypothesis pair)
Run classification above to inspect raw DeBERTa SentencePiece tokens.
2-Class entailment vs not_entailment logit margin bar
| Candidate label | Entailment (prob / logit) | Not-entailment (prob / logit) | Logit Δ | 2-class margin bar | Pair tokens |
|---|---|---|---|---|---|
| Run classification above to inspect raw 2-class NLI logits. | |||||
Why it matters
Compared against BART-large-MNLI (0.497 mean macro-F1 across 28 classification datasets),
deberta-v3-large-zeroshot-v2.0 reaches 0.673 zero-shot
(and 0.846 few-shot) using disentangled relative attention and a 24-layer
backbone trained on 500+ Mixtral-generated tasks plus MNLI, FEVER, ANLI, WANLI, and LingNLI.
- No server round-trip for sensitive text — audit logs, clinical notes, legal clauses, and corporate support tickets stay strictly in browser memory.
-
Dynamic binary NLI head — collapses neutral and contradiction into a
clean
entailmentvsnot_entailmentprobability pair for calibrated multi-label thresholds. - Honest 538.8 MB trade-off — larger and slower per pass than the 95.9 MB XSmall sibling, which is why Multi-model compares them side-by-side on hard ambiguity.
Use-case ladder
Basics · Template Framing & Calibration Lab
Measure how {} hypothesis wording shifts entailment odds and contrast
single-label softmax against independent 2-class P(entailment) calibration.
Practical · Batch Tagger & CSV Column Picker
Upload multiple CSV/JSONL/JSON/MD/TXT files, pick any RFC 4180 CSV column, stream cancellable FIFO triage, and export OWASP CSV, Markdown, or JSON.
Wild · Cross-Domain, Overlap & Negation Lab
Probe English vs polyglot distractors, adversarial label overlap, and double-negation
or unless clauses with mid-suite cancellation.
Multi-model · XSmall (95.9 MB) vs Large v2.0 (538.8 MB)
Compare lightweight DeBERTa-v3-XSmall head-to-head against DeBERTa-v3-Large v2.0 on hard double-negation, contract exception, and root-cause ambiguity.
How the API works & source inspection
import { pipeline } from "@huggingface/transformers";
const classifier = await pipeline(
"zero-shot-classification",
"onnx-community/deberta-v3-large-zeroshot-v2.0-ONNX",
{ device: "wasm", dtype: "int8" },
);
const out = await classifier(
"Last week I upgraded my iOS version and my phone has been overheating.",
["mobile", "website", "billing", "account access"],
{ hypothesis_template: "This customer support message is about {}.", multi_label: false },
);