Walkthrough

Using TokenPrint

Walkthrough mode is a chaptered, interactive explanation of a transformer forward pass. Clicking Walkthrough triggers a POST /analyze call on the example sentence (“The cat sat on the mat.”) and uses the real results to populate every chapter.


Chapters

#ChapterWhat it shows
1OverviewHigh-level architecture diagram, model metadata, total parameter count.
2TokenizationReal token chips with vocabulary IDs for the example sentence. Language switcher showing tokenization in multiple languages.
3EmbeddingPCA projection of the 7 token embeddings into 3D. Clustering shows semantic structure.
4RMSNormWorked RMSNorm formula with real input values and gamma weights from layer 0.
5Self-AttentionAttention weight heatmap (7×7) for layer 0, head 0. Strongest link labeled (“cat” → “The”, weight 0.864). Head selector.
6MLPSwiGLU funnel geometry with gate, up, and down projection labels and real dimensions (4864 × 896).
7Softmax & OutputTop-k probability bar chart from the logit lens. Real model prediction for the example sentence. Prediction game.

Each chapter has a Continue and Skip Back button in the right panel. The sidebar shows a chapter list with the current chapter highlighted. A progress indicator shows Chapter N of 7.


Model scale selector

Each chapter includes a model scale selector (Tiny / Small / Medium / Large) that adjusts the reference numbers in the explanation text to the selected scale class. The 3D geometry scales proportionally. All numbers at each scale are derived from real model configurations, not interpolated.