arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.40305cs.OScs.LG
收藏

Rimuru:通过弹性专家卸载实现现代大语言模型服务的统一内存管理

Rimuru: Unified Memory Management for Modern LLM Serving via Elastic Expert Offloading

Sun Yat-sen University(中山大学);EPFL(洛桑联邦理工学院);Peng Cheng Laboratory(鹏城实验室)

Zhiyuan Fang, Dingyang Li, Jianfeng Zhong, Bin Wang, Weixi Zhu, Cunshu Ni, Zicong Hong, Wuhui Chen, Zibin Zheng

AI总结:

Rimuru是基于vLLM的LLM服务系统,通过弹性专家卸载、共享页池等机制实现统一内存管理,大幅提升吞吐量并降低首包延迟。

摘要:

现代大语言模型(LLM)因庞大的模型权重和注意力状态而占用大量设备内存,在资源受限场景中尤为突出。现有系统分别为模型权重和注意力状态分配内存,设置固定边界,无法适应工作负载变化的内存需求:重负载下状态容量不足会限制请求并发度、降低吞吐量;轻负载下某区域的空闲内存无法重新分配给另一区域,造成设备内存浪费。同时,现代LLM架构引入了具有不同布局和生命周期的异构张量,进一步加剧了内存管理的复杂性。这些问题促使研究人员探索异构张量的统一内存管理,但仅共享内存池无法让不同分配粒度和执行布局的张量直接复用内存。本文提出Rimuru,一种通过弹性专家卸载实现统一内存管理的现代LLM服务系统。Rimuru建立共享页池,支持异构张量间的弹性内存共享;为适配不同分配粒度,引入内存视图,允许每种张量类型用自身的页大小和页表解释共享内存空间;此外,Rimuru结合巨页对齐与多级页分配器,可拆分和合并页,实现跨类型容量复用;页表感知的融合混合专家(MoE)内核直接访问非连续的专家权重,避免拷贝开销。基于这些机制,Rimuru采用工作负载感知调节器,根据运行时需求在张量类型间动态重新分配页。Rimuru构建于vLLM之上,兼容现代LLM。评估显示,Rimuru的吞吐量最高达基线系统的19.03倍,平均首包延迟(TTFT)降低98.1%。

英文摘要:

Modern LLMs strain device memory through large model weights and attention states, particularly in resource-constrained scenarios. Existing systems separately provision memory for model weights and attention states, imposing fixed fixed boundaries that cannot adapt to the changing memory demands of workloads. Under heavy workloads, insufficient state capacity limits request concurrency and reduces throughput; under light workloads, idle memory in one region cannot be reallocated to another, wasting device memory. Meanwhile, modern LLM architectures introduce heterogeneous tensors with diverse layouts and lifetimes, further complicating memory management. These problems motivate unified memory management for heterogeneous tensors. However, a shared pool alone does not make memory directly reusable across tensors with different allocation granularities and execution layouts. This paper presents Rimuru, a modern LLM serving system that unifies memory management through elastic expert offloading. Rimuru establishes a shared page pool to enables elastic memory sharing across heterogeneous tensors. To accommodate different allocation granularities, Rimuru introduces memory views that allow each tensor type to interpret the shared memory space using its own page size and page table. Furthermore, Rimuru combines huge-page alignment with a multi-level page allocator that splits and merges pages, enabling cross-type capacity reuse. A page-table-aware fused MoE kernel directly accesses non-contiguous expert weights, avoiding copy overhead. Building on these mechanisms, Rimuru employs a workload-aware adjuster that dynamically reallocates pages across tensor types according to runtime demands. Implemented on top of vLLM, Rimuru remains compatible with modern LLMs. Evaluations show that Rimuru achieves up to 19.03x baseline throughput and reduces TTFT by 98.1% on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑