arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.09065cs.LG
收藏

学习自适应的大语言模型解码

Learning Adaptive LLM Decoding

Chloe H. Su, Zhe Ye, Samuel Tenka, Aidan Yang, Soonho Kong, Udaya Ghai

AI总结:

本文提出学习自适应解码策略,通过强化学习和可验证终端奖励提升解码准确性与预算平衡,实验表明在数学和编程竞赛基准上显著提升性能。

摘要:

大语言模型的解码通常依赖固定采样超参数(如温度、top-p),尽管任务难度和不确定性在提示和解码步骤中存在显著变化。我们提出学习自适应解码策略,动态选择采样策略,根据可用计算资源进行调整。而非微调语言模型本身,我们引入轻量级解码适配器,通过强化学习和可验证终端奖励(如数学和编程任务的正确性)进行训练。在序列层面,我们将解码视为上下文老虎机问题:策略根据提示嵌入和并行采样预算选择解码策略(如贪心、top-k、min-p)。在令牌层面,我们将解码建模为部分可观测马尔可夫决策过程(POMDP),策略根据内部模型特征和剩余令牌预算选择采样动作。在MATH和CodeContests基准上的实验表明,学习的适配器提升了准确性-预算权衡:在MATH上,令牌层面适配器在固定令牌预算下将Pass@1准确率提升高达10.2%,而序列层面适配器在固定并行采样下产生2-3%的增益。消融分析支持了序列和令牌层面适应的贡献。

英文摘要:

Decoding from large language models (LLMs) typically relies on fixed sampling hyperparameters (e.g., temperature, top-p), despite substantial variation in task difficulty and uncertainty across prompts and individual decoding steps. We propose to learn adaptive decoding policies that dynamically select sampling strategies at inference time, conditioned on available compute resources. Rather than fine-tuning the language model itself, we introduce lightweight decoding adapters trained with reinforcement learning and verifiable terminal rewards (e.g. correctness on math and coding tasks). At the sequence level, we frame decoding as a contextual bandit problem: a policy selects a decoding strategy (e.g. greedy, top-k, min-p) for each prompt, conditioned on the prompt embedding and a parallel sampling budget. At the token level, we model decoding as a partially observable Markov decision process (POMDP), where a policy selects sampling actions at each token step based on internal model features and the remaining token budget. Experiments on the MATH and CodeContests benchmarks show that the learned adapters improve the accuracy-budget tradeoff: on MATH, the token-level adapter improves Pass@1 accuracy by up to 10.2% over the best static baseline under a fixed token budget, while the sequence-level adapter yields 2-3% gains under fixed parallel sampling. Ablation analyses support the contribution of both sequence- and token-level adaptation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑