LESSON 29.06 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Prefix sharing and copy-on-write
Watch six requests share one system prompt's KV blocks, then copy before a write.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 29.06 · KV BAYPREFIX 10 TOKENS · 2 FULL BLOCKS + 2 SLOTS
01
Stage 1 of 5 · One prefix
The server computes the 10-token system prompt once. It fills 2 blocks and 2 slots of block 2.
Explain it simply
All six prompt rows start with the same ten words. A token's keys and values depend only on the tokens before it. So these ten tokens get the same cache in every request. The server works them out once and keeps them in the block grid.
Six prompt rows share their first 10 tokens. Blocks 0–2 hold them, with a count of 1.
cached tokens: system prompt strong, question faintfree slotdashed: token not in the cachereference countcopyanother request's token, or a preemption
Toy: 29.C1's 6 requests, a 10-token system prompt, 128 slots
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The prompt fills F whole blocks and P slots of one more.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 2 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.