Basics Β· Template Framing & Calibration Β· 538.8 MB WASM int8 Β· MIT

Hypothesis Template & Multi-Label vs Single-Label Calibration Lab

Every label becomes a natural-language claim via hypothesis_template ({}). Measure how framing shifts 2-class entailment odds and compare forced-sum single-label softmax against independent 2-class P(entailment) calibration.

1. On-device model

Initialise DeBERTa-v3-Large Zero-Shot v2.0 above to run the template crafting & calibration labs.

2. Hypothesis Template Framing Lab

Score the identical passage and labels across four editable hypothesis_template patterns using onnx-community/deberta-v3-large-zeroshot-v2.0-ONNX. Watch how framing alters entailment odds and can flip the top label.

Consensus–
Rank flip?–
Top-1 spread–
Total latency–
NaN count–
Hypothesis template comparison showing top label, score, entailment logit, and runner-up
Template Top-1 label Top-1 score Entailment logit Runner-up Latency
Run the 4-template comparison above.

3. Multi-Label vs Single-Label Calibration Lab

In single-label mode, Transformers.js runs softmax() across all candidate entailment logits β€” forcing scores to sum to 100% even when no label fits. In multi-label mode, each label uses independent 2-class softmax([not_entailment, entailment])[1].

Single sum–
Multi sum–
Labels ≥ 50% (multi)–
Latency–
NaN count–
Calibration comparison table between single-label softmax and multi-label 2-class entailment probability
Label Single-label softmax Multi-label P(entail) Ξ” (Multi βˆ’ Single) 2-class logit margin
Run Calibration Comparison above.

4. Inspect sensitivity, calibration & canvas helpers

Show the code Β· deberta-v3-large-zs-core.mjs β€” summarizeTemplateSensitivity()
Show the code Β· worker.js β€” runCalibrationComparison()
Show the code Β· deberta-v3-large-zs.js β€” drawCalibrationCanvas()