Lune

ACL2025Top-tier venue

Pre³: Enabling Deterministic Pushdown Automata for Faster Structured LLM Generation

Junyi Chen, Shihao Bai, Zaijun Wang, Siyu Wu, Chuheng Du, Hailong Yang, Ruihao Gong, Shengzhong Liu, Fan Wu, Guihai Chen

Abstract

Extensive LLM applications demand efficient structured generations, particularly for LR(1) grammars, to produce outputs in specified formats (e.g., JSON). Existing methods primarily parse LR(1) grammars into a pushdown automaton (PDA), leading to runtime execution overhead for context-dependent token processing, especially inefficient under large inference batches. To address these issues, we propose Pre 3 that exploits deterministic pushdown automata (DPDA) to optimize the constrained LLM decoding efficiency. First, by precomputing prefix-conditioned edges during the preprocessing, Pre 3 enables aheadof-time edge analysis and thus makes parallel transition processing possible. Second, by leveraging the prefix-conditioned edges, Pre 3 introduces a novel approach that transforms LR(1) transition graphs into DPDA, eliminating the need for runtime path exploration and achieving edge transitions with minimal overhead. Pre 3 can be seamlessly integrated into standard LLM inference frameworks, reducing time per output token (TPOT) by up to 40% and increasing throughput by up to 36% in our experiments. Our code is available at https://github.com/ModelTC/lightllm .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Self-Consistency Improves Chain of Thought Reasoning in Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Large Language Models as Tool Makers cites Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Large Language Models as Tool Makers cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Embodied Multi-Modal Agent trained by an LLM from a Parallel TextWorld cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Efficient Grammar-Constrained Decoding via Parser Stack ClassificationYongmin Li, Yihong Dong, Jia Li, Ge LiISSTA 2026

Builds on10

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le et al.ICLR 2023 · 681 citations
  3. Large Language Models as Tool MakersTianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen et al.ICLR 2024 · 283 citations
  4. Embodied Multi-Modal Agent trained by an LLM from a Parallel TextWorldYijun Yang, Tianyi Zhou, Kanxue Li, Dapeng Tao et al.CVPR 2024 · 23 citations
  5. CODEP: Grammatical Seq2Seq Model for General-Purpose Code GenerationYihong Dong, Ge Li, Zhi JinISSTA 2023 · 18 citations

Related papers

  1. Gram2Token: Enabling Run-time GPU-Native Grammar-Constrained Decoding for LLMsHantao Hua, Jiming Su, hao tang, Yiping Yao et al.ICML 2026
  2. Earley-Driven Dynamic Pruning for Efficient Structured DecodingXintong Sun, Chi Wei, Minghao Tian, Shiwen NiICML 2025
  3. Flexible and Efficient Grammar-Constrained DecodingKanghee Park, Timothy Zhou, Loris D'AntoniICML 2025
  4. GRAMMAR-LLM: Grammar-Constrained Natural Language GenerationGabriele Tuccio, Luana Bulla, Maria Madonia, Aldo Gangemi et al.ACL Findings 2025 · 5 citations
  5. PARD: Accelerating LLM Inference with Low‑Cost PARallel Draft Model AdaptationZihao An, Huajun Bai, Ziqiong Liu, Dong Li et al.ICLR 2026 · 28 citations
Dusk over the sea between two cliffs drawn in fine vertical lines