AidanCooper/constrained-decoding
A guide to structured generation using constrained decoding
This project helps AI application developers ensure that large language models (LLMs) generate text that strictly follows a predefined format, such as JSON, XML, or specific grammar rules. You input a prompt and a desired output structure, and the system produces text that adheres precisely to that structure. It's for engineers building applications where LLM outputs must be predictable and machine-readable.
No commits in the last 6 months.
Use this if you need to guarantee that an LLM's output conforms to a specific, machine-readable schema, like JSON for an API or a custom grammar for a structured report.
Not ideal if you are looking for open-ended, creative text generation without any structural constraints.
Stars
14
Forks
—
Language
Jupyter Notebook
License
MIT
Category
Last pushed
Jun 09, 2024
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/AidanCooper/constrained-decoding"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
aalok-sathe/surprisal
A unified interface for computing surprisal (log probabilities) from language models! Supports...
EvolvingLMMs-Lab/lmms-engine
A simple, unified multimodal models training engine. Lean, flexible, and built for hacking at scale.
FunnySaltyFish/Better-Ruozhiba
【逐条处理完成】人为审核+修改每一条的弱智吧精选问题QA数据集
reasoning-machines/pal
PaL: Program-Aided Language Models (ICML 2023)
microsoft/monitors4codegen
Code and Data artifact for NeurIPS 2023 paper - "Monitor-Guided Decoding of Code LMs with Static...