Before the First Token
What a Cache Saves
A key/value cache stores earlier calculations so a language model can reuse them. Keys help match a new token to relevant earlier tokens; values carry the information retrieved from those matches.
- 1
Compute a prefix
→ - 2
Retain its keys and values
→ - 3
Append a token
→ - 4
Reuse only compatible state
By the end of this lesson
You’ll compare cached and repeated calculations and explain the work a cache saves.