3 个仓库
Tools that restrict token generation based on formal language rules.
Distinct from Tokenizers: Focuses on grammar-based sampling tools, distinct from general tokenizers.
Explore 3 awesome GitHub repositories matching artificial intelligence & ml · Grammar-Constrained Token Samplers. Refine with filters or upvote what's useful.
Guidance is a generative AI orchestration framework designed to manage complex interactions with language models by embedding programmatic control directly into the prompt generation process. It functions as a prompt programming environment that allows developers to interleave raw text with executable logic, enabling the construction of sophisticated, multi-step agentic workflows. The framework distinguishes itself through grammar-constrained token sampling and stateful stream interception, which restrict the model's output distribution based on formal language rules. By enforcing these const
Restricts language model token generation based on formal language rules to ensure strict adherence to output schemas.
Outlines is a guided text generation framework and structured output engine for large language models. It enforces precise structural constraints on model output during the sampling process to ensure the generation of valid data. The framework ensures that model outputs strictly adhere to predefined data models, including JSON schemas, regular expressions, and formal grammars. This enables the conversion of natural language inputs into structured arguments for function calling and the generation of valid JSON for downstream processing. The system manages model orchestration through prompt te
Modifies the token probability distribution to ensure generated text adheres to specific regular expressions or grammars.
Outlines is a library designed to ensure machine-readable output from generative models by applying programmatic constraints during the token sampling process. It functions as a toolkit for forcing large language models to generate text that strictly adheres to JSON schemas, regular expressions, and formal grammars, enabling the integration of model responses into existing software systems. The library distinguishes itself by integrating formal language rules directly into the sampling loop. It achieves this by converting regular expressions into deterministic finite automata and utilizing lo
Restricts the model's next-token probability distribution by zeroing out tokens that violate defined grammar or schema constraints.