Arithmetic Sampling: Parallel Diverse Decoding for Large Language Models
Luke Vilnis, Yury Zemlyanskiy, Patrick Murray, Alexandre Tachard Passos, Sumit Sanghai
Abstract
Decoding methods for large language models often trade-off between diversity of outputs and parallelism of computation. Methods such as beam search and Gumbel top-k sampling can guarantee a different output for each element of the beam, but are not easy to parallelize. Alternatively, methods such as temperature sampling and its modifications (top-k sampling, nucleus sampling, typical decoding, and others), are embarrassingly parallel, but have no guarantees about duplicate samples. We present a framework for sampling according to an arithmetic code book implicitly defined by a large language model, compatible with common sampling variations, with provable beam diversity under certain conditions, as well as being embarrassingly parallel and providing unbiased and consistent expectations from the original model. We demonstrate the effectiveness of our approach on WMT machine translation, more than halving the standard deviation when estimating expected BLEU score reward, and closing the BLEU score gap between independent sampling and beam search by up to 63%.
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.
8 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Neural Text Generation With Unlikelihood Training cites The Curious Case of Neural Text Degeneration
- The Curious Case of Neural Text Degeneration cites Neural Text Generation With Unlikelihood Training
- Cultivating Pluralism In Algorithmic Monoculture: The Community Alignment Dataset cites Training language models to follow instructions with human feedback
- Detecting Machine-Generated Texts by Multi-Population Aware Optimization for Maximum Mean Discrepancy cites Language Models are Few-Shot Learners
- Detecting Machine-Generated Texts by Multi-Population Aware Optimization for Maximum Mean Discrepancy cites Training language models to follow instructions with human feedback
- Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
- p-less Sampling: A Robust Hyperparameter-Free Approach for LLM Decoding cites The Curious Case of Neural Text Degeneration
- Semantic-guided Diverse Decoding for Large Language Model cites The Curious Case of Neural Text Degeneration
- Probabilistic Inference in Language Models via Twisted Sequential Monte Carlo cites The Curious Case of Neural Text Degeneration
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Cited by top-tier papers8
- Probabilistic Inference in Language Models via Twisted Sequential Monte CarloStephen Zhao, Rob Brekelmans, Alireza Makhzani, Roger Baker GrosseICML 2024 · 61 citations
- Cultivating Pluralism In Algorithmic Monoculture: The Community Alignment DatasetLily H Zhang, Smitha Milli, Karen Long Jusko, Jonathan Smith et al.ICLR 2026 · 41 citations
- Detecting Machine-Generated Texts by Multi-Population Aware Optimization for Maximum Mean DiscrepancyShuhai Zhang, Yiliao Song, Jiahao Yang, Yuanqing Li et al.ICLR 2024 · 19 citations
- Semantic-guided Diverse Decoding for Large Language ModelWeijie Shi, Yue Cui, Yaguang Wu, Jingzhi Fang et al.NeurIPS 2025 · 8 citations
- p-less Sampling: A Robust Hyperparameter-Free Approach for LLM DecodingRunyan Tan, Shuang Wu, Phillip HowardICLR 2026 · 2 citations
Builds on7
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan et al.ICLR 2020 · 683 citations
- Attention-based Contextual Language Model Adaptation for Speech RecognitionRichard Diehl Martinez, Scott Novotney, Ivan Bulyko, Ariya Rastrow et al.ACL Findings 2021 · 4 citations
Related papers
- Local Normalization Distortion and the Thermodynamic Formalism of Decoding Strategies for Large Language ModelsTom Kempton, Stuart BurrellEMNLP Findings 2025
- Entropy-informed Decoding: Adaptive Information-Driven BranchingBenjamin Patrick Evans, Sumitra Ganesh, Leo ArdonICML 2026
- Turning Up the Heat: Min-p Sampling for Creative and Coherent LLM OutputsNguyen Nhat Minh, Andrew Baker, Clement Neo, Allen G. Roush et al.ICLR 2025
- Follow the Wisdom of the Crowd: Effective Text Generation via Minimum Bayes Risk DecodingMirac Suzgun, Luke Melas-Kyriazi, Dan JurafskyACL Findings 2023 · 12 citations
- When Life Gives You Samples: The Benefits of Scaling up Inference Compute for Multilingual LLMsAmmar Khairi, Daniel D'souza, Ye Shen, Julia Kreutzer et al.EMNLP 2025 · 1 citation
