deepseek-ai/DeepEP

DeepEP: an efficient expert-parallel communication library

What it solves

DeepEP addresses the communication bottlenecks in modern machine learning training and inference, specifically for Mixture-of-Experts (MoE) models. It provides high-throughput, low-latency all-to-all GPU kernels for expert parallelism (EP) dispatch and combine operations, reducing the overhead of moving tokens between GPUs while minimizing the consumption of Streaming Multiprocessors (SMs).

How it works

DeepEP implements a high-performance communication library that utilizes a lightweight Just-In-Time (JIT) compilation module to generate kernels at runtime, removing the need for CUDA compilation during installation. It uses the NCCL Gin backend for lightweight communication and provides an ElasticBuffer interface to unify high-throughput and low-latency APIs. The library supports low-precision formats like FP8 and leverages RDMA and NVLink for efficient internode and intranode data transfer. It also includes experimental primitives for pipeline parallelism (PP), context parallelism (CP), and remote memory access (Engram).

Who it’s for

It is designed for developers and researchers training or deploying large-scale MoE models on Hopper (SM90) GPUs or newer architectures who need to maximize hardware bandwidth and minimize SM resource usage for communication.

Highlights

  • Extreme Efficiency: V2 achieves up to 1.3x peak performance over V1 while using up to 4x fewer SM resources.
  • JIT Compilation: Kernels are compiled at runtime, simplifying installation and deployment.
  • Analytical Tuning: Automatically calculates optimal SM and QP counts, eliminating the need for manual auto-tuning.
  • Broad Parallelism Support: Beyond Expert Parallelism, it offers experimental support for Pipeline Parallelism, Context Parallelism, and remote memory access.
  • Low Precision Support: Optimized for FP8 dispatching and BF16 combining.

Related

  • Project
  • Project
  • Project
  • Project
  • Project