basics Β· see inside Β· start/end WordPiece logits & Ο„ calibration Β· MIT

Inside MobileBERT SQuAD v2

Every extractive QA pass predicts two probability distributions over the input sequence: P(start) and P(end). Because csarron/mobilebert-uncased-squad-v2 (onnx-community/mobilebert-uncased-squad-v2-ONNX, 26.90 MB q8 WASM, MIT) was fine-tuned on SQuAD v2.0, token index 0 ([CLS]) acts as the dedicated no-answer sink. Compare answerable vs unanswerable start/end heatmaps and sweep the abstention threshold Ο„ ∈ [0.00, 1.00] at ~60 ms per question.

1 Β· Initialise MobileBERT-SQuAD2

2 Β· WordPiece Start/End Span Logits & [CLS] Sink

Initialise MobileBERT-SQuAD2 above to inspect start/end token logits and character offsets.

Top Span Scoreβ€”
Null P([CLS])β€”
Null Logit Sumβ€”
Best Span Logit Sumβ€”
Char Range [s..e]β€”
Finite Checkβ€”

DOM mirror: run logit inspection to read peak start/end WordPiece tokens and [CLS] null mass.

Character Offset Span Inspector

Click any top-K candidate on the right to inspect its exact UTF-16 character range.

Top-K Span Probability Chart

3 Β· SQuAD v2 Abstention Threshold Calibration Curve

Run all 6 labeled probes (3 answerable + 3 unanswerable traps) live through MobileBERT-SQuAD2, then sweep Ο„ ∈ [0.00, 1.00] to inspect precision vs abstention tradeoffs.

Ready to calibrate once MobileBERT-SQuAD2 is initialised.

Accuracy at Ο„β€”
Precision at Ο„β€”
Hallucination (FP)β€”
False Abstain (FN)β€”
Optimal Thresholdβ€”
Sweep Timeβ€”
Per-probe live MobileBERT SQuAD v2 calibration outcomes
Probe Question Ground Truth Top Span Span Score Null P([CLS]) Outcome at Ο„
Run the calibration sweep to populate live per-probe scores.

4 Β· Show the code

Show the code β€” worker.js raw WordPiece start/end & [CLS] logit pass
Show the code β€” qa-core.mjs Ο„ ∈ [0.00, 1.00] precision/abstention sweep
Show the code β€” qa.js zero-innerHTML <mark> highlighter & probability bars