[Feature] Add deterministic forced routing for CUDA MoE benchmarks - #243
Conversation
|
Could we avoid this version-specific monkey patch and use vLLM's built-in routing simulator instead? For example, AFD could register its own strategy via I understand that the simulator strategy returns both routing weights and expert IDs, whereas this patch preserves the native weights and only overrides the IDs. Is preserving the exact native weights essential for the benchmark results? If the AFD strategy can reproduce the required weight semantics, this approach would encapsulate the deterministic/load-balanced routing in plugin-owned code while avoiding patches to |
Signed-off-by: Xinpei Wang <wangxinpei@tju.edu.cn>
feab45d to
8103f4a
Compare
I have replaced the version-specific router monkey patch with a plugin-owned afd_balanced strategy registered through vLLM's RoutingSimulator. Exact native weights are not required for this benchmark, so the strategy returns normalized uniform weights while preserving deterministic expert placement and balanced token volume. |
Purpose
Add an opt-in CUDA benchmark control that gives native and AFD MoE runs deterministic routing with balanced token volume across EP ranks.
This extends the existing NPU benchmark semantics to CUDA without making the control model- or connector-specific.
Issue
Scope
Implementation Notes
VLLM_MOE_ROUTING_SIMULATION_STRATEGY=afd_balancedselects the plugin-owned strategy through vLLM's routing simulator.AFD_BENCHMARK_FORCE_LB_TOPN_PER_RANK=0uses all local experts; a positive value limits the deterministic pool on every EP rank.additional_configpath because vLLM already exposes the required extension point.No vLLM source file or router implementation is modified. Without the strategy selector, normal vLLM routing is unchanged.
Test Plan
GPU validation:
Test Result
git diff --check: passed.Docs Impact
docs/design/module/compatibility_and_patches.md.Essential PR Checklist
registration when vLLM is installed.