question-answering · multilingual text · WASM q8 · 333.45 MB · MIT

mDeBERTa-v3-base SQuAD2 — 100-Language Extractive QA

Microsoft's 12-layer multilingual DeBERTa-v3 backbone fine-tuned on SQuAD 2.0 (timpal0l/mdeberta-v3-base-squad2 via onnx-community/mdeberta-v3-base-squad2-ONNX, 333.45 MB q8 WASM, MIT) extracts exact answer spans across 100 CC100 languages — including cross-lingual English↔German/French/Spanish/Chinese queries — and routes unanswerable traps to [CLS] abstention locally in a Web Worker.

At a glance

Task / pipeline
question-answering
Architecture
DebertaV2ForQuestionAnswering (deberta-v2, 12L, 768d, 251k SPM)
Backend / dtype
WebAssembly (CPU) · q8 (onnx/model_quantized.onnx)
Download size
333.45 MB (317.13 MB ONNX + 16.32 MB SPM tokenizer)
SQuAD 2.0 Dev
80.88 EM / 84.01 F1 · 82.10% NoAns EM
License / APIs
MIT · WASM + Web Workers + CSS Custom Highlight API

1 · Run it & See Inside (100% Local)

Pick a multilingual or cross-lingual passage, click any answerable or trap question chip, or drop your own .txt / .md file.

Drop a local .txt / .md passage here — processed offline in your browser.

Initialise mDeBERTa-v3-base SQuAD2 above to extract multilingual spans or detect unanswerable traps.

Waiting for model

—

Ask a question once the model is ready to compare top span probability against SQuAD v2 [CLS] null probability.

Top Span Score—
Null P([CLS])—
Char Offsets—
Latency (WASM)—
Tokens / Window—
Finite Check—

Highlighted Source Passage

Primary answer uses semantic <mark>; hovering or focusing candidate spans paints a transient CSS.highlights range without mutating the DOM.

Top-K Candidate Spans vs [CLS] Null

Hover to preview via CSS.highlights or click any candidate to select its citation.

Why it matters

By combining Microsoft's disentangled relative-attention mDeBERTa-v3 encoder (251,000-token SentencePiece vocabulary across 100 CC100 languages) with SQuAD 2.0 abstention training, one browser-cached model answers questions across languages without hallucinating missing facts:

Use-case ladder

How the API works

Load via Transformers.js pipeline("question-answering", ...) in a module Web Worker, then pair pipeline spans with a direct DebertaV2ForQuestionAnswering logit pass over [0, ctxStart..ctxEnd] to recover P_start([CLS]) * P_end([CLS]):

import { pipeline } from "@huggingface/transformers";

const qa = await pipeline(
  "question-answering",
  "onnx-community/mdeberta-v3-base-squad2-ONNX",
  { device: "wasm", dtype: "q8" },
);
const answers = await qa(
  "Where did Wilhelm Conrad Röntgen discover X-rays?",
  "Wilhelm Conrad Röntgen entdeckte am 8. November 1895 in Würzburg die nach ihm benannten Röntgenstrahlen.",
  { top_k: 5 },
);

Show the code

Inspect the exact vanilla ES module functions powering this route — no build step, no hidden API calls.

View worker.js · ensureLoaded() (lines 73–115)
View mdeberta-core.mjs · decideAbstention() (lines 199–232)
View mdeberta-client.js · highlightFocusRange() (lines 488–536)

References