Skip to content

Commit 2351a22

Browse files
[EPLB][Doc] Update EPLB document (vllm-project#10832)
### What this PR does / why we need it? 1. Update the EPLB documentation vllm-project#10718 2. Updating the default values of EPLB parameters ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.22.1 - vLLM main: vllm-project/vllm@967c5c3 Signed-off-by: shenchuxiaofugui <1311027364@qq.com>
1 parent 34d2d05 commit 2351a22

4 files changed

Lines changed: 47 additions & 32 deletions

File tree

docs/source/developer_guide/Design_Documents/eplb_swift_balancer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To facilitate reproduction and deployment, vLLM Ascend supports the deployed EP
1010

1111
## How to Use EPLB?
1212

13-
Please refer to the EPLB section of the user guide for detailed information: [How to Use EPLB](../../user_guide/feature_guide/eplb_swift_balancer.md)
13+
Please refer to the EPLB section of the user guide for detailed information: [How to Use EPLB](../../user_guide/feature_guide/expert_parallelism_load_balancer.md)
1414

1515
## How It Works?
1616

docs/source/user_guide/feature_guide/eplb_swift_balancer.md renamed to docs/source/user_guide/feature_guide/expert_parallelism_load_balancer.md

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
1-
# Expert Load Balance (EPLB)
1+
# Expert Parallelism Load Balancer (EPLB)
22

33
## Overview
44

5-
Expert balancing for MoE (Mixture of Experts) models in LLM (Large Language) serving is essential for optimal performance. Dynamically changing experts during inference can negatively impact TTFT (Time To First Token) and TPOT (Time Per Output Token) due to stop-the-world operations. SwiftBalancer enables asynchronous expert load balancing with zero-overhead expert movement, ensuring seamless service continuity.
5+
Expert balancing for MoE (Mixture of Experts) models in LLM (Large Language) serving is essential for optimal performance. Dynamically changing experts during inference can negatively impact TTFT (Time To First Token) and TPOT (Time Per Output Token) due to stop-the-world operations. Our solution aims to minimize the negative impacts caused by the operation.
66

77
## EPLB Effects
88

99
- Reduced Latency: Dynamically balances expert loads to minimize TTFT and TPOT by distributing workloads evenly across experts.
10-
- Enhanced Throughput: Optimizes NPU utilization, increasing token generation speed under high-concurrency scenarios.
11-
- Zero-Overhead Movement: Expert redistribution occurs asynchronously without interrupting ongoing inference requests.
1210
- Adaptive Scaling: Automatically adjusts to workload fluctuations while maintaining stable performance.
13-
- Fault Tolerance: Redundant expert placement ensures system resilience during hardware failures.
1411

1512
## Support Scenarios
1613

1714
### Models
1815

19-
DeepSeekV3/V3.1/R1, Qwen3-MoE
16+
All MOE models supported by vLLM-Ascend.
17+
But we have only verified the performance on deepseek-v3.1/r1 models.
2018

2119
### MOE QuantType
2220

2321
| QuantType | Supported Hardware |
2422
| ------------------------------- | --------------------------- |
25-
| W8A8 / W8A8-Dynamic | A2, A3, Ascend 950 Products |
26-
| W4A8 (with fused MC2 enabled) | A2, A3, Ascend 950 Products |
23+
| W8A8 / W8A8-Dynamic | A2, A3 |
24+
| W4A8 (with fused MC2 enabled) | A2, A3 |
2725
| MXFP4 | Ascend 950 Products |
2826
| MXFP8 | Ascend 950 Products |
2927

@@ -42,9 +40,27 @@ EPLB has three usage modes:
4240
4341
### Dynamic EPLB
4442

45-
We need to add environment variable `export DYNAMIC_EPLB="true"` to enable vLLM EPLB. Enable dynamic balancing with auto-tuned parameters. Adjust expert_heat_collection_interval and algorithm_execution_interval based on workload patterns. In the current version, we recommend using the following: policy of swift balancer(2).
43+
We need to add environment variable `export DYNAMIC_EPLB="true"` to enable vLLM-Ascend EPLB. Enable dynamic balancing with auto-tuned parameters. Adjust expert_heat_collection_interval and algorithm_execution_interval based on workload patterns. In the current version, we recommend using the following: policy of swift balancer(2).
44+
45+
| Parameter | Description | Default |
46+
| --- | --- | --- |
47+
| dynamic_eplb | Enable dynamic EPLB. | False |
48+
| expert_heat_collection_interval | Interval for collecting expert heat. | 600 |
49+
| algorithm_execution_interval | Interval for executing the balancing algorithm. | 50 |
50+
| eplb_policy_type | EPLB policy type. | 2 |
51+
| num_redundant_experts | Number of redundant experts. | 0 |
52+
53+
```shell
54+
graph TB
55+
A[start] --> B(collect_heat)
56+
B --> C(execute_algorithm)
57+
C --> D(update_layer one by one)
58+
D --> B
59+
D --> F[termination upon service termination]
60+
```
4661

4762
```shell
63+
# D node or colocation
4864
vllm serve Qwen/Qwen3-235B-A22 \
4965
--tensor-parallel-size 16 \
5066
--enable-expert-parallel \
@@ -55,6 +71,18 @@ vllm serve Qwen/Qwen3-235B-A22 \
5571
"eplb_policy_type": 2,
5672
"num_redundant_experts": 16
5773
}}'
74+
75+
# P node
76+
vllm serve Qwen/Qwen3-235B-A22 \
77+
--tensor-parallel-size 16 \
78+
--enable-expert-parallel \
79+
--additional-config '{ "eplb_config": {
80+
"dynamic_eplb": true,
81+
"expert_heat_collection_interval": 50,
82+
"algorithm_execution_interval": 5,
83+
"eplb_policy_type": 2,
84+
"num_redundant_experts": {ep_size},
85+
}}'
5886
```
5987

6088
#### EPLB Policy Types
@@ -102,28 +130,15 @@ vllm serve Qwen/Qwen3-235B-A22 \
102130
## Critical Considerations
103131

104132
1. Parameter Tuning:
105-
- expert_heat_collection_interval: Higher values (e.g., 400+) for stable workloads; lower values (e.g., 100-200) for fluctuating traffic.
106-
- algorithm_execution_interval: Should be ≥ 30 to avoid premature balancing during startup.
107-
- num_redundant_experts: Must match tensor-parallel size (e.g., 16 for 16 NPUs) to ensure sufficient redundancy.
133+
- expert_heat_collection_interval: Higher values (e.g., 600+) for stable workloads; lower values (e.g., 50-100) for fluctuating traffic.
134+
- algorithm_execution_interval: Should be ≥ 50 to avoid premature balancing during startup.
135+
- num_redundant_experts: Must match (num_experts + num_redundant_experts) is divisible by expert-parallel size.
108136

109137
2. Hardware Requirements:
110138
- Ensure that all NPUs have identical memory capacity and compute capabilities.
111139
- Network bandwidth must support expert redistribution traffic (≥ 10 Gbps recommended).
112140

113-
3. Model Compatibility:
114-
- Only MoE models with explicit expert parallelism support (e.g., Qwen3 MoE models) are compatible.
115-
- Verify model architecture supports dynamic expert routing through `--enable-expert-parallel`.
116-
117-
4. Monitoring & Validation:
118-
- Track metrics: expert_load_balance_ratio, ttft_p99, tpot_avg, and npu_utilization.
141+
3. Monitoring & Validation:
142+
- Track metrics: Search for [Expert Hotness] in log, we will calculate the peak-to-average ratio of the load for each layer at different ranks, and then find their mean and maximum values. Current means actual peak-to-average ratio, update means estimated peak-to-average ratio after algorithm adjustment.
119143
- Use vLLM monitor to detect imbalances during runtime.
120144
- Always verify expert map JSON structure before loading (validate with jq or similar tools).
121-
122-
5. Startup Behavior:
123-
- Initial requests may experience higher latency during the first balancing cycle (typically 1-2 minutes).
124-
- Avoid sudden traffic spikes during the warm-up phase.
125-
126-
6. Common Pitfalls:
127-
- Incorrect tensor-parallel-size vs. actual NPU count → causes resource underutilization.
128-
- Using expert_map_path without generating the map first → runtime errors.
129-
- Setting num_redundant_experts > available NPUs → system failure.

docs/source/user_guide/feature_guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ quantization
1212
sleep_mode
1313
structured_output
1414
lora
15-
eplb_swift_balancer
15+
expert_parallelism_load_balancer
1616
netloader
1717
rfork
1818
dynamic_batch

vllm_ascend/ascend_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,11 +723,11 @@ class EplbConfig:
723723
_defaults = {
724724
"dynamic_eplb": False,
725725
"expert_map_path": None,
726-
"expert_heat_collection_interval": 400,
727-
"algorithm_execution_interval": 30,
726+
"expert_heat_collection_interval": 600,
727+
"algorithm_execution_interval": 50,
728728
"expert_map_record_path": None,
729729
"num_redundant_experts": 0,
730-
"eplb_policy_type": 1,
730+
"eplb_policy_type": 2,
731731
"eplb_heat_collection_stage": "all",
732732
}
733733

0 commit comments

Comments
 (0)