Inference trace — 20 exact generations, every integer visible

Q16.48 fixed-point GPT (32d / 4 heads / 1 layer), replayed step by step from the C harness record and re-derived in exact BigInt arithmetic in this page. Press ? for keys and encodings.

Samples

⌀ = BOS (token 26): the start marker; a step that chooses ⌀ ends the sample (that step is recorded but ⌀ never enters the text).

Residual stream — six 32-cell vectors, exactly as computed

hover a cell, or focus the grid and use arrow keys.

Attention — per head: weight bars over key positions; thin strip = pre-softmax scores

hover a bar, or focus a head and use ← →.

MLP hidden units — h_pre = fc1 · xn_mlp, 128 units (16×8, row-major)

hover a unit, or focus the grid and use arrow keys. R toggles pre/post ReLU.

Output & sampling — 27 logits, exact ×2 temperature scale, integer softmax, one RNG draw

hover a row, or focus the grid and use ↑ ↓.

Verification

Every panel shows the recorded values written by the C harness (tools/trace_harness.c, which runs the unmodified upstream runtime as its oracle). This page independently recomputes the full integer forward pass and the sampling chain in BigInt — same shifts, same truncations, same iteration counts as fp_math.h / microgpt_int.c — and asserts equality field by field. So every number on screen is simultaneously a recorded value and a recomputed one.