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

replicate_experts

replicate_experts()​

max.pipelines.lib.eplb_rebalance.replicate_experts(weight, num_phy)

source

Replicate num_log logical experts to num_phy physical slots.

Greedy: at each step we duplicate whichever logical expert currently has the highest per-replica load.

Returns:

[X, num_phy] β€” logical expert id of each physical slot. rank: [X, num_phy] β€” replica rank within its logical expert. logcnt: [X, num_log] β€” number of replicas per logical expert.

Return type:

phy2log

Parameters: