"vscode:/vscode.git/clone" did not exist on "53f70e73344a67f61b80feab03834a770bfb671b"
Unverified Commit b230286f authored by Harry Mellor's avatar Harry Mellor Committed by GitHub
Browse files

Fix `get_num_experts` when config sets it explicitly to `None` (#28652)


Signed-off-by: default avatarHarry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: default avatarbruceszchen <bruceszchen@tencent.com>
parent 3035d1a1
......@@ -1342,7 +1342,8 @@ class ModelConfig:
# Ernie VL's remote code uses list[int]...
# The values are always the same so we just take the first one.
return num_experts[0]
return num_experts
# Coerce to 0 if explicitly set to None
return num_experts or 0
def get_layers_start_end_indices(
self, parallel_config: ParallelConfig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment