SnowballCost:超长响应对大语言模型推理服务影响的系统性测量
SnowballCost: A Systematic Measurement of the Impact of Ultra-Long Responses on Large Language Model Inference Services
AI总结:
本研究提出SnowballCost框架,测量超长响应对LLM推理服务的成本,推导校准的成本模型含两个阈值,发现超长响应会导致推理时间超线性增长、普通请求受影响小、部分请求长期占GPU且可能提前无利可图。
摘要:
现代大语言模型(LLMs)支持越来越大的上下文窗口和输出预算。在自回归解码下,生成响应的成本增长速度快于其长度,但超长响应对LLM推理服务造成的成本仍未得到充分探索。我们提出SnowballCost,这是一个在推理服务引擎、模型和GPU配置中测量该成本的框架。从测量结果中,我们推导并校准了一个推理成本模型,其系数由模型架构、GPU规格和推理服务引擎设定,因此一次校准可适用于其他部署。该成本模型还给出两个阈值长度:一个是线性成本估计失效的阈值,另一个是请求不再盈利的阈值。我们发现:(1)即使是vLLM和SGLang等优化引擎,在极端响应长度(高达1M token)下,推理时间也呈现超线性增长;(2)与带有超长响应的请求一同服务时,普通请求仅受到轻微影响,其服务水平目标(SLO)达成率几乎没有变化;带有超长响应的请求本身,随着输出增长,生成每个token的时间会变长,且其中一些请求在普通流量结束后仍会长期占用提供商的GPU;(3)超长响应可能在完成前就变得无利可图。我们的框架、请求轨迹和分析脚本可在该https URL获取。
英文摘要:
Modern Large Language Models (LLMs) support ever-larger context windows and output budgets. Under autoregressive decoding, the cost of generating a response grows faster than its length, yet the cost that ultra-long responses impose on LLM inference services remains underexplored. We present SnowballCost, a framework that measures this cost across serving engines, models, and GPU configurations. From the measurements we derive an inference cost model and calibrate it. Its coefficients are set by the model architecture, the GPU specifications, and the serving engine, so one calibration carries over to other deployments. The cost model also gives two threshold lengths, one at which a linear cost estimate fails and one at which a request stops being profitable. We find that (1) even optimized engines such as vLLM and SGLang exhibit super-linear growth in inference time at extreme response lengths, up to 1M tokens. (2) When served alongside requests with ultra-long responses, normal requests are only slightly affected, and their SLO attainment barely changes. The requests with ultra-long responses themselves take longer to generate each token as their output grows, and a few of them occupy the provider's GPUs long after the normal traffic has finished. (3) An ultra-long response can become unprofitable before it completes. Our framework, request traces, and analysis scripts are available at this https URL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。