inference/research
verifiedhigh · 0.85updated 2026-10-03

Outlines

cuda, rocm, metal, cpu

Fields

id
engines/niche-outlines
Repo
dottxt-ai/outlines
Languages
Python
License
Apache-2.0
First release
2023
Design goal
ease-of-usestructured-outputportableresearch
Scheduling
none
Backends
cudarocmmetalcpu
Formats
tokenizer-vocabsafetensors
Notable features
Schema-driven structured generation whose stated thesis is that post-hoc parsing, regex munging and fragile retry code are the wrong shape - the constraint should be in the sampler, not after itThe README's portability claim is 'same code runs across OpenAI, Ollama, vLLM and more', i.e. it works as a remote client against a hosted model as well as in-process against a local onePure Python (Nix is the only other language in the repo), which makes it the most readable of the three structured-generation librariesHandles regular expressions, JSON Schema and finite-state-style grammars as first-class constraint typesWidely adopted as a library rather than a server: the README lists NVIDIA, Cohere, HuggingFace and vLLM among organisations using itv1.x line now (1.3.3 on 2026-08-06), 15897 stars, 906 open issues
Hardware caveats
Same category boundary as XGrammar: this is a library a serving stack imports, not an engine. scheduling is 'none' and supported_backends reflects host reach onlyPure-Python constraint machinery on the per-token critical path is materially slower than a C++ core. In vLLM/SGLang the fix is that you use XGrammar there instead (see [[niche-xgrammar]]), which is precisely why Outlines is no longer the default structured backend in those serversThe 'works with any model' claim is true for OpenAI-compatible remote endpoints and weaker for exotic local engines - you need a logits-level hook, which rules out most llama.cpp builds unless a specific integration existsREPO MOVE WARNING: the project left the outlines-dev org. github.com/outlines-dev/outlines returns HTTP 200 after redirecting to dottxt-ai/outlines, so pre-2024 citations still resolve, but the owner path changed and dependency pins referencing 'outlines-dev' are stale906 open issues against 15897 stars is a high open-issue ratio for a library; the issue backlog is the practical signal about support burdenLayered on top of a host model, so every host-engine caveat inherits: a bad logit-processing path on a niche backend breaks constrained output too
Best for
Rapid prototyping of schema-constrained generation, especially when you want to iterate on the constraint in Python without touching a C++ buildLocal model work where you control the host process and can install a logits hookLearning the design space of structured generation - the constraint types and the failure modes are all readable in one Python repo
Avoid for
Latency-critical per-token constraint checking in production - use the C++ path (XGrammar) via vLLM or SGLangRemote/hosted models behind a plain HTTP API with no logits exposureNew dependency pins that name the old outlines-dev org
notes
Third of three structured-generation records (with [[niche-xgrammar]] and [[niche-lm-format-enforcer]]). The three differ in mechanism and in current relevance: XGrammar is the production default in vLLM/SGLang, lm-format-enforcer was vLLM's previous default, and Outlines is the most readable and the least performance-oriented. All metadata from the GitHub API on 2026-10-03. ||| MAINTENANCE (dated fact, GitHub API, 2026-10-04): last commit 2026-08-24 (1.3 months before this record), latest release 1.3.3 published 2026-08-06, 189 contributors (distinct committers including anonymous), open_issues_count 187 (issues PLUS pull requests - see [[ev-github-open-issues-count-includes-pull-requests]]), not archived, 15899 stars. See [[ev-maintenance-status-is-four-dated-facts]] for how to read this fact set.

Notes

Third of three structured-generation records (with [[niche-xgrammar]] and [[niche-lm-format-enforcer]]). The three differ in mechanism and in current relevance: XGrammar is the production default in vLLM/SGLang, lm-format-enforcer was vLLM's previous default, and Outlines is the most readable and the least performance-oriented. All metadata from the GitHub API on 2026-10-03. ||| MAINTENANCE (dated fact, GitHub API, 2026-10-04): last commit 2026-08-24 (1.3 months before this record), latest release 1.3.3 published 2026-08-06, 189 contributors (distinct committers including anonymous), open_issues_count 187 (issues PLUS pull requests - see [[ev-github-open-issues-count-includes-pull-requests]]), not archived, 15899 stars. See [[ev-maintenance-status-is-four-dated-facts]] for how to read this fact set.

Cross-references

This record references no other records — it is a leaf. It is cited by 0.