Flexible and Efficient Grammar-Constrained Decoding
Kanghee Park, Timothy Zhou, Loris D'Antoni
摘要
Large Language Models (LLMs) are often asked to generate structured outputs that obey precise syntactic rules, such as code snippets or formatted data. Grammar-constrained decoding (GCD) can guarantee that LLM outputs matches such rules by masking out tokens that will provably lead to outputs that do not belong to a specified contextfree grammar (CFG). To guarantee soundness, GCD algorithms have to compute how a given LLM subword tokenizer can "align" with the tokens used by a given context-free grammar and compute token masks based on this information. Doing so efficiently is challenging and existing GCD algorithms require tens of minutes to preprocess common grammars. We present a new GCD algorithm together with an implementation that offers 17.71x faster offline preprocessing than existing approaches while preserving state-of-theart efficiency in online mask computation.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper14
- Constrained Sampling for Language Models Should Be Easy: An MCMC PerspectiveEmmanuel Anaya Gonzalez, Sairam Vaidya, Kanghee Park, Ruyi Ji 等NeurIPS 2025 · 被引用 15 次
- The Hidden Cost of Structured Generation in LLMs: Draft-Conditioned Constrained DecodingAvinash Reddy, Thayne Walker, Jaime Ide, Amrit Singh BediICML 2026 · 被引用 6 次
- Mitigating Bias in Locally Constrained Decoding via Tractable ProposalsMeihua Dang, Linxin Song, Honghua Zhang, Jieyu Zhao 等ICML 2026 · 被引用 4 次
- ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function CallingJianghao Lin, Yuanyuan Shi, Xin Peng, Renjie Ding 等ACL 2026 · 被引用 3 次
- Constrained Adaptive Rejection SamplingPaweł Parys, Sairam Vaidya, Taylor Berg-Kirkpatrick, Loris D'AntoniICML 2026 · 被引用 3 次
它引用的顶会 Paper5
- Grammar Prompting for Domain-Specific Language Generation with Large Language ModelsBailin Wang, Zi Wang, Xuezhi Wang, Yuan Cao 等NeurIPS 2023 · 被引用 138 次
- Guiding LLMs The Right Way: Fast, Non-Invasive Constrained GenerationLuca Beurer-Kellner, Marc Fischer, Martin T. VechevICML 2024 · 被引用 93 次
- Grammar-Aligned DecodingKanghee Park, Jiayu Wang, Taylor Berg-Kirkpatrick, Nadia Polikarpova 等NeurIPS 2024 · 被引用 73 次
- Grammar-Constrained Decoding for Structured NLP Tasks without FinetuningSaibo Geng, Martin Josifoski, Maxime Peyrard, Robert WestEMNLP 2023 · 被引用 33 次
- CRANE: Reasoning with constrained LLM generationDebangshu Banerjee, Tarun Suresh, Shubham Ugare, Sasa Misailovic 等ICML 2025
相关 Paper
- Efficient Grammar-Constrained Decoding via Parser Stack ClassificationYongmin Li, Yihong Dong, Jia Li, Ge LiISSTA 2026
- Gram2Token: Enabling Run-time GPU-Native Grammar-Constrained Decoding for LLMsHantao Hua, Jiming Su, hao tang, Yiping Yao 等ICML 2026
- Constrained Decoding of Diffusion LLMs with Context-Free GrammarsNiels Mündler, Jasper Dekoninck, Martin VechevICLR 2026 · 被引用 18 次
- Earley-Driven Dynamic Pruning for Efficient Structured DecodingXintong Sun, Chi Wei, Minghao Tian, Shiwen NiICML 2025
- ChopChop: A Programmable Framework for Semantically Constraining the Output of Language ModelsShaan Nagy, Timothy Zhou, Nadia Polikarpova, Loris D'AntoniPOPL 2026 · 被引用 1 次
