Executive summary
int-llm-viz makes a complete small integer GPT inspectable in a browser. Four self-contained pages show its weights, recorded inference, shared residual space, and weight contributions. Each page embeds its data and works offline. Model values use BigInt arithmetic and exact decimal readouts; floating-point geometry is labeled separately. The C runtime provides the reference trace, and browser calculations check that trace instead of displaying an unchecked animation. The result connects the integer-computing and model-layout projects through visible, testable examples.
What was built
- An atlas of all nine weight tensors, including exact rounding previews.
- A step-by-step replay of 20 generated names with browser recomputation.
- A view of 62 vectors in the 32-dimensional residual space, with literal axes
- A weight explorer combining 3-D geometry, exact per-weight contributions,
- Reconstructed MLP layouts and a residual-coordinate swap, each replayed
and explicitly derived principal-component projections.
byte layout, and four-dimensional projections.
through the C oracle.
Evidence and validation
The trace harness reports 122 steps with zero logit, key/value-cache, or sampling mismatches and an identical final random state. Browser tests check the same arithmetic, model-loader checksums, and exact decimal formatting. The release procedure also requires deterministic data and page regeneration, browser interactions, and no drift from committed artifacts.
The four neuron orders and hidden-coordinate swap are rebuilt and checked against pinned hashes. Equal output is established through model replay, not inferred from how similar the pictures appear.
Boundaries
This is a visualization for one checkpoint and shape, not a general model inspection framework. Principal components are derived geometry; they do not establish semantic meanings for coordinates. Embedding all data into each page is practical at this scale but would not scale to a large language model.
Repository map and first run
Open the live demo or the committed site/index.html directly in a browser. To regenerate and validate locally:
make
make test
make release-check additionally requires a browser and fails if regeneration changes the committed data or pages. SOURCE_PROVENANCE.md identifies copied components, upstream pins, and the independent implementation process.