Chapter 032 / 5
Attention Efficiency and Long Context
Implement a KV cache + incremental single-token decode loop for a small transformer
Medium
Target interface
class CachedAttentionComplete the starter code in the editor. Any correct approach is accepted.
Hints0 / 2
Reference solution
Your own code stays in the editor.