上下文窗口与 KV Cache:长文本为什么贵

长文本贵有两个原因——注意力计算量随序列长度平方增长,KV Cache 显存占用随序列长度线性增长且数额可观。API 按 token 计费,本质上就是把这些算力和显存成本折算给你。理解这两笔账,你对"为什么 128K 窗 …

lbk_runtime@engineering-notes: ~ hover 展开 · Esc 收起
Last login: 2026-11-18 21:06:07 from console $ whoami LBK_Runtime — 后端 & AI 工程师,写 engineering-notes $ neofetch site: engineering-notes author: LBK_Runtime posts: 93 篇 · tags: 44 个 rss: /index.xml hint: 输入 help 查看可用命令
lbk_runtime@engineering-notes:~$