样本数量不足:候选生成策略影响LLM测试时扩展的能量与性能
研究论文 · 2026/09/19
测试时扩展可通过生成并组合多个候选回答来提升大语言模型推理能力。在基于采样的方法中,推理预算常以生成候选数量N描述,但N仅说明生成多少候选,未说明如何执行。相同候选预算可在一次批量生成调用中完成,也可拆分为多次顺序调用且每次批量较小。我们首先在500条GSM8K提示上使用Phi-3-mini和Qwen2.5-1.5B研究增加N对推理准确率的影响。如预期,将N从1增至8,Phi-3-mini准确率提升8.4个百分点,Qwen2.5-1.5B提升18.4个百分点。然而,仅准确率无法体现使用更大候选预算的系统成本。因此我们固定N=8,比较四种生成调度:1x8、2x4、4x2和8x1,其中axb表示a次生成调用,每次b个候选。在保持总候选数不变的情况下,测量延迟、吞吐量、GPU小时数和GPU设备总能耗。在A100 GPU上,八次串行调用消耗的GPU设备总能耗是一次批量生成八个候选调用的4.64-4.86倍,P95延迟为5.77-6.12倍。每个模型在三个独立调度的A100节点上以及短输出SciQ/V100实验中均出现相同模式。这些结果表明,仅候选数量不足以描述多候选测试时扩展的系统成本。当候选相互独立且内存允许时,更少生成调用且更大批量更高效。因此,评估不仅应报告候选数量和准确率,还应报告生成调度和GPU级系统指标。
该研究揭示了候选数量相同但生成调度不同时,系统能耗和延迟存在巨大差异,提醒研究者和工程师在评估测试时扩展方法时不能只看准确率和候选数,还需关注生成调度与GPU级指标,对高效部署LLM推理有直接指导意义。
Test-time scaling can improve large language model reasoning by generating and combining multiple candidate responses. In sampling-based methods, the inference budget is often described by the number of generated candidates, N. However, N tells us how many candidates are generated, not how they are executed. The same candidate budget can be produced in one batched generation call or split across several sequential calls with smaller batch sizes. We first study the effect of increasing N on reasoning accuracy using Phi-3-mini and Qwen2.5-1.5B on 500 GSM8K prompts. As expected, increasing N from 1 to 8 improves accuracy by 8.4 percentage points for Phi-3-mini and 18.4 points for Qwen2.5-1.5B. However, accuracy alone does not show the systems cost of using a larger candidate budget. We therefore fix N = 8 and compare four generation schedules: 1x8, 2x4, 4x2, and 8x1, where axb denotes a generation calls with b candidates per call. We measure latency, throughput, GPU-hours, and gross GPU-device energy while keeping the total candidate count fixed. On A100 GPUs, eight serial calls use 4.64-4.86x as much gross GPU-device energy and have 5.77-6.12x the P95 latency of one batched call with eight candidates. The same pattern appears across three independently scheduled A100 nodes per model and in short-output SciQ/V100 experiments. These results show that candidate count alone is not enough to describe the systems cost of multi-candidate test-time scaling. When candidates are independent and memory allows it, fewer generation calls with larger batch sizes are more efficient. Evaluations should therefore report not only candidate count and accuracy, but also generation schedule and GPU-level systems metrics.