arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.29986cs.AI
收藏

加速受限解码:通过词元空间压缩

Accelerating Constrained Decoding with Token Space Compression

Department of Language Science and Technology(语言科学与技术系);Saarland Informatics Campus(萨尔兰州信息学校区);Saarland University(萨尔兰大学)

Michael Sullivan, Alexander Koller

AI总结:

提出CFGzip离线压缩词元搜索空间,大幅降低上下文无关文法约束解码的开销,实现高达两个数量级的延迟减少和7.5倍的总生成速度提升。

摘要:

为了保证LLM的输出符合指定结构,上下文无关文法(CFG)解码引擎强制选择能够产生符合给定CFG的字符串的下一个词元。虽然当前的CFG受限解码引擎已经高度优化,但由于每一步搜索空间(即整个词元词汇表)巨大,导致对于更复杂的CFG会产生难以承受的高开销——而这正是CFG引擎最有用的情况。在本文中,我们引入了CFGzip,一种离线压缩词元搜索空间的技术,它大幅减少了CFG引擎的开销。实验中,我们报告了当CFGzip与最先进的语法引擎一起使用时,延迟减少高达两个数量级,在总受限生成时间上实现了高达7.5倍的加速:借助CFGzip,受限解码现在可以大规模应用于复杂CFG。

英文摘要:

To guarantee that an LLM's outputs conform to a specified structure, context-free grammar (CFG) decoding engines force the selection of next tokens to produce strings that conform to a given CFG. Current CFG-constrained decoding engines are highly optimized, but still suffer from the inherent costs arising from their massive per-step search space---i.e. the entire token vocabulary. This results in intractably high overhead for more complex CFGs, which is precisely the situation where CFG engines are most useful. In this paper, we introduce CFGzip, an offline technique for compressing the token search space, which massively reduces CFG engine overhead. In experiments, we report latency reduction of up to 75x during batched inference, cutting overhead down to ~1.2-2x on the hardest grammars: with CFGzip, constrained decoding is now possible at scale for complex CFGs

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑