安装包按 CUDA 版本区分,CUDA 13 需装 pegaflow-llm-cu13;源码构建默认 CUDA 12.8,CUDA 13 要关默认特性并启用 cuda-13;vLLM 需通过 --kv-transfer-config 指定 PegaKVConnector 才接入。

pegaflow
novitalabsApache-2.0活跃维护面向 LLM 推理的高性能 KV cache 存储层,通过 GPU 卸载、SSD 缓存和 RDMA 跨节点共享,缓解长上下文推理的显存瓶颈,兼容 vLLM 与 SGLang。
High-performance KV cache storage for LLM inference — GPU offloading, SSD caching, and cross-node sharing via RDMA. Works with vLLM and SGLang.
uv pip install pegaflow-llm
pegaflow-serverREADME 未说明具体显存要求;从 GPU 卸载 KV cache,需 NVIDIA GPU(安装包分 CUDA 12 与 CUDA 13 版本),基准测试在 H800 上完成。
把 LLM 推理的 KV cache 卸载到内存或 SSD 并跨节点共享的高性能存储引擎
面向 LLM 推理的高性能 KV cache 存储层,通过 GPU 卸载、SSD 缓存和 RDMA 跨节点共享,缓解长上下文推理的显存瓶颈,兼容 vLLM 与 SGLang。
核心能力
- 以独立 sidecar 运行,KV cache 不随推理引擎重启丢失
- NUMA 感知固定内存加分层 DMA,跑满 PCIe 带宽
- Rust 核心无 GIL,热路径零 Python 开销
- 内置 Prometheus 指标与 OTLP 导出
- 作为 vLLM 的 KV connector 即插即用
容易踩的坑
- v0.25.1最新正式版2026-10-19 · 2026-10-19 06:36 UTC
What's Changed
- feat(core): prioritize P2P sources for eviction by @GentleCold in https://github.com/novitalabs/pegaflow/pull/458
- feat(core): demote P2P sources on successful transfer release by @GentleCold in https://github.com/novitalabs/pegaflow/pull/467
- feat(connector): support Gemma4 hybrid KV cache by @GentleCold in https://github.com/novitalabs/pegaflow/pull/455
- feat(metaserver): configure reclaim hint owner threshold by @GentleCold in https://github.com/novitalabs/pegaflow/pull/463
- feat(core): back up prefill retained tail on idle decode nodes by @GentleCold in https://github.com/novitalabs/pegaflow/pull/469
- fix(core): reduce pinned pool fragmentation from RDMA fetch staging by @GentleCold in https://github.com/novitalabs/pegaflow/pull/465
- perf(core): rotate pool shards per 256 MiB fetch batch; raise backup defaults by @GentleCold in https://github.com/novitalabs/pegaflow/pull/470
- chore: bump version to 0.25.1 by @jimmy-evo in https://github.com/novitalabs/pegaflow/pull/472
Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.6...v0.25.1
- v0.24.62026-09-23 · 2026-09-23 07:06 UTC
查看更新说明
What's Changed
- feat(connector): support GLM-5.3-Flash kpool-tail scratch cache groups by @Kevin-XiongC in https://github.com/novitalabs/pegaflow/pull/457
- chore: bump version to 0.24.6 by @jimmy-evo in https://github.com/novitalabs/pegaflow/pull/459
Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.5...v0.24.6
- v0.24.52026-09-17 · 2026-09-17 13:38 UTC
查看更新说明
What's Changed
- fix(metaserver): preserve active blocks and skip healthy sweep scans by @GentleCold in https://github.com/novitalabs/pegaflow/pull/451
- chore: bump version to 0.24.5 by @jimmy-evo in https://github.com/novitalabs/pegaflow/pull/456
Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.4...v0.24.5
- v0.24.42026-09-09 · 2026-09-09 14:03 UTC
这个版本没有写更新说明。
- v0.24.32026-09-08 · 2026-09-08 13:53 UTC
这个版本没有写更新说明。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Pegaflow
PegaFlow is a high-performance KV cache storage engine for LLM inference. Offload KV cache from GPU to host memory or SSD, and share it across nodes via RDMA.
- Decoupled from inference lifecycle — runs as an independent sidecar; KV cache survives engine restarts, scales independently, and is shared across instances
- Topology-aware, PCIe-saturating transfers — NUMA-aware pinned memory + layer-wise DMA to maximize hardware bandwidth
- GIL-free Rust core — zero Python overhead on the hot path; your inference engine keeps its threads
- Production-ready observability — built-in Prometheus metrics and OTLP export, not an afterthought
- Pluggable — works with vLLM as a drop-in KV connector
News
- 2026-05-18 — vLLM x Novita AI: PegaFlow for Production-Grade External KV Cache, a joint blog post with the vLLM team.
Architecture
Framework Integration
| Framework | Status | Link |
|---|---|---|
| vLLM | ✅ Ready | Quick Start |
Quick Start
1. Install
uv pip install pegaflow-llm # CUDA 12
uv pip install pegaflow-llm-cu13 # CUDA 13
2. Start PegaFlow Server
pegaflow-server
3. Launch your inference engine
vLLM:
vllm serve Qwen/Qwen3-0.6B \
--kv-transfer-config '{"kv_connector": "PegaKVConnector", "kv_role": "kv_both", "kv_connector_module_path": "pegaflow.connector"}'
For full server options, multi-node setup, and advanced configuration, see Server Configuration.
Development
Build from source
export PYO3_PYTHON=$(which python)
export LD_LIBRARY_PATH=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"):$LD_LIBRARY_PATH
cargo run -r # start server
cd python && maturin develop -r # build Python bindings
The default source build targets CUDA 12.8. If your environment uses CUDA 13,
disable the default CUDA feature and enable cuda-13 explicitly:
cargo run -r --no-default-features --features cuda-13 --bin pegaflow-server
cd python && uv run maturin develop -r --no-default-features --features cuda-13
./scripts/build-wheel.sh --release --no-default-features --features cuda-13
We use Conventional Commits — run cz c for an interactive commit prompt.
Benchmarks
KV Cache Benchmark
H800 reference numbers with Llama-3.1-8B (8 prompts, 10K-token prefill, 1-token decode, 4.0 req/s):
| Configuration | TTFT mean (ms) | TTFT p99 (ms) |
|---|---|---|
| PegaFlow (Cold) | 572.5 | 1113.7 |
| PegaFlow (Warm) | 61.5 | 77.0 |
The warm-start path achieves ~9x faster TTFT compared to cold-start, demonstrating effective KV cache sharing across requests.
Documentation
- Server Configuration — full CLI options, SSD cache, multi-node setup
- P/D with NIXL — GLM-5.2 FP8 deployment with MTP and MultiConnector
- Python Package — Python bindings and vLLM connector configuration
- P2P KV Cache Sharing — cross-node RDMA setup, tuning, and troubleshooting
- P/D Router — prefill/decode disaggregation
- vLLM I/O Patch — optional patch for better transfer throughput
- Metrics — Prometheus and OTLP metrics reference
- Goals & Non-Goals — project scope and design philosophy