让我们逐步采样:自适应一致性用于大型语言模型的高效推理与编码
Let's Sample Step by Step: Adaptive-Consistency for Efficient Reasoning and Coding with LLMs
AI总结:
提出自适应一致性方法,基于样本一致性动态调整采样数量,在17个数据集和三个LLM上实现最高7.9倍预算削减,准确率损失低于0.1%。
摘要:
提升大型语言模型(LLMs)输出正确性的一种流行方法是自一致性(Self-Consistency)——多次询问LLM并输出最频繁的解决方案。现有的自一致性技术总是为每个问题生成恒定数量的样本,而更好的方法将是根据已生成样本之间的一致性程度,非均匀地分配可用预算。为此,我们引入了自适应一致性(Adaptive-Consistency),这是一种成本高效、模型无关的技术,利用轻量级停止准则动态调整每个问题的样本数量。我们在17个推理和代码生成数据集以及三个LLM上的实验表明,自适应一致性将样本预算最多减少了7.9倍,平均准确率下降不到0.1%。我们的代码和数据可在https://www.sample-step-by-step.info获取。
英文摘要:
A popular approach for improving the correctness of output from large language models (LLMs) is Self-Consistency - poll the LLM multiple times and output the most frequent solution. Existing Self-Consistency techniques always generate a constant number of samples per question, where a better approach will be to non-uniformly distribute the available budget based on the amount of agreement in the samples generated so far. In response, we introduce Adaptive-Consistency, a cost-efficient, model-agnostic technique that dynamically adjusts the number of samples per question using a lightweight stopping criterion. Our experiments over 17 reasoning and code generation datasets and three LLMs demonstrate that Adaptive-Consistency reduces sample budget by up to 7.9 times with an average accuracy drop of less than 0.1%. Our code and data are available at https://www.sample-step-by-step.info
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。