Accelerating Constrained Decoding with Token Space Compression
Not on the map. Why?
Abstract (arXiv)
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
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 13 of its 25 references that are in the map. First posted on arXiv 28 May 2026.
Builds on
13 of 25 references.
References · 13
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,947
- 2023Large Language Modelscited by 780
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 197
- 2024SynCode: LLM Generation with Grammar Augmentationcited by 69
- 2025Flexible and Efficient Grammar-Constrained Decodingcited by 43
- 2025Type-Constrained Code Generation with Language Modelscited by 35
- 2025StructEval: Benchmarking LLMs' Capabilities to Generate Structural Outputscited by 25
- 2025Procedural Environment Generation for Tool-Use Agentscited by 24
- 2023Leveraging Code to Improve In-context Learning for Semantic Parsingcited by 10
1 more
Built on by
Not cited yet.