AVERT:按请求预算让每个 token 执行不同层数的推理路由方法
Average-Depth Variable Execution via Request-Local Token Routing
做推理优化或自托管 LLaMA 的开发者可以看这篇:不按请求一刀切砍层数,而是逐 token 路由,一个模型权重就能同时服务高低预算请求,混合 batch 下 TPOT 最多降 21.2%,比传统层跳过更省心。
arXiv 论文提出 AVERT,解决层跳过推理中请求预算无法精确分配到每个 token 的问题。该方法让同一请求内不同 token 执行不同数量的 Transformer 层,使平均执行深度匹配连续预算。
技术上,每个可路由层设置一个路由器,读取当前 token 状态和该请求的预算来决定是否执行该层;跳过的 token 经过轻量残差适配器,且不在该层写入 K/V 缓存。单个 checkpoint 即可在同一 batch 内服务不同预算的请求。
实验覆盖三个 LLaMA 骨干、六项质量指标和 13 个预算,AVERT 在 234 组对比中 206 组最优或并列最优。单预算与混合预算 batch 的每请求预算平均绝对误差不超过 1.15 个百分点;当按预算分组导致 batch 填不满时,混合预算可将每输出 token 解码时间(TPOT)降低 4.3%–21.2%。
Average-Depth Variable Execution via Request-Local Token Routing
Layer skipping can reduce large language model inference costs, but a request budget does not specify how to allocate layer execution across generated tokens. We introduce \method{}, which allows tokens to execute different numbers of layers while matching each request's mean executed depth to a continuous budget. At each routed layer, a router reads the current token state and its request's budget and decides whether to execute the Transformer block. Tokens that skip the block pass through a lightweight residual adapter and write no key/value (K/V) entry at that layer. A single checkpoint serves requests with different budgets in the same batch. Across three LLaMA backbones, six quality metrics, and 13 budgets, AVERT is best or tied for best in 206 of 234 comparisons. Across single- and mixed-budget batches, the mean absolute per-request budget error is at most 1.15 percentage points. When grouping requests by budget leaves batches underfilled, mixing budgets reduces decode time per output token (TPOT) by 4.3--21.2%.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include AVERT, LLaMA, inference optimization, KV cache.
Source attribution: curated from arXiv cs.AI (@Pengjie Zheng, Mengwei Xie, Huan Yang, Si Wu, Pengfei Hu, Feng Li).