Efficient Guided Generation for Large Language Models
Summary
This paper presents an efficient method for guiding LLM text generation with regular expressions and context-free grammars with minimal overhead, implemented in the open-source Python library Outlines.
View Cached Full Text
Cached at: 06/24/26, 07:49 AM
Paper page - Efficient Guided Generation for Large Language Models
Source: https://huggingface.co/papers/2307.09702 Published on Jul 19, 2023
Abstract
An efficient method guides language model text generation using regular expressions and context-free grammars with minimal overhead.
In this article we describe an efficient approach to guidinglanguage modeltext generation withregular expressionsandcontext-free grammars. Our approach adds little to no overhead to the token sequence generation process, and makes guided generation feasible in practice. An implementation is provided in the open source Python library Outlines.
View arXiv pageView PDFGitHub14.1kautoAdd to collection
Get this paper in your agent:
hf papers read 2307\.09702
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2307.09702 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2307.09702 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2307.09702 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
Evolution through large models
This paper demonstrates that large language models trained on code can significantly enhance genetic programming mutation operators, enabling the generation of hundreds of thousands of functional Python programs for robot design in the Sodarace domain without prior training data. The approach, called Evolution through Large Models (ELM), combines LLMs with MAP-Elites to bootstrap new conditional models for context-specific artifact generation.
Exploring Lightweight Large Language Models for Court View Generation
This paper systematically explores the capabilities of lightweight (<2B) large language models for criminal court view generation, investigating trade-offs between model architecture, size, and impact on charge prediction. The authors also introduce CVGEvalKit, an evaluation framework with three public datasets.
Counterexample Guided Learning in the Large using Reasoning Agents
This paper proposes using counterexample-guided learning for LLMs to perform regular-expression induction, where a verifier provides counterexamples to refine candidate expressions. The method significantly improves sample efficiency and success rates on challenging tasks, demonstrating that LLMs can benefit from structured feedback beyond treating it as additional data.
How Human-Like Are Large Language Models? A Register-Aware Linguistic Evaluation Framework
This paper introduces a register-aware linguistic evaluation framework to assess how human-like large language models (LLMs) are by comparing the distribution of 67 lexico-grammatical features between human and LLM-generated texts using Maximum Mean Discrepancy. Experiments across seven instruction-tuned open-source models and five registers show that no model perfectly matches human baselines, and closeness to human language varies by register rather than model size.
Generative Floor Plan Design with LLMs via Reinforcement Learning with Verifiable Rewards
This paper introduces a text-based approach for generative floor plan design that fine-tunes a large language model with reinforcement learning and verifiable rewards to improve adherence to topological and numerical constraints, achieving significant improvements over existing methods.