Splitwiser:在资源受限条件下实现高效的语言模型推理
Splitwiser: Efficient LM inference with constrained resources
AI总结:
Splitwiser 通过在同一 GPU 上拆分 LLM 推理的提示计算与令牌生成两个阶段,减少跨设备数据传输和网络开销,提升内存访问与缓存利用率,并在 Huggingface 和 vLLM 上开源实现。
摘要:
高效推理大语言模型(LLM)仍然是一个关键挑战,其包含两个主要阶段:计算密集型的提示(prompt)计算阶段和内存密集型的令牌(token)生成阶段。尽管已有批处理和调度技术,令牌生成阶段仍未能充分利用计算资源,尤其是与提示计算阶段相比时。为应对这些挑战,我们提出 Splitwiser,一种将 LLM 推理请求的两个阶段拆分到同一 GPU 上的方法,从而减少开销并改善内存访问和缓存利用率。通过消除跨设备传输数据的需求,Splitwiser 旨在最小化与网络相关的开销。在本报告中,我们描述所提出流水线的基本结构,并分享初步结果与分析。我们在两个广泛使用且相互独立的 LLM 架构上实现了所提出的多进程设计:Huggingface 和 vLLM。我们开源了相应实现的代码:1)Huggingface(https://github.com/asad-aali/splitwiser),以及 2)vLLM(https://github.com/adney11/vllm-sysml)。
英文摘要:
Efficient inference of LLMs remains a crucial challenge, with two main phases: a compute-intensive prompt computation and a memory-intensive token generation. Despite existing batching and scheduling techniques, token generation phases fail to fully utilize compute resources, especially when compared to prompt computation phases. To address these challenges, we propose Splitwiser, a methodology that splits the two phases of an LLM inference request onto the same GPU, thereby reducing overhead and improving memory access and cache utilization. By eliminating the need to transfer data across devices, Splitwiser aims to minimize network-related overheads. In this report, we describe the basic structure of our proposed pipeline while sharing preliminary results and analysis. We implement our proposed multiprocessing design on two widely-used and independent LLM architectures: Huggingface and vLLM. We open-source our code for the respective implementations: 1) Huggingface (https://github.com/asad-aali/splitwiser), and 2) vLLM (https://github.com/adney11/vllm-sysml).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。