Generation

Using TokenPrint

Generation mode runs a real autoregressive forward pass via WS /ws/generate and replays the result as a 3D animation. Each operation in the computation graph lights up the corresponding 3D component as it executes.


Op catalog

Before animation begins, the backend sends a complete op catalog describing every operation in the forward pass. For the reference model, the catalog contains 243 ops:

  • 10 ops per layer × 24 layers = 240 layer ops
  • 3 top-level ops: embedding lookup, final norm, vocabulary unembedding

Each op entry includes the op name, layer index, input/output shapes, bias status, and cumulative parameter count. The final op (vocabulary unembedding) shows cumulative parameters used: 630,167,424 (exceeds unique param count due to weight tying — the embedding matrix is counted twice).


Playback controls

ControlAction
Play / PauseStart or pause the animation
Speed slider1× to 16× animation speed
Step buttonsMove one op forward or backward
Layer skipJump to the first op of the next layer
Follow modeAuto-pan camera to the active operation

Prediction game

Before the model reveals each predicted token, the top-k panel offers a prediction game: guess which token the model will produce. Your score depends on whether your guess matches the real argmax. The game is scored against the real torch.argmax output, not a simulation.

Note

TokenPrint uses greedy decoding by default. The prediction game is deterministic — the same prompt always produces the same token sequence.