LESSON 29.07 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Prefix caching
Watch seven prompts reuse the KV blocks of their shared first tokens.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 29.07 · KV BAYPROMPT TOKENS 123 · SYSTEM PROMPT 70
01
Stage 1 of 6 · Shared prompt
Every prompt starts with the same 10-token system prompt. Here 70 of 123 prompt tokens are that system prompt.
Explain it simply
Each row is one request's prompt, cut into blocks of 4 tokens. Solid teal cells are the system prompt, the fixed instructions, and faint teal cells are each question. An ochre cell is a time stamp, and cobalt cells are R1's earlier answer. Each row repeats the system prompt, so the server computes its keys and values again and again.
Seven prompt rows in blocks of 4 tokens. 70 of 123 tokens are the shared system prompt.
prompt tokens, blocks in usehashes, R1's answer tokenstime stampmiss, evicted blockcached free blockempty block
Toy: 29.C1's 6 requests on 32 blocks of 4, plus R7, R1's second turn
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A prompt is the system prompt plus a question.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.