The Open-Source AI Stack

The Stack · Runtime · Open source

llguidance

Low-level Rust constrained-decoding engine that enforces grammars and JSON Schema at high throughput; powers Guidance.

llguidance is a constrained-decoding engine written in Rust, maintained under the guidance-ai organization. It takes a grammar or JSON Schema and computes, at each decoding step, the set of tokens that keep the output valid, applying that as a mask on the sampler. It is built to be the low-level enforcement layer that a higher-level library or a serving engine calls, rather than a tool a developer uses directly. It is the engine underneath Guidance, and is one of the interchangeable constrained-decoding backends alongside Outlines and XGrammar. The split between these libraries and the developer-facing tools above them (Guidance, Instructor) is the main thing to understand: the same masking idea has both an ergonomic API surface and a performance-critical core, and llguidance is squarely the core. For open-source AI it reflects the maturing of structured output from a Python-level trick into a dedicated, low-overhead systems component, which is what lets open engines offer schema enforcement without giving up throughput.

Sources

Want a follow-up? Ask the chat about llguidance in context. It will compare to siblings at the same layer and ground every claim in the wiki.

Other projects at the Runtime layer

12 siblings · ordered open first