REVIEW 9 cited by
SynCode: LLM Generation with Grammar Augmentation
Not yet reviewed by Pith; the record is open.
This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.
SPECIMEN: schema-true, not a live event
T0 review · schema-true
One-sentence machine reading of the paper's core claim.
pith:XXXXXXXX · record.json · timestamp
read the original abstract
LLMs are widely used in complex AI applications. These applications underscore the need for LLM outputs to adhere to a specific format, for their integration with other components in the systems. Typically the format rules e.g., for data serialization formats such as JSON, YAML, or Code in Programming Language are expressed as context-free grammar (CFG). Due to the hallucinations and unreliability of LLMs, instructing LLMs to adhere to specified syntax becomes an increasingly important challenge. We present SynCode, a novel framework for efficient and general syntactical decoding with LLMs, to address this challenge. SynCode ensures soundness and completeness with respect to the CFG of a formal language, effectively retaining valid tokens while filtering out invalid ones. SynCode uses an offline-constructed, efficient lookup table, the DFA mask store, derived from the DFA of the language's grammar for efficient generation. SynCode seamlessly integrates with any language defined by CFG, as evidenced by experiments focusing on generating JSON, Python, and Go outputs. Our experiments evaluating the effectiveness of SynCode for JSON generation demonstrate that SynCode eliminates all syntax errors and significantly outperforms state-of-the-art baselines. Furthermore, our results underscore how SynCode significantly reduces 96.07% of syntax errors in generated Python and Go code, showcasing its substantial impact on enhancing syntactical precision in LLM generation. Our code is available at https://github.com/uiuc-focal-lab/syncode
Forward citations
Cited by 9 Pith papers
-
DINGO: Constrained Inference for Diffusion LLMs
DINGO is a dynamic programming decoder over a token-level DFA that makes diffusion LLM outputs obey regular expressions while maximizing the product of per-position probabilities.
-
Type-Driven Prompt Programming: From Typed Interfaces to a Calculus of Constraints
The paper proposes a not-yet-complete dependently typed calculus for prompt programming with probabilistic refinements, and identifies gaps in constraint expressiveness and optimization algorithms.
-
Syntax Repair as Language Intersection
Bounded syntax repair is formalized as the intersection of a context-free grammar with an acyclic Levenshtein automaton, and the paper shows this intersection can be built, enumerated, and reranked efficiently.
-
Memory Offloading for Large Language Model Inference with Latency SLO Guarantees
Select-N meets LLM latency SLOs by choosing and continuously adjusting an offloading interval that controls how much model state lives in CPU memory, increasing host memory usage and throughput versus prior offloading...
-
Optimizing Datasets for Code Summarization: Is Code-Comment Coherence Enough?
Filtering code summarization training data by code-comment coherence gives no better results than random selection, and halving the training set does not hurt performance.
-
Format Sensitivity Index: Token-Controlled Prompt Wrapper Robustness and Schema Compliance in LLM Benchmarking
Across 140k generations, wrapper-only formatting changes accuracy by over 30× across models, largely via parseability failures, so single-wrapper scores are statistically fragile.
-
LLM-as-a-Judge Scores Are Unreliable Optimization Signals in Closed-Loop Table Recognition
Reference-free LLM judge scores failed to select better table-extraction outputs over eight regeneration iterations on FinTabNet and OmniDocBench; keeping the first output was safest.
-
Syntactic Control of Language Models by Posterior Inference
SMC sampling with a tetratagger shaping function and a POS-bigram proposal lifts constituency-tree match from 12-35% to about 93% F1 on GPT2-large and Llama3-8B.
-
Constrained Sampling for Language Models Should Be Easy: An MCMC Perspective
A grammar-aligned MCMC sampler with prefix-resampling proposals and Metropolis-Hastings acceptance converges to the constrained language model distribution and improves fuzzing seed coverage.
Discussion (0). Continue with ORCID to comment.