A curated list of papers related to constrained decoding of LLM, along with their relevant code and resources.
369
71 commits
updated Jul 27, 2026
Towards reliable, controllable and more efficient generation with Large Language Models (LLMs)
A curated list of papers related to constrained decoding of LLM, along with their relevant code and resources.
| Library | Feature | Stars |
|---|---|---|
| guidance-ai/guidance | CFG, Regex, JSON Schema, Token Forcing, compatible with Transformers, LLAMA-CPP | |
| outlines-dev/outlines | CFG, Unicode support, Hugging Face ecosystem, VLLM support | |
| jxnl/instructor | Try-Reject-Repeat approach to ensure constraints are met | |
| eth-sri/lmql | Regex support, various constraints, more powerful control flow | |
| microsoft/aici | A general framework of LLM controller with native support for CFG, Regex, JSON Schema | |
| noamgat/lm-format-enforcer | Regex, JSON Schema, Beam Search etc. | |
| mlc-ai/xgrammar | CFG, careful system optimizations | |
| uiuc-focal-lab/syncode | CFG generation that supports builtin grammars like JSON, Python, Go, and more | |
| Dan-wanna-M/formatron | Regex, JSON Schema, CFG, etc | |
| genlm/genlm-control | Arbitrary programmable syntactic and semantic constraints, Constrained decoding as posterior inference, Sequential Monte Carlo | |
| epfl-dlab/transformers-CFG | CFG (EBNF Interface), Compatible with Transformers, Easy to extend for research | |
| eth-sri/type-constrained-code-generation | TypeScript, including type-safety. | |
| litelines | Regex, JSON Schema, Tool-calling, triggered structured generation, visualization of the finite state machine | |
| eth-sri/constrained-diffusion | Diffusion LLMs, Multi-Region Infilling (CFG) | |
| snowkylin/circuit-transformer | Generating logical circuits that are strictly equivalent to given Boolean functions. | |
| structuredllm/itergen | CFG generation and backtracking to handle semantic constraints | |
| epfl-dlab/jsonschemabench | A benchmarking framework for evaluating constrained decoding engines on JSON Schema. Supports Guidance, Outlines, XGrammar, OpenAI and more. | |
| grammarllm | LLprefix, DPDA |
Disclaimer:
Papers with are newly added papers (not necessarily newly published papers).
Constrained Decoding for Autoregressive Models
Constrained Decoding for Diffusion Models
| Date | Paper | Publication |
|---|---|---|
| 2025-08 | Constrained Decoding of Diffusion LLMs with Context-Free Grammars | Preprint |
| 2025-05 | DINGO: Constrained Inference for Diffusion LLMs | Preprint |
| 2025-03 | Constrained Language Generation with Discrete Diffusion Models | Preprint |
| Date | Paper | Publication |
|---|---|---|
| 2026-01 | StructEval: Benchmarking LLMs' Capabilities to Generate Structural Outputs | TMLR |
| 2025-08 | JSON-mode Eval Cleaned/Extended, SMILES Eval and HumanEval MRI C++ | HF Hub |
| 2025-01 | JsonSchemaBench: Generating Structured Outputs from Language Models: Benchmark and Studies | ICML ES-FoMo Workshop |
| 2024-05 | COLLIE: Systematic Construction of Constrained Text Generation Tasks | ICLR |
| 2024-02 | JSON-mode Eval dataset | HF hub |
| 2023-12 | BenchCLAMP: A Benchmark for Evaluating Language Models on Syntactic and Semantic Parsing | NeurIPS Track on Datasets and Benchmarks |
| 2023-10 | Evaluating Large Language Models on Controlled Generation Tasks | Preprint |
| 2023-09 | Struc-Bench: Are Large Language Models Really Good at Generating Complex Structured Data? | Preprint |
| 2021-10 | NLV corpus | CHI |
| 2020-12 | CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning | EMNLP Findings |
| 2018-09 | Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task | EMNLP |
| Date | Paper | Publication |
|---|---|---|
| 2024-04 | "We Need Structured Output": Towards User-centered Constraints on Large Language Model Output | Preprint |
Many of the blogs are written by Outlines team, many thanks to them for their great work! ❤️
This list is not exhaustive and will be updated regularly. If you have any suggestions or want to add a paper, please feel free to open an issue or submit a pull request. We hope to include all relevant papers in this list.
Contributions are welcome! Feel free to submit a pull request or open an issue. Please make sure to read the Contributing Guidelines before contributing.
A curated list of papers related to constrained decoding of LLM, along with their relevant code and resources.
369
71 commits
updated Jul 27, 2026
Towards reliable, controllable and more efficient generation with Large Language Models (LLMs)
A curated list of papers related to constrained decoding of LLM, along with their relevant code and resources.
| Library | Feature | Stars |
|---|---|---|
| guidance-ai/guidance | CFG, Regex, JSON Schema, Token Forcing, compatible with Transformers, LLAMA-CPP | |
| outlines-dev/outlines | CFG, Unicode support, Hugging Face ecosystem, VLLM support | |
| jxnl/instructor | Try-Reject-Repeat approach to ensure constraints are met | |
| eth-sri/lmql | Regex support, various constraints, more powerful control flow | |
| microsoft/aici | A general framework of LLM controller with native support for CFG, Regex, JSON Schema | |
| noamgat/lm-format-enforcer | Regex, JSON Schema, Beam Search etc. | |
| mlc-ai/xgrammar | CFG, careful system optimizations | |
| uiuc-focal-lab/syncode | CFG generation that supports builtin grammars like JSON, Python, Go, and more | |
| Dan-wanna-M/formatron | Regex, JSON Schema, CFG, etc | |
| genlm/genlm-control | Arbitrary programmable syntactic and semantic constraints, Constrained decoding as posterior inference, Sequential Monte Carlo | |
| epfl-dlab/transformers-CFG | CFG (EBNF Interface), Compatible with Transformers, Easy to extend for research | |
| eth-sri/type-constrained-code-generation | TypeScript, including type-safety. | |
| litelines | Regex, JSON Schema, Tool-calling, triggered structured generation, visualization of the finite state machine | |
| eth-sri/constrained-diffusion | Diffusion LLMs, Multi-Region Infilling (CFG) | |
| snowkylin/circuit-transformer | Generating logical circuits that are strictly equivalent to given Boolean functions. | |
| structuredllm/itergen | CFG generation and backtracking to handle semantic constraints | |
| epfl-dlab/jsonschemabench | A benchmarking framework for evaluating constrained decoding engines on JSON Schema. Supports Guidance, Outlines, XGrammar, OpenAI and more. | |
| grammarllm | LLprefix, DPDA |
Disclaimer:
Papers with are newly added papers (not necessarily newly published papers).
Constrained Decoding for Autoregressive Models
Constrained Decoding for Diffusion Models
| Date | Paper | Publication |
|---|---|---|
| 2025-08 | Constrained Decoding of Diffusion LLMs with Context-Free Grammars | Preprint |
| 2025-05 | DINGO: Constrained Inference for Diffusion LLMs | Preprint |
| 2025-03 | Constrained Language Generation with Discrete Diffusion Models | Preprint |
| Date | Paper | Publication |
|---|---|---|
| 2026-01 | StructEval: Benchmarking LLMs' Capabilities to Generate Structural Outputs | TMLR |
| 2025-08 | JSON-mode Eval Cleaned/Extended, SMILES Eval and HumanEval MRI C++ | HF Hub |
| 2025-01 | JsonSchemaBench: Generating Structured Outputs from Language Models: Benchmark and Studies | ICML ES-FoMo Workshop |
| 2024-05 | COLLIE: Systematic Construction of Constrained Text Generation Tasks | ICLR |
| 2024-02 | JSON-mode Eval dataset | HF hub |
| 2023-12 | BenchCLAMP: A Benchmark for Evaluating Language Models on Syntactic and Semantic Parsing | NeurIPS Track on Datasets and Benchmarks |
| 2023-10 | Evaluating Large Language Models on Controlled Generation Tasks | Preprint |
| 2023-09 | Struc-Bench: Are Large Language Models Really Good at Generating Complex Structured Data? | Preprint |
| 2021-10 | NLV corpus | CHI |
| 2020-12 | CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning | EMNLP Findings |
| 2018-09 | Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task | EMNLP |
| Date | Paper | Publication |
|---|---|---|
| 2024-04 | "We Need Structured Output": Towards User-centered Constraints on Large Language Model Output | Preprint |
Many of the blogs are written by Outlines team, many thanks to them for their great work! ❤️
This list is not exhaustive and will be updated regularly. If you have any suggestions or want to add a paper, please feel free to open an issue or submit a pull request. We hope to include all relevant papers in this list.
Contributions are welcome! Feel free to submit a pull request or open an issue. Please make sure to read the Contributing Guidelines before contributing.