Basics Β· Multi-Label vs Softmax & Template Localization Β· 355.0 MB WASM q8 Β· MIT

Multi-Label Scoring & Localized hypothesis_template Impact

Explore the two decisions that control zero-shot accuracy on Xenova/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7: 1) independent multi_label scoring vs mutual-exclusion softmax, and 2) English vs native-language hypothesis_template across 11 languages and 7 scripts.

1. On-device model

Initialise mDeBERTa-v3 Multilingual NLI above to run the scoring mode & localization labs.

2. Multi-label vs Single-label Softmax Mutual Exclusion

In single-label mode, candidate entailment logits compete through softmax (sum = 100%). In multi_label: true, each label runs an independent 2-way softmax over [contradiction, entailment] so multiple true facets stay high simultaneously.

Single-label top-1–
Multi-label β‰₯50%–
Softmax entropy–
Total latency–
NaN count–

Single-Label Softmax (Mutual Exclusion)

Run comparison above to see competing softmax probabilities.

Multi-Label Independent ([contra, entail])

Run comparison above to see independent entailment confidence.

3. hypothesis_template Localization Impact Across Languages

Tests each language scenario twice on the exact same text and native labels: once with the English wrapper "This text is about {}." and once with a grammatically native wrapper (e.g., German, Japanese, Arabic, Hindi, Russian, Korean).

Scenarios run–
EN-template accuracy–
Native-template accuracy–
Mean native Δ–
Rank flips–
NaN count–
English vs native hypothesis_template results per language
Lang Expected label English template winner Native template winner Native Ξ” Latency
Run a single language or the 11-language matrix above.

4. Inspect localization summary & chart helpers

Show the code Β· mdeberta-core.mjs β€” summarizeTemplateLocalization()
Show the code Β· mdeberta.js β€” drawTemplateCompareCanvas()