arXiv:2508.14544cs.LGcs.AI2025-08被引 13

用预测区间下界动态调整推理调度,降低大模型延迟与能耗

Adaptively Robust LLM Inference Optimization under Prediction Uncertainty

  • 基于输出长度预测区间下界动态调度,避免内存溢出
  • 算法在仿真中逼近理想调度器性能,延迟降低显著
  • 适合高并发、低资源的大模型服务场景

我们研究如何优化大型语言模型(LLM)推理调度以最小化总延迟。LLM推理是在线多任务服务过程,需持续处理输入请求并逐个生成输出标记,能耗较高。关键挑战在于:输入长度已知,但输出长度未知,直接影响内存使用和处理时间。为此,我们提出利用机器学习预测输出长度的区间(最小-最大范围)。首先设计保守算法$$\mathcal{A}_{\max}$$,依据预测上限调度以防内存溢出,但因过度保守导致性能随预测精度下降而恶化。为此提出自适应算法$$\mathcal{A}_{\min}$$,初始采用预测下界作为估计值,并在推理过程中动态修正。理论证明该算法达到对数尺度的竞争比。数值仿真显示,$$\mathcal{A}_{\min}$$在多数情况下表现接近事后最优调度器,兼具高效性与鲁棒性。且其仅依赖预测区间的下界——这一设计优势明显,因上限通常更难准确预测。

原文摘要 · Abstract (English)

We study the problem of optimizing Large Language Model (LLM) inference scheduling to minimize total latency. LLM inference is an online and multi-task service process and also heavily energy consuming by which a pre-trained LLM processes input requests and generates output tokens sequentially. Therefore, it is vital to improve its scheduling efficiency and reduce the power consumption while a great amount of prompt requests are arriving. A key challenge in LLM inference scheduling is that while the prompt length is known upon arrival, the output length, which critically impacts memory usage and processing time, is unknown. To address this uncertainty, we propose algorithms that leverage machine learning to predict output lengths, assuming the prediction provides an interval classification (min-max range) for each request. We first design a conservative algorithm, $\mathcal{A}_{\max}$, which schedules requests based on the upper bound of predicted output lengths to prevent memory overflow. However, this approach is overly conservative: as prediction accuracy decreases, performance degrades significantly due to potential overestimation. To overcome this limitation, we propose $\mathcal{A}_{\min}$, an adaptive algorithm that initially treats the predicted lower bound as the output length and dynamically refines this estimate during inferencing. We prove that $\mathcal{A}_{\min}$ achieves a log-scale competitive ratio. Through numerical simulations, we demonstrate that $\mathcal{A}_{\min}$ often performs nearly as well as the hindsight scheduler, highlighting both its efficiency and robustness in practical scenarios. Moreover, $\mathcal{A}_{\min}$ relies solely on the lower bound of the prediction interval--an advantageous design choice since upper bounds on output length are typically more challenging to predict accurately.

大模型推理调度优化不确定性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。