← 开源
deepseek-ai

EPLB

Expert Parallelism Load Balancer

InfrastructureInference service optimizationPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.45k
Star
211
Fork
+4
本周
3
贡献者
创建于 2025-02-26 · 更新于 2026-10-14 · 今日第 10309 名
主要开发者
A-transformerhaosdentchenchun

deepseek-ai/EPLB 排名第 10,309,有 1,447 个星标。

同类别比较

deepseek-ai/EPLB 排名第 10,309,此处有 8 个同类条目;sauravpanda/BrowserAI 排名第 10,303。

同类别比较
名称排名指标
RaoFoundation/bittensor10,239
语言:
Python
星标数:
1,469
分叉数:
473
简介:
Internet-scale Neural Networks
nixopus/nixopus10,241
语言:
Go
星标数:
1,469
分叉数:
136
简介:
Run production apps without thinking about infrastructure. On your server or ours. Fully agentic.
modelfoxdotdev/modelfox10,251
语言:
Rust
星标数:
1,465
分叉数:
63
简介:
ModelFox makes it easy to train, deploy, and monitor machine learning models.
sauravpanda/BrowserAI10,303
语言:
TypeScript
星标数:
1,449
分叉数:
139
简介:
Run local LLMs like llama, deepseek-distill, kokoro and more inside your browser
kitops-ml/kitops10,356
语言:
Go
星标数:
1,430
分叉数:
186
简介:
An open source DevOps tool from the CNCF for packaging and versioning AI/ML models, datasets, code, and configuration into an OCI Artifact.
cloudposse/atmos10,445
语言:
Go
星标数:
1,402
分叉数:
189
简介:
👽 Terraform Orchestration Tool for DevOps. Keep environment configuration DRY with hierarchical imports of configurations, inheritance, and WAY more. Native support for Terraform and Helmfile.
GradientHQ/parallax10,462
语言:
Python
星标数:
1,397
分叉数:
150
简介:
Parallax is a distributed model serving framework that lets you build your own AI cluster anywhere
doonny/PipeCNN10,474
语言:
C
星标数:
1,393
分叉数:
373
简介:
An OpenCL-based FPGA Accelerator for Convolutional Neural Networks
关键参数与规格
关键参数与规格
参数值
语言Python
类别Infrastructure
子类别Inference service optimization
关键词Distributed training
星标数1,447
分叉数211
贡献者3
创建日期2025-02-26
更新日期2026-10-14
1 天星标数0
7 天星标数4
排名10,309
上次排名10,314
排名变化5
7 天星标排名6,158
上次 7 天星标排名6,155
7 天星标排名变化-3
总星标排名8,335
上次总星标排名8,326
总星标排名变化-9
国家China
README 摘录

Expert Parallelism Load Balancer (EPLB) When using expert parallelism (EP), different experts are assigned to different GPUs. Because the load of different experts may vary depending on the current workload, it is important to keep the load of different GPUs balanced. As described in the DeepSeek-V3 paper, we adopt a **redundant experts** strategy that duplicates heavy-loaded experts. Then, we heuristically pack the duplicated experts to GPUs to ensure load balancing across different GPUs. Moreover, thanks to the **group

-limited expert routing** used in DeepSeek-V3, we also attempt to place the experts of the same group to the same node to reduce inter-node data traffic, whenever possible. To facilitate reproduction and deployment, we open-source our deployed EP load balancing algorithm in . The algorithm computes a balanced expert replication and placement plan based on the estimated expert loads. Note that the exact method to predict the loads of experts is out of this repo's scope. A common

method is to use moving average of historical statistics. The Algorithm The load balancing algorithm comes with two policies used for different cases. Hierarchical Load Balancing When the number of server nodes divides the number of expert groups, we use the hierarchical load balancing policy to harness the group-limited expert routing. We first pack the expert groups to nodes evenly, ensuring the loads of different nodes are balanced. Then, we replicate the experts within each node. Finally, we pack

the replicated experts to individual GPUs to ensure different GPUs are load-balanced. The hierarchical load balancing policy can be used in prefilling stage with a smaller expert-parallel size. Global Load Balancing In other cases, we use the global load balancing policy that replicates the experts globally regardless of expert groups, and pack the replicated experts to individual GPUs. This policy can be adopted in decoding stage with a larger expert-parallel size. Interface and Example The main function

of the load balancer is . The following code illustrates an example of a two-layer MoE model, and each layer contains 12 experts. We introduce 4 redundant experts per layer, and the total 16 replicas are placed on 2 nodes, and each node contains 4 GPUs. The output, generated by the hierarchical load balancing policy, indicates the following expert replication and placement plan. License This code repository is released under the MIT License.

常见问题

记录了多少星标和分叉?

deepseek-ai/EPLB 有 1,447 个星标和 211 个分叉。

仓库排名是多少?

deepseek-ai/EPLB 排名第 10,309。

记录的语言和类别是什么?

deepseek-ai/EPLB 有 1,447 个星标,语言为 Python,类别为 Infrastructure。

哪个仓库排名最接近?

deepseek-ai/EPLB 与 sauravpanda/BrowserAI 比较,后者排名第 10,303,有 1,449 个星标。

README

Expert Parallelism Load Balancer (EPLB)

When using expert parallelism (EP), different experts are assigned to different GPUs. Because the load of different experts may vary depending on the current workload, it is important to keep the load of different GPUs balanced. As described in the DeepSeek-V3 paper, we adopt a redundant experts strategy that duplicates heavy-loaded experts. Then, we heuristically pack the duplicated experts to GPUs to ensure load balancing across different GPUs. Moreover, thanks to the group-limited expert routing used in DeepSeek-V3, we also attempt to place the experts of the same group to the same node to reduce inter-node data traffic, whenever possible.

To facilitate reproduction and deployment, we open-source our deployed EP load balancing algorithm in eplb.py. The algorithm computes a balanced expert replication and placement plan based on the estimated expert loads. Note that the exact method to predict the loads of experts is out of this repo's scope. A common method is to use moving average of historical statistics.

The Algorithm

The load balancing algorithm comes with two policies used for different cases.

Hierarchical Load Balancing

When the number of server nodes divides the number of expert groups, we use the hierarchical load balancing policy to harness the group-limited expert routing. We first pack the expert groups to nodes evenly, ensuring the loads of different nodes are balanced. Then, we replicate the experts within each node. Finally, we pack the replicated experts to individual GPUs to ensure different GPUs are load-balanced. The hierarchical load balancing policy can be used in prefilling stage with a smaller expert-parallel size.

Global Load Balancing

In other cases, we use the global load balancing policy that replicates the experts globally regardless of expert groups, and pack the replicated experts to individual GPUs. This policy can be adopted in decoding stage with a larger expert-parallel size.

Interface and Example

The main function of the load balancer is eplb.rebalance_experts.

The following code illustrates an example of a two-layer MoE model, and each layer contains 12 experts. We introduce 4 redundant experts per layer, and the total 16 replicas are placed on 2 nodes, and each node contains 4 GPUs.

import torch
import eplb

weight = torch.tensor([[ 90, 132,  40,  61, 104, 165,  39,   4,  73,  56, 183,  86],
                       [ 20, 107, 104,  64,  19, 197, 187, 157, 172,  86,  16,  27]])

num_replicas = 16
num_groups = 4
num_nodes = 2
num_gpus = 8

phy2log, log2phy, logcnt = eplb.rebalance_experts(weight, num_replicas, num_groups, num_nodes, num_gpus)
print(phy2log)

# Output:
# tensor([[ 5,  6,  5,  7,  8,  4,  3,  4, 10,  9, 10,  2,  0,  1, 11,  1],
#         [ 7, 10,  6,  8,  6, 11,  8,  9,  2,  4,  5,  1,  5,  0,  3,  1]])

The output, generated by the hierarchical load balancing policy, indicates the following expert replication and placement plan.

License

This code repository is released under the MIT License.

排名相邻
同类项目