论文

FBQ:用首个输出 token 预测未来查询,优化 LLM 缓存驱逐策略

Faster and Better Query (FBQ): Learning Future-Position Probes from the First Generated Token

精选理由

一篇做 KV 缓存驱逐的论文:不用逐 token 生成草稿,只学首 token 嵌入的 7 个偏移量,一次前向就预测未来查询,LongBench 上效果对齐 Lookahead Q-Cache。做长上下文推理优化的工程师值得看。

论文提出 Faster and Better Query(FBQ),解决 LLM 在 prefill 结束时必须驱逐 prompt 缓存、但看不到后续解码查询的问题。基线方法 FTQ-8 将首 token ID 复制到 8 个未来位置做伪查询,但通用开头词对后 7 个位置的猜测很弱。FBQ 保留首个嵌入,在其余 7 个位置学习可加偏移,并用全缓存续写的平均 prompt attention 作为训练目标。在 LongBench 上,FBQ 与 8 步 Lookahead Q-Cache 在相同缓存预算下表现相当,但只需一次 causal 前向传播即可算出全部探针查询。

正文

其机制核心是把未来查询的近似从多次自回归草稿生成,压缩为对首 token 嵌入的逐位置偏移学习,避免了生成草稿所需的额外解码步骤。相比 Lookahead Q-Cache 需要逐步前向,FBQ 的单次前向使缓存驱逐决策几乎不增加 prefill 开销。对需要在长上下文场景控制 KV 缓存显存的开发者,这提供了一种低成本的 query 预估方案。

原文 · arXiv cs.AI

Faster and Better Query (FBQ): Learning Future-Position Probes from the First Generated Token

When a large language model (LLM) evicts prompt keys and values at the end of prefill, it must decide what to keep before it sees the queries from subsequent decoding steps. Generating a draft continuation can approximate those queries at the cost of extra autoregressive steps. Can we use the embedding of the first output token, already available from the final prefill logits, to construct low-cost pseudo queries that approximate future decoding queries? We start with FTQ-8, which places eight copies of the first token ID at consecutive future positions and reads their attention to the prompt in one causal forward pass. Each copy sees a different prefix, but a generic opening such as the offers a poor literal guess for seven successive tokens. Faster and Better Query (FBQ) preserves the first embedding and learns an additive offset at each of the seven remaining positions. We train these offsets to predict the average prompt attention of a full-cache continuation. On LongBench, FBQ performs comparably to eight-step Lookahead Q-Cache at the same cache budget, using a single forward pass to compute all probe queries.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:KV缓存、LongBench、LLM推理优化、FTQ-8,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Jiankun Zou, Daixing Chen, Tongtong Yuan),经 AITOP 多维评分管线结构化提炼。