跳到主要内容Skip to main content

上下文窗口的代价Context Cost

Context Cost

  • 模型能力Model capabilities
  • 第四站 · 看懂Station 4 · Under the Hood
解决什么问题What problem it solves

上下文开得越大越慢越贵,不是免费扩容。A larger context window is slower and more expensive — it is not free capacity.

这是什么What it is

窗口变大意味着注意力计算量和 KV 缓存占用同步上升。

A bigger window means attention computation and KV cache memory both grow.

为什么需要知道Why it matters

解释了一个反直觉现象。把所有资料一次性塞进去,往往不如做 RAG 分批检索。It explains a counter-intuitive result: pasting in everything at once is often worse than retrieving in batches with RAG.

出处Sources
  • RAG server 的做法How a RAG server does it (context7) ↗