Skip to main content
NewEpisode 3a is out: Carry the conversation onWatch →
Foundations: how a machine speaks · 0e

The code predictor: 15 small steps inside each frame

After the talker picks code 0, a 5-layer transformer takes 15 more small steps inside the same frame. A two-code toy comes first: why codes depend on each other, what changes when each is picked on its own (mismatched pairs go from 10 % to 48 %), what "like N equal choices" means, and why chances are added as logs. The predictor gets a two-row brief (the talker's last hidden state and code 0's row); each pass, its own head draws the next code, and that code's row is fed back in. In frame 5, head 0's favourite was 651; the draw picked 999. A real test: with code 1 = 999, head 1's favourite is 1296 (17.9 %); with 651 it becomes 232. The KV cache grows from 2 rows to 16 and is empty again at the next frame. With each code picked on its own, the predictor's own total log-probability drops from −799…−859 to −1,782…−1,955. On CPU the 285 small passes cost more than the 20 big ones. Then the same loop, line by line, in sglang-omni's code_predictor_forward_incremental.

Up next0f · From codes back to sound→