The non-obvious insight is that speculative decoding's losses under load come from schedule layout, not speculation itself, which reframes how serving stacks should batch looped-model work. Inference engineers running concurrent decoding — especially with long contexts — gain a drop-in schedule that preserves exact outputs while beating per-point tuned baselines. The closed-form admission rule, adapted from inventory theory, is a practical knob that needs calibration only once per engine.
#KV cache
内存价格暴涨的现在,这条实测很及时。vLLM 和 AMD 把 KV 缓存直接塞进企业级 SSD,96 并发只比纯内存慢 0.2%,还省下约 1.7 万美元。跑 Kimi-K3 这类智能体服务、预算卡在内存上的团队可以照着原文复现一遍。
The counterintuitive finding is that sequential NVMe reads are fast enough to serve KV cache directly, so the DRAM tier may be an unnecessary cost layer in inference stacks. Platform and inference engineers sizing serving clusters for agent or long-context workloads should benchmark direct-to-NVMe offloading before provisioning host memory. The AMD MI355X hardware angle also gives non-NVIDIA GPU clusters a reference point for storage-tiered serving.
Skipping the DRAM tier changes the cost math for long-context inference: SSD bandwidth is now sufficient to serve KV cache directly on some stacks. Teams running vLLM on AMD MI355X hardware, or budgeting cache memory for high-session-count serving, can benchmark an NVMe-only tier against DRAM using the published blog setup. The result is also a rare public AMD-side datapoint against NVIDIA-centric serving benchmarks.
做推理优化或自托管 LLaMA 的开发者可以看这篇:不按请求一刀切砍层数,而是逐 token 路由,一个模型权重就能同时服务高低预算请求,混合 batch 下 TPOT 最多降 21.2%,比传统层跳过更省心。
Gergely Orosz 说网上讲编程 Agent 成本的文章信息过时了,他正在和 Theo 合作写一篇讲清 KV cache 机制的深度文章。写 Claude Code、Cursor 这类工具的人可以蹲一下,能帮你理解 token 成本到底怎么算。
如果你自己用 GPU 托管 LLM,多轮对话每次都重复算上下文纯属烧钱。AWS 把这套 KV 缓存配置做成了 agent skill,从编码 agent 里一句话就能让 agent 帮你把 ElastiCache 缓存搭好,官方数据显示成本省最多 40%、首 token 快最多 80%。自己搭 vLLM 服务的话可以照着这篇实操一下。
SGLang 团队新出的缓存调度方案,专门解决混合架构模型缓存难管的问题。实测 agent 吞吐最高翻倍,TTFT 提升三倍。自己搭服务跑 agent 或长上下文的开发者直接能抄作业。
做推理服务或部署混合架构模型(比如线性注意力+循环层这类)的团队该看看。它不用切分 prefill 就能在可预测的边界处建精确缓存,TTFT 最高降 8.9 倍,精度一点不掉,比近似 replay 靠谱。
Making Model Runner V2 the sole GPU path removes migration ambiguity for production fleets, since teams can no longer defer the transition across releases. Engineers operating Blackwell clusters should benchmark the NVFP4 decode gains against their current baselines before upgrading, and platform teams should read the upgrade notes early. Teams evaluating serving stacks against TensorRT-LLM or SGLang gain a more modular KV cache layer to compare on.
块扩散模型长上下文慢,是因为每步去噪都要重读整份 KV cache。RISA 让一个块内所有去噪步骤共享一份稀疏读取计划,32K 加速 2.67 倍,128K 到 5.53 倍。做长文本生成、关注扩散语言模型部署的人可以看看,比 MAGE、QUEST、LoSA 同等 KL 下更快。
在 SageMaker 上自托管 LLM 的朋友可以看看:新路由会把请求送到缓存命中最多的实例,长 prompt 场景能省下不少重复计算。文章还对比了它和 prefix-aware routing 的适用场景,并给了启用和验证步骤。
Steering a pretrained model through cache edits rather than retraining points to cheaper, more surgical model customization than fine-tuning. Teams maintaining tabular prediction pipelines, and researchers studying model internals, gain a concrete recipe: ask an LLM to repair or redirect TFM behaviour and validate on held-out data. The 0.849 vs 0.876 ROC AUC gap against the pretrained baseline shows the approach is close to, but not yet matching, standard training.
跑推理服务的人都知道内存被打满后请求互相挤兑有多难受。Stint 把被抢占请求的 KV 快照挪到 CPU 再搬回来,卡一分钟以上的请求直接消失,p99 延迟砍半。自己搭 vLLM/SGLang 之类服务的人值得看看思路。
跑过 vLLM 智能体服务的人应该都见过那种莫名的性能崩塌,这篇论文把它解释清楚了:一次几小时的突发流量就能让命中率掉到 10%,吞吐腰斩还自己好不了。论文给了能用的预算器方案,不用调参,直接把 KV 池撑爆的可能性掐掉。
A fixed-size KV cache changes serving economics more than raw benchmark scores: it turns long-context deployment from a memory problem into a configuration choice. Teams building agents, RAG pipelines or document-heavy workflows should watch the waitlist and independent reproductions of the 1B-token retrieval claims. Compared with existing long-context approaches that accumulate KV cache linearly, the 32x throughput figure at 1M tokens is the number to verify.
做长视频生成或智能体视频合成的开发者可以看看这篇。它不用重训练,靠规划器的语义约束决定缓存留什么,60 秒生成时内存砍到三分之一,画质反而比不压缩还高一点。四个骨干、三个基准都有数据,方法可直接套在现有 rollout 流程里。
墨尔本的 i14labs 搞了个 Sugar Glider 架构,把开源大模型改成固定显存的 O(1) 推理,号称几小时就能转换,还测过 1 万亿参数的模型。做推理部署的人值得关注,长上下文成本可能被大幅压下来。
The co-design removes the trade-off that previously forced a choice between quantization accuracy and decode speed: system-level changes like transposed softmax eliminate lookup overheads that plagued earlier FP4 KV methods. Teams running long-context inference on NVIDIA Blackwell hardware can apply it directly, since the implementation is open-sourced and works across dense and MoE models with GQA and MLA, and it even holds up in RL training rollouts.
一篇很实在的推理优化论文:把注意力分块按精度分档,长文本生成最高快 7.88 倍,代码已开源,做长上下文部署的可以试试。
一篇 RAG 新玩法论文:把文档离线灌成 KV 缓存,0.6B 小模型查询时直接吃缓存,30 组对比赢了 29 组,省算力场景挺实用。
arXiv 上这篇论文讲了一个省算力的新招:同一模型家族里小模型算过的上下文,能直接转成大模型能用的 KV 缓存,省 75% 缓存还能提速最多 21 倍。
A fixed-size KV cache means long-horizon reasoning on consumer GPUs without the memory creep that normally forces context truncation, making the 4B model a practical candidate for on-device and edge deployments. Developers building local agents or long-session assistants can run it without enterprise hardware. Compared with other small open models, its benchmark is framed against bounded-state baselines rather than full-cache models, so independent verification will matter.
Prompt 的 KV 缓存太大存不动?DCKV 能压到 bf16 的 1/55,长上下文基准只掉 1.8 分,还全流程可微训练。
免训练的 KV 缓存压缩方案,压 13 倍几乎不掉点,比现有跨层方法强不少,自己部署 LLM 的可以看看代码。
用 GLM 5.3 或自建 SGLang 推理服务的值得看看,Cloudflare 公开了 KV cache 跨请求泄露的排查和修复细节。
清华开源的 AKV 挺有意思,跑在 SGLang 上,不摘要历史而是直接搬 KV cache,4 个智能体基准上平均省 27.7% 成本。
循环模型每次循环都要单独存一份 KV 缓存,内存爆炸。这篇论文的两阶段训练方法让缓存能跨层共享,首 token 时间砍了 83.6%,做长推理的可以看看。
This reframes context engineering as a systems problem: instead of editing the visible prompt, the agent rewrites its own cache, avoiding the re-prefill penalty that summarization triggers. Teams building long-running agents with multi-turn tool calls can cut serving cost measurably without changing what the model sees. The gains apply to any stack serving LLMs with prefix caching, such as vLLM-based deployments.
这篇论文把每 token 的电耗拆成活跃字节加解码时间两个量,误差 3.73% 以内,做推理部署省电的可以照着算。
有人在对比 DeepSeek V4 和 GPT 的 KV 缓存开销,GPT 那 272K 压缩上限被吐槽了,搞推理部署的可以看看这段讨论。
一个 3B 的线性注意力模型,每条序列状态固定 29.5 MB,不随上下文膨胀,还全程跑在 Trainium2 上,长上下文推理的内存账很好算。
vLLM now spans three hardware ecosystems, which reduces the lock-in that previously tied inference stacks to NVIDIA GPUs. Teams running self-hosted inference can benchmark vLLM against vendor-specific runtimes on AMD and TPU infrastructure. The KV cache management work matters most for serving long-context models where memory, not compute, is the bottleneck.
DeepSeek 把自家线上推理的优化手法开源了,GPU 空等、缓存复用这些细节都写了,自建集群的团队直接抄作业。
KV cache transfer addresses the hidden cost of agentic loops: re-prefilling the same context on every turn, which inflates latency and GPU spend as conversations grow. Teams running self-hosted agents on vLLM can replicate the setup on EC2 P5en instances with EFA. The reported gains also give a concrete comparison point for choosing between Qwen3-32B and GLM-5-FP8 when latency per turn matters.
Shifting KV-cache transfer coordination off the critical path removes a hidden latency tax in prefill-decode disaggregation, and the 3x TTFT gain applies to any team serving LLMs at scale on vLLM. Practitioners running inference on AWS can adopt the NIXL connector on EC2 P5en with EFA networking directly from the guide. Compared with pull-based transfer, the push design needs no receiver-side polling, which is what unlocks the latency savings.
扩散多模态模型用缓存提速后老复读,这篇论文找到三个根因,给了个免训练插件,重复率从 99.6% 压到 17%。
Percy Liang's closing argument reframes the KV cache as the structural root of Transformer inference inefficiency, pointing to architectures designed for inference from day one, such as SSMs, linear attention, and diffusion-based non-autoregressive generation. Engineers building or tuning inference stacks get a single coherent map from architecture to serving systems. The executable lecture notes with sympy-verified formulas make the material directly reproducible rather than slide-level theory.
给做大模型推理服务的同学:GLM-5.3 上远程 KV 缓存反而把 p99 拖到 83 秒的踩坑实录,还给了带宽阈值公式和修复方案。