LESSON 29.08 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
KV-cache offloading
Watch idle chat caches leave a full GPU for CPU memory and NVMe, then return.
Needs29.07 Prefix caching
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.08 · KV BAYSTEP 5 · GPU 32/32 · R2 IDLE
01
Stage 1 of 6 · Idle caches
R2 has its answer, and its 5 blocks stay on the GPU for the follow-up. The GPU is full.
Explain it simply
Each chat sends a follow-up 8 steps after its answer. The server keeps a finished chat's cache, its keys and values, on the GPU so the follow-up can reuse it. R2's blocks turn to outlines: idle. Now 32 of the 32 blocks are taken.
Step 5. The GPU grid has 32 of 32 blocks taken. R2's 5 blocks are idle.
KV blocks: filled running, outlined idlefree blockthrown away or computed again; dashed: waitingtime cursor, link speedtime to bring a cache back
Toy: 29.C1's 6 chats with one follow-up each; 32 GPU blocks; an 8B model
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A cache of n tokens takes n over 4 blocks, rounded up.
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.