Saibo-creator/Awesome-LLM-Constrained-Decoding
A curated list of papers related to constrained decoding of LLM, along with their relevant code and resources.
What it solves
Constrained decoding is a technique that forces large language models to generate output that strictly follows predefined rules like grammar, JSON schemas, or regular expressions. This curated list gathers the most relevant tools and research in one place, helping developers and researchers achieve reliable and controllable generation without fine-tuning.
How it works
The project is an awesome list — a hand-picked collection organised into categories: libraries, papers, benchmarks and datasets, surveys, and blog posts. Each library entry includes a short feature summary (e.g., supported constraint types and compatible frameworks). The papers are listed with publication venues and dates, spanning from classic beam-search methods to recent advances like CFG-based engines and sequential Monte Carlo approaches. The README also links to related awesome lists and provides contribution guidelines.
Who it’s for
This resource is useful for researchers studying controlled text generation, engineers who need structured outputs (such as JSON or code) from LLMs in production, and anyone exploring ways to make LLMs more reliable and predictable without changing the underlying model.
Highlights
- A broad collection of libraries implementing constrained decoding, including guidance, outlines, xgrammar, lmql, and others, each with feature descriptions.
- Papers from 2017 to 2026 covering techniques like CFG, regex, JSON schema enforcement, beam search, and probabilistic control.
- Dedicated sections for benchmarks and evaluation frameworks (e.g., jsonschemabench) to measure structured generation quality.
- Includes surveys and blog posts for deeper understanding and entry points for newcomers.
- Maintained as an open community list with a disclaimer that entries are not exhaustive and contributions are welcome.
Related
- Project
- Project
- Project
- Project