ATEST:面向LLM推理的自适应资源感知测试时扩展
研究论文 · 2026/10/22
测试时缩放(TTS)通过采样多个答案来提升大语言模型(LLM)的推理能力,但固定的采样预算忽略了查询难度和GPU竞争下推理能耗的变化。我们测量到,随着GPU负载升高,同一四样本查询的能耗可增加高达4.1倍。我们提出ATEST,一种资源感知的TTS框架,它同时考虑额外样本的期望价值及其当前GPU成本。ATEST-Online是其默认模式,无需离线校准:它增量生成样本,估计多数答案的稳定性,监控实时GPU状况,并在线学习步骤能耗成本以决定何时停止。ATEST-Calibrated则使用离线准确率和成本模型为每个查询选择预算,适合负载稳定的部署。我们在NVIDIA A100上使用Phi-3-mini,在受控变化负载下,对四个推理和问答数据集评估了两种模式,并测试了向NVIDIA L40S和Qwen2.5-3B的迁移。在四个A100数据集上,ATEST-Online在不超能耗预算的情况下回答了每个查询,同时达到最高或统计上并列的准确率,并随负载增加减少采样。在高负载下的GSM8K上,它实现了60.0%的准确率且无延迟,而ATEST-Calibrated为44.0%的准确率和42.4%的延迟。消融实验表明,在线成本学习驱动了对负载的适应。包括离线分析在内,ATEST-Online在评估工作负载上使用的GPU时间比ATEST-Calibrated少42倍,能耗少48倍。在线控制以短任务上更高的尾部延迟和更低的吞吐量为代价,换取变化负载下的鲁棒性;离线校准在稳定条件下仍具竞争力。
该论文解决了LLM推理中测试时缩放忽略资源成本的问题,提出了实用的资源感知框架,在动态负载下实现能效与准确率的平衡,对实际部署具有重要价值。
Test-time scaling (TTS) improves large language model (LLM) reasoning by sampling multiple answers, but fixed sampling budgets ignore both query difficulty and the changing energy cost of inference under GPU contention. We measure up to a 4.1-fold increase in energy for the same four-sample query as GPU load rises. We present ATEST, a resource-aware TTS framework that jointly considers the expected value of additional samples and their current GPU cost. ATEST-Online, its default mode, requires no offline calibration: it incrementally generates samples, estimates the stability of the plurality answer, monitors live GPU conditions, and learns step energy cost online to decide when to stop. ATEST-Calibrated instead selects a per-query budget using offline accuracy and cost models, favoring deployments with stable loads. We evaluate both modes on four reasoning and question-answering datasets using Phi-3-mini on an NVIDIA A100 under controlled varying load, and test transfer to an NVIDIA L40S and Qwen2.5-3B. Across the four A100 datasets, ATEST-Online answers every query without exceeding the energy budget, while achieving the highest or statistically tied accuracy and reducing sampling as load increases. On GSM8K at high load, it achieves 60.0% accuracy with no deferrals, versus 44.0% accuracy and 42.4% deferrals for ATEST-Calibrated. Ablations show that online cost learning drives adaptation to load. Including offline profiling, ATEST-Online uses 42 times less GPU time and 48 times less energy than ATEST-Calibrated for the evaluated workload. Online control trades higher tail latency and lower throughput on short tasks for robustness under varying load; offline calibration remains competitive under stable conditions.