学习思考的难度:语言模型计算的输入自适应分配
Learning How Hard to Think: Input-Adaptive Allocation of LM Computation
AI总结:
针对现有语言模型对所有输入采用相同解码流程、计算资源分配不合理的问题,提出基于输入预测奖励分布的自适应计算分配方法,应用于两种解码流程,可在保证质量的同时减耗或在固定预算下提质。
摘要:
计算密集型解码流程(包括搜索、重排序和自我批判)能够提升语言模型(LM)在代码生成、数值推理、对话等各类问题中的输出质量。现有研究通常对语言模型的每个输入都采用相同的解码流程,但并非所有输入的处理都需要等量的计算资源。我们能否自适应分配解码计算量,为答案更难计算的问题投入更多资源?我们提出了一种方法,该方法可预测给定输入和计算预算下的奖励分布,随后将额外计算资源分配给预测认为最能从中受益的输入。我们将该方法应用于两种解码流程:第一种是自适应best-of-k流程,可动态选择生成样本的数量作为重排序器的输入;第二种是路由流程,可采用成本高但准确的解码流程,或是成本低但能力较弱的解码流程来动态响应查询。在一系列编程、数学和对话任务中,我们证明可以学习到准确的计算分配流程,并且该流程能在不降低响应质量的前提下减少最多50%的计算量,或是在固定计算预算下将质量提升最多10%。
英文摘要:
Computationally intensive decoding procedures--including search, reranking, and self-critique--can improve the quality of language model (LM) outputs in problems spanning code generation, numerical reasoning, and dialog. Existing work typically applies the same decoding procedure for every input to an LM. But not all inputs require the same amount of computation to process. Can we allocate decoding computation adaptively, using more resources to answer questions whose answers will be harder to compute? We present an approach that predicts the distribution of rewards given an input and computation budget, then allocates additional computation to inputs for which it is predicted to be most useful. We apply this approach in two decoding procedures: first, an adaptive best-of-k procedure that dynamically selects the number of samples to generate as input to a reranker; second, a routing procedure that dynamically responds to a query using a decoding procedure that is expensive but accurate, or one that is cheaper but less capable. Across a suite of programming, mathematics, and dialog tasks, we show that accurate computation-allocation procedures can be learned, and reduce computation by up to 50% at no cost to response quality, or improve quality by up to 10% at a fixed computational budget.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。