用数学编码实现高效多样本生成,提升大模型推理与翻译性能
Quasi-random Multi-Sample Inference for Large Language Models
- 通过数学编码实现并行化多样本采样,替代传统串行方法
- 在GSM8K上准确率提升3-5个百分点,WMT19译文质量提高0.45-0.89%
- 无需额外计算开销,适合需要高多样性的生成任务
大型语言模型常采用多样本解码策略。本文提出基于数学编码的算术采样方法,利用模型隐式定义的算术码本,实现高效且可并行的多样本生成。相比传统的束搜索和采样方法,该方法克服了难以并行化或样本多样性不足的问题。研究对比算术采样与祖先采样在链式思维推理(自洽性)和机器翻译(最小贝叶斯风险解码)中的表现。结果表明,随着样本数量增加,算术采样生成的样本更具多样性,显著提升推理与翻译性能:在GSM8K数据集上准确率提升3-5个百分点,在WMT19任务中COMET评分提高0.45-0.89%,且无明显计算开销增加。
原文摘要 · Abstract (English)
Large language models (LLMs) are often equipped with multi-sample decoding strategies. An LLM implicitly defines an arithmetic code book, facilitating efficient and embarrassingly parallelizable \textbf{arithmetic sampling} to produce multiple samples using quasi-random codes. Traditional text generation methods, such as beam search and sampling-based techniques, have notable limitations: they lack parallelizability or diversity of sampled sequences. This study explores the potential of arithmetic sampling, contrasting it with ancestral sampling across two decoding tasks that employ multi-sample inference: chain-of-thought reasoning with self-consistency and machine translation with minimum Bayes risk decoding. Our results demonstrate that arithmetic sampling produces more diverse samples, significantly improving reasoning and translation performance as the sample size increases. We observe a $\mathbf{3\text{-}5\%}$ point increase in accuracy on the GSM8K dataset and a $\mathbf{0.45\text{-}0.89\%}$ point increment in COMET score for WMT19 tasks using arithmetic sampling without any significant computational overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。