IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python function

rebalance_experts_hierarchical

rebalance_experts_hierarchical()​

max.pipelines.lib.eplb_rebalance.rebalance_experts_hierarchical(weight, num_physical_experts, num_groups, num_nodes, num_gpus)

source

Hierarchical rearrangement: groups -> nodes -> GPUs.

See the reference implementation in utils/benchmarking/speed-of-light/speed_of_light/eplb/rebalance_algo.py for the algorithm walkthrough.

Parameters:

Return type:

tuple[ndarray[tuple[Any, …], dtype[int64]], ndarray[tuple[Any, …], dtype[int64]], ndarray[tuple[Any, …], dtype[int64]]]