[CI Bug] Fix pydantic_core._pydantic_core.ValidationError: Input should be a valid integer (#51179)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -172,7 +172,10 @@ class ModelArchConfigConvertorBase:
|
|||||||
"moe_topk",
|
"moe_topk",
|
||||||
"moe_top_k",
|
"moe_top_k",
|
||||||
]
|
]
|
||||||
return getattr_iter(self.hf_text_config, names, 0) or 0
|
num_experts_per_token = getattr_iter(self.hf_text_config, names, 0)
|
||||||
|
if isinstance(num_experts_per_token, list):
|
||||||
|
return max(num_experts_per_token, default=0)
|
||||||
|
return num_experts_per_token or 0
|
||||||
|
|
||||||
@final
|
@final
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user