超参数对大语言模型推理性能的影响:vLLM 与 HuggingFace Pipelines 评估
The Impact of Hyperparameters on Large Language Model Inference Performance: An Evaluation of vLLM and HuggingFace Pipelines
AI总结:
本文评估 vLLM 与 HuggingFace pipelines 在 20 个 LLM 上的推理吞吐量,揭示超参数对性能影响显著且呈不规则峰值,GPU 升降级时优化超参数可分别平均提升 9.16% 和 13.7%。
摘要:
近期开源大语言模型(LLM)的激增使开发者能够构建基于 AI 的解决方案,同时保持对隐私和合规等方面的控制,从而在模型部署过程中获得治理权和所有权。要使用这些 LLM,就需要推理引擎。这些引擎将模型权重加载到 GPU 等可用资源上,并处理查询以生成响应。LLM 的推理速度(即性能)对实时应用至关重要,因为每次推理都要计算数百万乃至数十亿次浮点运算。近来,vLLM 等先进推理引擎已经出现,它们融合高效内存管理等新机制,以实现最先进的性能。本文中,我们使用两个推理库 vLLM 和 HuggingFace 的 pipelines,分析了 20 个 LLM 的性能,尤其是吞吐量(单位时间生成的 token 数)。我们研究了开发者必须配置的各类超参数如何影响推理性能。结果表明,吞吐量景观并不规则,具有明显峰值,凸显了通过超参数优化实现最高性能的重要性。我们还表明,在升级或降级用于推理的 GPU 型号时应用超参数优化,可使 HuggingFace pipelines 的吞吐量分别平均提升 9.16% 和 13.7%。
英文摘要:
The recent surge of open-source large language models (LLMs) enables developers to create AI-based solutions while maintaining control over aspects such as privacy and compliance, thereby providing governance and ownership of the model deployment process. To utilize these LLMs, inference engines are needed. These engines load the model's weights onto available resources, such as GPUs, and process queries to generate responses. The speed of inference, or performance, of the LLM, is critical for real-time applications, as it computes millions or billions of floating point operations per inference. Recently, advanced inference engines such as vLLM have emerged, incorporating novel mechanisms such as efficient memory management to achieve state-of-the-art performance. In this paper, we analyze the performance, particularly the throughput (tokens generated per unit of time), of 20 LLMs using two inference libraries: vLLM and HuggingFace's pipelines. We investigate how various hyperparameters, which developers must configure, influence inference performance. Our results reveal that throughput landscapes are irregular, with distinct peaks, highlighting the importance of hyperparameter optimization to achieve maximum performance. We also show that applying hyperparameter optimization when upgrading or downgrading the GPU model used for inference can improve throughput from HuggingFace pipelines by an average of 9.16% and 13.7%, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。