研究vLLM配置如何影响大模型推理的能耗、速度与准确率
Attention to Detail: Evaluating Energy, Performance, and Accuracy Trade-offs Across vLLM Configurations

- 系统测试vLLM三种配置组合,覆盖5个模型和5类任务
- 注意力类型和前缀缓存显著影响能耗与延迟,而分块预填充影响小
- 配置优化可局部提升性能,但模型选择决定全局权衡
大型语言模型正重塑软件开发与维护方式。它们通常通过vLLM等推理引擎部署,可高效服务预训练且高度可配置的模型。尽管已有研究聚焦于模型架构与硬件加速,推理引擎配置对能耗、性能和输出质量的影响仍不清晰。本文开展大规模受控实验,评估vLLM中三种配置选项:注意力核类型、前缀缓存与分块预填充。在5个开源大模型和5种不同推理任务上,测试所有组合,共完成9,000次运行与93,600次测量。分析能耗、延迟与准确性,并考察配置项与任务间的主效应及交互效应。结果表明,所研究配置显著影响能耗与性能,主要由注意力类型和前缀缓存驱动;而分块预填充在默认配置和评估负载下影响有限。这些效应高度依赖模型与工作负载,无全局最优配置。模型选择主导整体权衡,配置调优仅带来帕累托前沿上的局部改进。意外发现,推理选项也会影响模型准确率。
原文摘要 · Abstract (English)
Large Language Models are reshaping how software is developed and maintained. They are typically deployed in production using inference engines such as vLLM, which can efficiently serve pre-trained, highly configurable models. While prior work has focused on model architectures and hardware acceleration, the impact of inference engine configuration on energy consumption, performance, and output quality remains poorly understood. In this paper, we present a large-scale controlled study of three selected vLLM configuration options: attention kernel type, prefix caching, and chunked prefill. We evaluate all combinations of these configurations across 5 open-weight LLMs and 5 diverse inference tasks, totaling $9,000$ runs and $93,600$ measures. We analyze energy consumption, latency, and accuracy, and examine both main effects and interaction effects between configuration options and tasks. Our results show that the studied configuration options significantly impact energy and performance, mainly driven by attention type and prefix caching, while chunked prefill has a limited effect under the default vLLM serving configuration and evaluated workloads. These effects are highly model- and workload-dependent, and no configuration is universally optimal. We further show that model choice dominates global trade-offs, while configuration tuning provides local improvements along the Pareto frontier. Unexpectedly, inference options can also affect model accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。