Files
myWiki/concepts/prefill-decode-disaggregation.md

39 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Prefill-Decode 分离架构 (PD Disaggregation)"
created: 2026-04-19
updated: 2026-04-19
type: concept
tags: [inference, system-design, architecture]
sources: [raw/papers/qin-prfaas-cross-datacenter-2026.md]
---
# Prefill-Decode 分离架构 (PD Disaggregation)
## 定义
将 LLM 推理的两个主要阶段——**Prefill**(处理 prompt计算密集型**Decode**(自回归生成 token内存密集型——分离到不同的硬件或集群上执行以优化资源利用率。
## 演进背景
1. **同构部署**Prefill 和 Decode 在同一 GPU 上执行,资源利用率低
2. **PD 分离**:将两者分离,分别优化计算和内存资源
3. **跨数据中心 PD 分离**PrfaaS 架构进一步打破网络域限制,实现跨数据中心的资源弹性
## 核心挑战
- **KVCache 传输成本**Dense-attention 模型产生巨大的 KVCache需要高带宽低延迟网络RDMA
- **负载不均衡**Prefill 和 Decode 的峰值时间不同,但传统架构受限于网络拓扑
- **异构部署困难**:不同代际或类型的加速器难以在同一网络域内协同
## 最新进展
- **混合注意力架构**(如 Hyena、基于状态空间的模型大幅减少 KVCache 大小
- **PrfaaS** (Qin et al., 2026):结合模型侧 KV 效率与系统侧选择性卸载,实现跨数据中心 PD 分离
- **商用以太网替代 RDMA**:降低部署成本和复杂性
## 相关概念
- [[prefill-as-a-service]] — PrfaaS 架构
- [[kvcache-transfer]] — KVCache 传输优化
- [[hybrid-attention-architecture]] — 混合注意力架构