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.

v0.25.1发布于 2026-10-19 06:36 UTC221star31fork同步于 2026-11-10 18:04 UTC

怎么上手

由 README 提炼,执行前请确认
uv pip install pegaflow-llm
pegaflow-server
硬件要求按 README 说明

README 未说明具体显存要求;从 GPU 卸载 KV cache,需 NVIDIA GPU(安装包分 CUDA 12 与 CUDA 13 版本),基准测试在 H800 上完成。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 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 即插即用

容易踩的坑

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

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.25.1
  1. v0.25.1最新正式版2026-10-19 · 2026-10-19 06:36 UTC

    What's Changed

    Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.6...v0.25.1

  2. v0.24.62026-09-23 · 2026-09-23 07:06 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.5...v0.24.6

  3. v0.24.52026-09-17 · 2026-09-17 13:38 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/novitalabs/pegaflow/compare/v0.24.4...v0.24.5

  4. v0.24.42026-09-09 · 2026-09-09 14:03 UTC

    这个版本没有写更新说明。

  5. v0.24.32026-09-08 · 2026-09-08 13:53 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Pegaflow

    CI PyPI License

    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

    Architecture

    Framework Integration

    FrameworkStatusLink
    vLLM✅ ReadyQuick 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):

    ConfigurationTTFT mean (ms)TTFT p99 (ms)
    PegaFlow (Cold)572.51113.7
    PegaFlow (Warm)61.577.0

    The warm-start path achieves ~9x faster TTFT compared to cold-start, demonstrating effective KV cache sharing across requests.

    Documentation