arXiv: 2604.18529 · PDF

作者: Mao Lin, Xi Wang, Guilherme Cox, Dong Li, Hyeran Jeon

主分类: cs.PF · 全部: cs.DC, cs.PF

命中关键词: llm, rag, inference, kv cache, parallelism, attention, gpu, scheduler


TL;DR

HybridGen 提出 CPU-GPU 协同 attention 框架,配合 CXL 扩展内存,针对长上下文 LLM 推理在六种 KV cache 管理基线上平均加速 1.41×–3.2×。

核心观点

  • 现有 KV cache pruning/offloading 只用单侧算力,CPU 本地内存也未充分利用。
  • 在 CXL 分层内存系统上,CPU 与 GPU 可协同完成 attention 计算。
  • 需要同时解决多维依赖、长序列负载失衡、NUMA 惩罚三大难题。

方法

  • Attention logit parallelism:拆分 attention 计算维度,允许 CPU-GPU 并行处理不同 logit 片段,打破多维依赖瓶颈。
  • Feedback-driven scheduler:动态根据运行时负载在 CPU 与 GPU 之间再分配任务,缓解长序列场景的失衡。
  • Semantic-aware KV cache mapping:按语义将 KV cache 映射到分层内存(本地 DRAM 与 CXL 扩展内存),降低 NUMA 访问代价。

实验

  • 模型:3 种 LLM,11 种不同参数规模。
  • 平台:3 种 GPU 系统,配备 CXL 扩展内存。
  • 基线:6 种 SOTA KV cache 管理方法(pruning、offloading 系列)。
  • 指标:推理吞吐/延迟加速比 + 精度。

结果

  • 相对 6 个基线平均加速 1.41×–3.2×。
  • 精度保持优于或不逊于现有方法。
  • 具体每个模型/平台的拆分数字摘要未给出。

为什么重要

对长上下文 LLM 推理基础设施团队,它展示了 CXL 分层内存 + CPU-GPU 协同 attention 的可行路径,避免单纯 offload 造成的带宽闲置,为百 GB 级 KV cache 部署提供新思路。

与已有工作的关系

  • KV cache 压缩/淘汰:H2O、StreamingLLM、SnapKV 等 pruning 方法。
  • Offload 方向:FlexGen、DeepSpeed-Inference、PowerInfer 等 CPU-GPU 混合推理。
  • 内存扩展:围绕 CXL 分层内存的系统研究。HybridGen 把三条线合并成统一的 hybrid attention 框架。

尚未回答的问题

  • 在无 CXL 的普通 NUMA/PCIe 平台上收益如何?
  • Scheduler 对突发请求与多租户的适应性未知。
  • 与 speculative decoding、MoE 等其他推理优化的叠加效果。
  • 能耗/TCO 层面是否同样划算未评估。

论文图表

图 1: Page 2 (rendered)

图 1

图 2: Page 3 (rendered)

图 2

图 3: Page 4 (rendered)

图 3


原始摘要

As modern LLMs support thousands to millions of tokens, KV caches grow to hundreds of gigabytes, stressing memory capacity and bandwidth. Existing solutions, such as KV cache pruning and offloading, alleviate these but underutilize hardware by relying solely on either GPU or CPU for attention computing, and considering yet limited CPU local memory for KV cache storage. We propose HybridGen, an efficient hybrid attention framework for long-context LLM inference. HybridGen enables CPU-GPU collaborative attention on systems with expanded tiered memory (e.g., CXL memory), addressing three key challenges: (1) multi-dimensional attention dependencies, (2) intensifying CPU-GPU load imbalance with longer sequences, and (3) NUMA penalty of tiered memories. HybridGen tackles these by introducing attention logit parallelism, a feedback-driven scheduler, and semantic-aware KV cache mapping. Experiments with three LLM models with eleven different sizes on three GPU platforms with a CXL-expanded memory show that HybridGen outperforms six state-of-the-art KV cache management methods by 1.41x–3.2x on average while maintaining superior accuracy.