Saibo-creator/Awesome-LLM-Constrained-Decoding
소개
LLM 제약 디코딩 관련 논문과 이에 해당하는 코드 및 리소스를 엄선해 모았습니다.
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalAwesome-LLM-Constrained-Decoding
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.
Table of Contents
Libraries
| 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:
- The libraries listed above are not exhaustive and are subject to change.
- The features mentioned are 100% not exhaustive and I strongly recommend checking the respective repositories for more details.
- The libraries are listed by the Github stars
- If you are the author of a library and would like to add or update the information, please open an issue or submit a pull request.
Papers
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 |
Benchmark & Datasets & Evaluation
Survey
| Date | Paper | Publication |
|---|---|---|
| 2024-04 | "We Need Structured Output": Towards User-centered Constraints on Large Language Model Output | Preprint |
Blog Posts
- The good, the bad, and the ugly of Gemini’s structured outputs by Dylan Castillo
- Leveraging Constrained Sampling for Fill-in-the-Middle Code Completion by nielstron
- Proper Well-Formedness for Finite LLM Sampling by nielstron
- LLM Decoding with Regex Constraints by Vivien
- Constrained Decoding is Posterior Inference by Saibo-creator
- Making Structured Generation Faster Than Unstructured
- Coding For Structured Generation with LLMs
- Beating GPT-4 with Open Source
- Prompt Efficiency - Using Structured Generation to get 8-shot performance from 1-shot.
- How fast can grammar-structured generation be?
- Structured Generation Improves LLM performance: GSM8K Benchmark
- Coalescence: making LLM inference 5x faster
- Constrained Decoding with Arbitrary Constraints is NP-hard
- LLMs are bad at returning code in JSON
- Say what I mean
- LLGuidance: Making Structured Outputs Go Brrr
Many of the blogs are written by Outlines team, many thanks to them for their great work! ❤️
Related Awesome Lists
Disclaimer
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.
Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue. Please make sure to read the Contributing Guidelines before contributing.
관련 프로젝트 살펴보기
불러오는 중…