CLAA: 跨层注意力聚合用于加速大语言模型预填
CLAA: Cross-Layer Attention Aggregation for Accelerating LLM Prefill
AI总结:
CLAA通过跨层聚合注意力分数,提升大语言模型预填阶段的推理速度,将TTFT降低至39%。
摘要:
长上下文大语言模型(LLM)推理中的预填阶段仍是一个计算瓶颈。最近的token排序启发式方法通过选择性地处理一组语义相关的token来加速推理。然而,现有方法存在不稳定token重要性估计的问题,通常在不同层之间变化。在启发式特定架构中独立评估token排序质量具有挑战性。为了解决这个问题,我们引入了一个答案驱动的Oracle,通过测量生成的答案对提示的注意力来定义真实token重要性。这个Oracle揭示了现有启发式方法在不同层之间存在高方差:排名可能在特定层急剧下降,这是一种无法被端到端基准检测到的失败模式。诊断表明,一个简单的修复方法是跨层聚合分数,而不是依赖于任何单一一层。我们将此实现为跨层注意力聚合(CLAA),它缩小了与Oracle上限之间的差距,并将时间到第一个token(TTFT)比全KV缓存基线减少了高达39%。
英文摘要:
The prefill stage in long-context LLM inference remains a computational bottleneck. Recent token-ranking heuristics accelerate inference by selectively processing a subset of semantically relevant tokens. However, existing methods suffer from unstable token importance estimation, often varying between layers. Evaluating token-ranking quality independently from heuristic-specific architectures is challenging. To address this, we introduce an Answer-Informed Oracle, which defines ground-truth token importance by measuring attention from generated answers back to the prompt. This oracle reveals that existing heuristics exhibit high variance across layers: rankings can degrade sharply at specific layers, a failure mode invisible to end-to-end benchmarks. The diagnosis suggests a simple fix: aggregate scores across layers rather than relying on any single one. We implement this as Cross-Layer Attention Aggregation (CLAA), which closes the gap to the oracle upper bound and reduces Time-to-First-Token (TTFT) by up to 39\% compared to the Full KV Cache baseline.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。