basics · see inside · start/end logits & abstention calibration · CC-BY-4.0

Inside TinyRoBERTa-SQuAD2

Every extractive QA pass predicts two probability distributions over the input sequence: P(start) and P(end). Because deepset/tinyroberta-squad2 (onnx-community/tinyroberta-squad2-ONNX, 82.14 MB q8 WASM, CC-BY-4.0) was trained on SQuAD v2.0, token index 0 (<s>) acts as the dedicated no-answer sink. Compare an answerable query with an unanswerable trap, inspect every token logit, and sweep the abstention threshold across 6 live probes.

1 · Initialise TinyRoBERTa-SQuAD2

2 · Token Start/End Logits & Offset Inspector

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

Top Span Score—
Null P(<s>)—
Null Logit Sum—
Best Span Logit Sum—
Char Range [s..e]—
Finite Check—

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 TinyRoBERTa-SQuAD2, then drag the threshold slider τ to see how cleanly SQuAD v2 separates real answers from impossible questions with 0% hallucinations.

Ready to calibrate once TinyRoBERTa-SQuAD2 is initialised.

Accuracy at τ—
Hallucination Rate (FP)—
False Abstention (FN)—
Abstention Recall—
Optimal Threshold—
Sweep Time—
Probe Question Ground Truth Top Span Span Score Null P(<s>) Outcome at τ
Run the calibration sweep to populate live per-probe scores.

4 · Show the code

View worker.js
View qa-core.mjs
View qa.js