Support picking variants of EPLB algorithms (#6728)

This commit is contained in:
fzyzcjy
2025-05-29 23:12:01 +08:00
committed by GitHub
parent 7e5071c92a
commit 3ab7d9b55e
5 changed files with 313 additions and 18 deletions

View File

@@ -175,6 +175,7 @@ class ServerArgs:
ep_dispatch_algorithm: Optional[Literal["static", "dynamic", "fake"]] = None
init_expert_location: str = "trivial"
enable_eplb: bool = False
eplb_algorithm: str = "auto"
eplb_rebalance_num_iterations: int = 1000
expert_distribution_recorder_mode: Optional[
Literal["stat", "per_pass", "per_token"]
@@ -1328,6 +1329,12 @@ class ServerArgs:
action="store_true",
help="Enable EPLB algorithm",
)
parser.add_argument(
"--eplb-algorithm",
type=str,
default=ServerArgs.eplb_algorithm,
help="Chosen EPLB algorithm",
)
parser.add_argument(
"--eplb-rebalance-num-iterations",
type=int,