
MS
Michael Sullivan, Alexander Koller
· 1 min read
ResearcharXiv cs.AI
Accelerating Constrained Decoding with Token Space Compression
arXiv:2605.29986v2 Announce Type: replace
Abstract: 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
Original source
This story was published by arXiv cs.AI and written by Michael Sullivan, Alexander Koller. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on arxiv.org


