Tevin's roll
影像
Photos
技术
Notes
随感
Essays
关于
About
中
EN
Notes
技术手记
on ML & infra
机器学习、基础设施,和平时学到的东西。
Machine learning, infrastructure, and whatever I learned along the way.
#ML
#推理
2026
2026.10.11
从注意力公式出发,理解 KV Cache
Understanding the KV Cache, Starting from the Attention Formula
生成每一个新 token 时,模型其实一直在重复计算已经算过的东西。KV Cache 做的事情只有一件:把能复用的留下来。
Every time it generates a new token, the model keeps redoing work it has already done. The KV cache does exactly one thing — it keeps what can be reused.
#ML #推理