arXiv:2504.17449cs.LGcs.AI2025-04中稿 · VLDBJ 2025被引 1

通过分层知识管理,让单块GPU同时高效运行上万个大模型。

HMI: Hierarchical Knowledge Management for Efficient Multi-Tenant Inference in Pretrained Language Models

  • 将模型知识分层管理,减少每个租户的显存占用。
  • 单张GPU可支持1万多个hBERT/hGPT模型,精度几乎无损。
  • 适合需要高并发部署大模型的云服务或企业场景。

预训练语言模型(PLMs)巨大的计算需求,尤其在多租户环境下,对硬件资源构成严峻挑战。为此,我们提出基于分层知识管理的多租户推理系统HMI,实现不同租户使用各异的PLM时的资源高效管理。方法包含三方面:首先,将模型知识划分为通用、领域特定和任务特定三类,并利用各层级知识获取规律,通过提取与存储不同层次的知识构建分层语言模型(hPLMs),显著降低每租户的显存开销;其次,在HMI中对各租户生成的hPLMs实施分层知识管理:通过频率驱动构建与更新领域特定知识树来适度增加存储开销,以管理领域知识;在有限显存内通过参数交换机制管理任务特定知识;最后,引入系统级优化以提升资源利用率与推理吞吐量,包括基于分层知识预取的细粒度流水线设计,实现CPU与I/O操作与GPU计算重叠,以及采用批处理矩阵乘法优化并行执行。实验表明,所提HMI可在单张GPU上高效服务多达10,000个hBERT/hGPT模型,且精度损失可忽略不计。

原文摘要 · Abstract (English)

The significant computational demands of pretrained language models (PLMs), which often require dedicated hardware, present a substantial challenge in serving them efficiently, especially in multi-tenant environments. To address this, we introduce HMI, a Hierarchical knowledge management-based Multi-tenant Inference system, designed to manage tenants with distinct PLMs resource-efficiently. Our approach is three-fold: Firstly, we categorize PLM knowledge into general, domain-specific, and task-specific. Leveraging insights on knowledge acquisition across different model layers, we construct hierarchical PLMs (hPLMs) by extracting and storing knowledge at different levels, significantly reducing GPU memory usage per tenant. Secondly, we establish hierarchical knowledge management for hPLMs generated by various tenants in HMI. We manage domain-specific knowledge with acceptable storage increases by constructing and updating domain-specific knowledge trees based on frequency. We manage task-specific knowledge within limited GPU memory through parameter swapping. Finally, we propose system optimizations to enhance resource utilization and inference throughput. These include fine-grained pipelining via hierarchical knowledge prefetching to overlap CPU and I/O operations with GPU computations, and optimizing parallel implementations with batched matrix multiplications. Our experimental results demonstrate that the proposed HMI can efficiently serve up to 10,000 hPLMs (hBERTs and hGPTs) on a single GPU, with only a negligible compromise in accuracy.

大模型推理多租户显存优化分层知识

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。