论文

Prefix-LM:通过前缀不变性实现宽度维度的渐进式推理

Prefix-LM: Prefix-Invariant Transformers for Width-Adaptive Progressive Inference

精选理由

推理成本高是很多人部署模型时的痛点,这篇论文的思路挺新:不是按层提前退出,而是让小模型的计算能被大模型直接接着用,按 token 难度分配算力。做推理优化或模型架构研究的可以看看。

一篇来自 arXiv 的新论文提出 Prefix-LM 架构,核心是把渐进式推理从传统的深度维度(early-exit)扩展到宽度维度,并在 1B 参数规模上验证了实际加速效果。

正文

作者指出问题的关键在于前缀不变性(prefix invariance):小子模型的中间表示必须是大子模型表示的前缀。为了实现这一点,Prefix-LM 通过强制块三角映射(block-triangular maps)来构造 Transformer,使宽度可变的子模型输出能够被逐步细化,同时支持 KV cache 共享和中间计算的完全复用。相比此前沿宽度方向做弹性计算的网络——虽然能按输入难度分配不同算力,但输出无法渐进细化——Prefix-LM 补上了这一缺失属性。

论文将 Prefix-LM 应用于 1B 规模模型,展示了实用的推理加速,并把前缀不变性确立为自适应计算的一个可行基础。对关注推理成本优化的开发者来说,这条“按 token 预测难度动态分配算力”的路线提供了 early-exit 之外的新选择。

原文 · arXiv cs.LG

Prefix-LM: Prefix-Invariant Transformers for Width-Adaptive Progressive Inference

LLMs require a significant amount of resources during autoregressive generation, but not all tokens are equal. Token prediction is a task of varying difficulty, but monolithic architectures allocate the same compute regardless of the difficulty of prediction. Progressive inference, where representations are incrementally computed and refined as needed, can address this challenge. This has traditionally been achieved through early-exiting methods that operate along the depth dimension of the network. Elastic networks that operate along the width dimension can select a different computational budget per input, but the resulting outputs cannot be progressively refined. We identify the missing property as prefix invariance: the intermediate representations of smaller submodels are prefixes of larger ones. To this end, we propose Prefix-LM: an architectural design that achieves prefix invariance by enforcing block-triangular maps, enabling KV cache sharing and full reuse of intermediate computations. We apply Prefix-LM at the 1B scale, demonstrating practical speedups and establishing prefix invariance as a useful foundation for adaptive computation.

产业坐标与信源核验

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

信源核验说明:本文原始线索采编自「arXiv cs.LG」(@Riccardo Zaccone, Avi Trost, Martín Bravo, Xinyang Xu, Alexander Yun, Frederic Sala, Carlo Masone, Stefanos Laskaridis, Samuel Horváth),经 AITOP 多维评分管线结构化提炼。