PulseAugur
中
实时 20:18:09

LLM serving 将 prefill 和 decode 分开以提高 GPU 利用率

高效地服务大型语言模型(LLM)涉及处理两个不同的阶段:prefill 和 decode。Prefill 阶段并行处理输入 token,是计算密集型的,受益于高算术强度。Decode 阶段逐个生成输出 token,是内存密集型的,需要高内存带宽。将这两个阶段视为一个单一任务会导致 GPU 资源利用不足,因为计算或内存带宽会成为瓶颈。通过为 prefill 和 decode 分配独立的 GPU 池来分离这两个阶段,可以显著提高利用率并降低成本,尤其是在使用 NVLink 等高速互连技术在池之间传输 KV 缓存时。 AI

影响 优化 LLM 推理服务可以降低运营成本并提高延迟,使 AI 更易于访问和更高效。

排序理由 技术论文,讨论 LLM 服务基础设施的优化策略。[lever_c_demoted from research: ic=1 ai=1.0]

在 dev.to — LLM tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

LLM serving 将 prefill 和 decode 分开以提高 GPU 利用率

报道来源 [1]

  1. dev.to — LLM tag TIER_1 English(EN) · gxqwb ·

    Prefill 与 Decode 分解:LLM 服务为何一分为二

    <p>An inference request has a beginning and a long tail. The beginning is the prompt: thousands of tokens arrive at once and the model processes them in parallel, doing the dense matrix work that training also does. The tail is generation: one token at a time, each step rereading…