An early research stage expert-parallel load balancer for MoE models based on linear programming.
deepseek-ai/LPLB 排名第 17,457,有 538 个星标。
同类别比较
deepseek-ai/LPLB 排名第 17,457,此处有 8 个同类条目;longcw/pytorch2caffe 排名第 17,462。
同类别比较| 名称 | 排名 | 指标 |
|---|
| am15h/tflite_flutter_plugin | 17,423 | - 语言:
- Dart
- 星标数:
- 540
- 分叉数:
- 359
- 简介:
- TensorFlow Lite Flutter Plugin
|
|---|
| kaito-project/aikit | 17,444 | - 语言:
- Go
- 星标数:
- 539
- 分叉数:
- 56
- 简介:
- 🏗️ Fine-tune, build, and deploy open-source LLMs easily!
|
|---|
| kubeflow/mpi-operator | 17,445 | - 语言:
- Go
- 星标数:
- 539
- 分叉数:
- 239
- 简介:
- Kubernetes Operator for MPI-based applications (distributed training, HPC, etc.)
|
|---|
| madarco/agentbox | 17,446 | - 语言:
- TypeScript
- 星标数:
- 539
- 分叉数:
- 51
- 简介:
- Run multiple agents in parallel sandboxed VMs, with a single command, on your PC or in the cloud
|
|---|
| longcw/pytorch2caffe | 17,462 | - 语言:
- Python
- 星标数:
- 538
- 分叉数:
- 147
- 简介:
- Convert PyTorch model to Caffemodel
|
|---|
| PaddlePaddle/Anakin | 17,469 | - 语言:
- C++
- 星标数:
- 537
- 分叉数:
- 135
- 简介:
- High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
|
|---|
| gitmono-dev/mega | 17,492 | - 语言:
- TypeScript
- 星标数:
- 536
- 分叉数:
- 122
|
|---|
| FMInference/H2O | 17,505 | - 语言:
- Python
- 星标数:
- 535
- 分叉数:
- 90
- 简介:
- [NeurIPS'23] H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models.
|
|---|
关键参数与规格
关键参数与规格| 参数 | 值 |
|---|
| 语言 | Python |
|---|
| 类别 | Infrastructure |
|---|
| 子类别 | Orchestration |
|---|
| 关键词 | Kernel |
|---|
| 星标数 | 538 |
|---|
| 分叉数 | 44 |
|---|
| 贡献者 | 1 |
|---|
| 创建日期 | 2025-11-19 |
|---|
| 更新日期 | 2026-10-08 |
|---|
| 1 天星标数 | 0 |
|---|
| 7 天星标数 | 0 |
|---|
| 排名 | 17,457 |
|---|
| 上次排名 | 17,243 |
|---|
| 排名变化 | -214 |
|---|
| 7 天星标排名 | 16,112 |
|---|
| 上次 7 天星标排名 | 8,914 |
|---|
| 7 天星标排名变化 | -7,198 |
|---|
| 总星标排名 | 18,279 |
|---|
| 上次总星标排名 | 18,252 |
|---|
| 总星标排名变化 | -27 |
|---|
| 国家 | China |
|---|
README 摘录
Linear-Programming-Based Load Balancer (LPLB) LPLB is a parallel load balancer that leverages linear programming to optimize expert parallel workload distribution for MoE (Mixture-of-Experts) models. It dynamically reorders experts based on workload statistics, constructs replicas considering static topology, and solves optimal token assignments for each batch to achieve dynamic load balancing. The reordering process is facilitated by EPLB, and real-time workload statistics can be provided by the user, collected via , or obtained through the internal communicators
of a Deep-EP buffer. Its embedded LP solver implements single-SM Interior Point Method (IPM) and leverages NVIDIA's cuSolverDx and cuBLASDx libraries for efficient linear algebra operations. LPLB is currently in the early research stage, and performance improvements are still under evaluation. Installation **Prerequisites:** CUDA Toolkit >= 12. DeepEP is optional but **strongly recommended** for practical use. For testing, an editable installation is recommended: Interface and Example How LPLB Works LPLB extends **EPLB** (Expert Parallelism Load Balancer) to address **dynamic
load imbalance** in Mixture-of-Experts (MoE) training. While EPLB handles static imbalances (e. , consistently overloaded experts due to data distribution), LPLB targets per-batch fluctuations caused by small-batch randomness during training. **Redundant Experts**: Each redundant expert is linked to an original expert, forming edges between GPUs. **Edge Capacity**: The capacity of an edge is the number of tokens assigned to its redundant expert in the current batch, defining the maximum token flow for balancing. **LP Optimization**: LPLB solves
a linear programming (LP) problem to redistribute tokens along these edges, minimizing load imbalance within an expert-parallel (EP) group while respecting edge capacities. Experts to be replicated are selected via EPLB (reordering only, no replication). The heaviest experts are then replicated based on the chosen LPLB topology. Real-time workload synchronization is optimized using NVLINK and NVSHMEM instead of , reducing communication overhead. Limitations The current planner balances only total token count, not accounting for non-linearity in grouped matrix
multiplication time costs, which may lead to suboptimal performance. The solver takes ~100 µs for intra-node optimization (longer for inter-node), which may be non-negligible for small batches. Under extreme global load imbalance, LPLB may perform worse than EPLB due to differences in assigning redundant experts (LPLB avoids assigning multiple replicas to the same original expert). Typical Topologies **Cube**: Replicates experts on a subset of GPUs, forming a cube graph with diagonal edges. Ideal for balancing within an
8-GPU EP subgroup without sacrificing inter-node communication. **Hypercube**: Similar to Cube but excludes diagonal edges and requires 16 GPUs. Suitable for expert parallelism across 16 GPUs. **Torus**: Replicates one expert on a neighbor GPU in the same node and another on a neighbor node, forming a torus graph. Effective for global balancing but less efficient due to intra-node communication than Cube. Custom topologies can be explored by modifying the matrix.
常见问题
记录了多少星标和分叉?
deepseek-ai/LPLB 有 538 个星标和 44 个分叉。
仓库排名是多少?
deepseek-ai/LPLB 排名第 17,457。
记录的语言和类别是什么?
deepseek-ai/LPLB 有 538 个星标,语言为 Python,类别为 Infrastructure。
哪个仓库排名最接近?
deepseek-ai/LPLB 与 longcw/pytorch2caffe 比较,后者排名第 17,462,有 538 个星标。
Linear-Programming-Based Load Balancer (LPLB)
LPLB is a parallel load balancer that leverages linear programming to optimize expert parallel workload distribution for MoE (Mixture-of-Experts) models. It dynamically reorders experts based on workload statistics, constructs replicas considering static topology, and solves optimal token assignments for each batch to achieve dynamic load balancing. The reordering process is facilitated by EPLB, and real-time workload statistics can be provided by the user, collected via torch.distributed, or obtained through the internal communicators of a Deep-EP buffer. Its embedded LP solver implements single-SM Interior Point Method (IPM) and leverages NVIDIA's cuSolverDx and cuBLASDx libraries for efficient linear algebra operations.
LPLB is currently in the early research stage, and performance improvements are still under evaluation.
Installation
Prerequisites:
- CUDA Toolkit >= 12.6.3 (with cuSolverDx dependencies).
- DeepEP is optional but strongly recommended for practical use.
- EPLB is embedded.
./download-mathdx.sh
# export NVSHMEM_DIR=... # Optional
pip install --no-build-isolation .
For testing, an editable installation is recommended:
pip install --no-build-isolation --editable .
pytest tests
Interface and Example
# Global successes counter
avail_counter = torch.zeros(1, dtype=torch.int64, device="cuda")
# Define topology of redundant experts
r2o = torch.tensor(
[
[3, 0, 1, 2, 7, 4, 5, 6],
[6, 7, 4, 5, 0, 1, 2, 3],
]
).T.int().cuda()
planner = Planner(
r2o,
n_logical_experts + n_redundants_per_rank * ep_size,
n_logical_experts,
group=ep_group,
)
# Initialize from a DeepEP `buffer` (optional)
# planner.init_from_deep_ep(buffer)
N_SMS = 100
# Logical expert indices selected by the model
indices = ...
# Planner returns physical expert indices
redirected_indices = planner.run(indices, avail_counter, N_SMS)
How LPLB Works
LPLB extends EPLB (Expert Parallelism Load Balancer) to address dynamic load imbalance in Mixture-of-Experts (MoE) training. While EPLB handles static imbalances (e.g., consistently overloaded experts due to data distribution), LPLB targets per-batch fluctuations caused by small-batch randomness during training.
- Redundant Experts: Each redundant expert is linked to an original expert, forming edges between GPUs.
- Edge Capacity: The capacity of an edge is the number of tokens assigned to its redundant expert in the current batch, defining the maximum token flow for balancing.
- LP Optimization: LPLB solves a linear programming (LP) problem to redistribute tokens along these edges, minimizing load imbalance within an expert-parallel (EP) group while respecting edge capacities.
Experts to be replicated are selected via EPLB (reordering only, no replication). The heaviest experts are then replicated based on the chosen LPLB topology. Real-time workload synchronization is optimized using NVLINK and NVSHMEM instead of torch.distributed.allreduce, reducing communication overhead. This requires DeepEP as a prerequisite.
Limitations
- The current planner balances only total token count, not accounting for non-linearity in grouped matrix multiplication time costs, which may lead to suboptimal performance.
- The solver takes ~100 µs for intra-node optimization (longer for inter-node), which may be non-negligible for small batches.
- Under extreme global load imbalance, LPLB may perform worse than EPLB due to differences in assigning redundant experts (LPLB avoids assigning multiple replicas to the same original expert).
Typical Topologies
- Cube: Replicates experts on a subset of GPUs, forming a cube graph with diagonal edges. Requires at least 2 experts per GPU. Ideal for balancing within an 8-GPU EP subgroup without sacrificing inter-node communication.
- Hypercube: Similar to Cube but excludes diagonal edges and requires 16 GPUs. Suitable for expert parallelism across 16 GPUs.
- Torus: Replicates one expert on a neighbor GPU in the same node and another on a neighbor node, forming a torus graph. Requires at least 2 experts per GPU. Effective for global balancing but less efficient due to intra-node communication than Cube.
Custom topologies can be explored by modifying the r2o matrix.