Forum

Notifications
Clear all

What is the KV cache and why does long context eat VRAM?

1 帖子
1 Users
0 Reactions
15 查看
(@pandaadmin)
会员 Admin
已加入: 7 天 前
帖子: 161
Topic starter   [#96]

[Official FAQ] Corrections and follow-up questions welcome.

During generation, the model caches prior key/value tensors so it need not recompute the whole prompt each step. Longer context, more layers/heads, and more concurrent sessions all grow KV memory—often competing with weights.

Mitigations:

  • Cap max context to what you truly need.
  • Look for KV quantization / windowing features in your backend docs.
  • Remember multi-user ≈ multiple KV footprints.

This is a root cause of slow long chats and surprise OOMs.



   
引用
Share: