arXiv:2610.32881cs.AIOct 2026

Manuscript Offprint

arXiv:2610.32881

NgramRL: Accelerating RL Post-Training for Structured Generation via Rollout-Aware N-gram Speculative Decoding

Nilesh Prasad Pandey, Jangseon Park, Jason Kong, Onat Gungor, Tajana Rosing

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Nilesh Prasad Pandey ∗^{*}

nppandey@ucsd.edu

University of California San Diego

La Jolla, CA, USA

Jangseon Park ∗^{*}

jap036@ucsd.edu

University of California San Diego

La Jolla, CA, USA

Jason Kong

jckong@ucsd.edu

University of California San Diego

La Jolla, CA, USA

Onat Gungor

onat.gungor@mail.wvu.edu

West Virginia University

Morgantown, WV, USA

Abstract

Reinforcement learning (RL) post-training improves the reasoning capabilities of large language models, but its cost is dominated by autoregressive rollout generation, which can exceed 70% of training time. Existing speculative-decoding methods are poorly suited to this setting: model-based drafters consume scarce GPU memory and may become misaligned as the policy evolves, while existing model-free methods do not explicitly exploit repetition across training epochs. We observe that recent rollouts of the same prompt provide a high-quality, self-updating draft source. Based on this insight, we propose NgramRL, a per-prompt n-gram drafter constructed from bounded recent rollout history. NgramRL requires no auxiliary model, drafter training, or persistent GPU-resident drafter state, while target-model verification preserves the rollout distribution. To hide CPU cache lookup and scheduling, we further introduce an adaptive fan-out prefetcher that predicts likely verification outcomes (j,b)(j, b), consisting of the accepted draft length j and target-emitted continuation token b. A causal budget allocator concentrates prefetches on high-probability outcomes, while uncovered outcomes fall back to sequential lookup without changing committed tokens. Across two model families and three reasoning and structured-generation workloads, NGRAMRL commits 3.60–7.77 tokens per target-model forward in the warm-cache regime, up to 1.99×1.99\times more than SuffixDecoding and 7.0×7.0\times more than prompt-lookup decoding. On Spider, the prefetcher covers 96.6% of Qwen3-8B outcomes at a candidate budget of 16 and improves measured rollout throughput by 1.38×1.38\times over synchronous NgramRL, approaching its 1.40×1.40\times overlap ceiling.

Keywords

reinforcement learning, large language models, speculative decoding, n-gram caching, CPU-GPU co-design

References (16)