Glinthawk:一种用于离线大语言模型(LLM)推理的双层架构
Glinthawk: A Two-Tiered Architecture for Offline LLM Inference
AI总结:
该研究提出双层架构Glinthawk,通过将注意力机制卸载到低端计算层优化高端加速器利用率,使键值缓存内存需求独立扩展,在NVIDIA T4 GPU和CPU虚拟机上实现吞吐量提升5.9倍、成本降低2.8倍(长序列更优),适用于批量处理等场景。
摘要:
我们提出Glinthawk,一种用于离线大语言模型(LLM)推理的架构。通过利用双层结构,Glinthawk将注意力机制卸载到低端计算层(“Tier 2”),从而优化高端加速器(“Tier 1”)的利用率。这种分离使注意力的内存需求(即键值缓存)能够独立于模型权重扩展,支持更大的批处理大小和更高效的加速器使用。基于NVIDIA T4 GPU和标准CPU虚拟机的原型显示,与分页注意力基线相比,Glinthawk的吞吐量提升5.9倍,生成成本降低2.8倍;对于长序列长度,吞吐量提升16.3倍,成本降低2.4倍。我们的评估表明,该架构可容忍中等网络延迟且性能下降极小,对批量处理等延迟容忍、吞吐量优先的应用极为有效。原型可在https://github.com/microsoft/glinthawk公开获取。
英文摘要:
We introduce Glinthawk, an architecture for offline Large Language Model (LLM) inference. By leveraging a two-tiered structure, Glinthawk optimizes the utilization of the high-end accelerators ("Tier 1") by offloading the attention mechanism to lower-end compute tier ("Tier 2"). This separation allows the memory demand of the attention, known as the key-value cache, to scale independently from the model weights, enabling larger batch sizes and more efficient accelerator usage. Prototyped with NVIDIA T4 GPUs and standard CPU VMs, Glinthawk improves throughput by $5.9\times$ and reduces cost of generation by $2.8\times$, compared to paged attention baselines. For long sequence lengths, it achieves $16.3\times$ throughput improvement at $2.4\times$ less cost. Our evaluation shows that this architecture can tolerate moderate network latency with minimal performance degradation, making it highly effective for latency-tolerant, throughput-focused applications such as batch processing. The prototype is publicly available at https://github.com/microsoft/glinthawk.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。