basics · see inside 12-layer RoBERTa-Base · start/end logits & calibration · CC-BY-4.0

Inside 12-Layer RoBERTa-Base SQuAD2

Every extractive QA pass emits two 512-position vectors from the 12-layer encoder: start_logits and end_logits. Because deepset/roberta-base-squad2 (onnx-community/roberta-base-squad2-ONNX, 125.26 MB q8 WASM, CC-BY-4.0) was fine-tuned on SQuAD v2.0, token index 0 (<s>) serves as the unanswerable null sink. Inspect live token logits vs <s> and sweep threshold τ across 6 probes (including a subtle entity-swap trap).

1 · Initialise RoBERTa-Base SQuAD2

2 · Raw Start/End Logits vs <s> Null Logit Inspector

Initialise RoBERTa-Base 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 · 6-Probe SQuAD v2 Calibration Curve

Run all 6 labeled probes (3 answerable + 3 unanswerable / subtle entity-swap traps) live through 12-layer RoBERTa-Base SQuAD2, then drag threshold τ across 0.00..1.00 to inspect accuracy, hallucination rate (FP), and false abstention rate (FN).

Ready to calibrate once RoBERTa-Base 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 · runLogitPass() (lines 120–255)
View roberta-qa-core.mjs · computeCalibrationCurve() (lines 312–375)
View roberta-qa.js · drawCalibrationCanvas() (lines 741–867)