PapersSelected

PackLoop:面向 Looped 语言模型并发解码的行打包自推测方法

PackLoop: Row-Packed Self-Speculative Decoding for Looped Language Models under Concurrency

Why we picked it

做推理优化的工程师值得看这篇。它解决的是 Looped 模型并发时自推测加速失效的问题,思路是重排推测任务的布局而不是减少推测。164 个负载点里 161 个赢过现有最优调度,还保证输出逐 token 一致。

论文提出 PackLoop,一种针对 Looped 语言模型在并发解码场景下的自推测解码方法。现有自推测解码在单请求下可获得 2-10 倍加速,但在多请求共享 GPU 时收益下降,原因是流水线调度(如 wavefront)把每个推测位置放在不同的 loop 上,导致每个 token 的 KV 缓存仍被读取 T 次。

Body

PackLoop 的核心原则是只在本来就会被读取的行内做推测:深 loop 累积位置后作为整块在同一行推进,上下文复制提案加入首个 loop 已读取的行,并用库存理论中的经济订货量公式给出闭式准入规则,控制累积时长。该方法在 FP32 下输出与自回归解码逐 token 完全一致,包括采样和提前退出场景。

实验覆盖 3 块 GPU、4 个 Ouro 模型、6 个基准、最高 32K 上下文共 164 个负载点:单一 PackLoop 配置在其中 161 个点快于按点挑选的最优现有调度,中位加速 1.25 倍、最高 1.76 倍,且从不显著变慢。其优势随并发度和上下文长度增长而扩大,恰是现有自推测收益最弱的区间。

Original · arXiv cs.LG

PackLoop: Row-Packed Self-Speculative Decoding for Looped Language Models under Concurrency

Looped language models reuse one block of weights T times per token, trading parameters for test-time depth, but autoregressive decoding then pays T sequential passes per token. Self-speculative decoders recover 2-10x for a single request, yet their gains fade as requests share a GPU, and current practice is to speculate less as load grows. We show that what fails under load is the layout of speculative work, not speculation. In concurrent decoding the unit of cost is the row, one request advancing on one loop, which reads that loop's key-value (KV) cache once; additional positions inside a row are nearly free. Pipelined schedules such as the wavefront place every speculative position on a different loop, hence in a row of its own, so each token is still read T times. We present PackLoop, built on one principle: speculate only inside rows that are read anyway. Deep loops accumulate positions and advance them as a block in one row, context-copy proposals join the row that the first loop already reads, and a closed-form admission rule, the economic order quantity of inventory theory, sets how long to accumulate from a cost model calibrated once per engine. PackLoop is exact: in FP32 its output is token-for-token identical to autoregressive decoding, also under sampling and early exit. Across 164 load points spanning three GPUs, four Ouro models, six benchmarks, and contexts up to 32K tokens, one PackLoop configuration is faster than the best existing schedule, chosen per point, at 161 points (median 1.25x, up to 1.76x) and never significantly slower. Its lead grows with concurrency and context length, the regime in which existing self-speculation gains least.

Industry Coordinates & Source Verification

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 inference optimization, KV cache, arXiv.

Source attribution: curated from arXiv cs.LG (@Runguo Li, Dezhen Lu).