[Model] Add ToolParser and MoE Config for Hunyuan A13B (#20820)

Signed-off-by: Asher Zhang <asherszhang@tencent.com>
This commit is contained in:
Asher
2025-07-17 09:10:09 +00:00
committed by GitHub
parent 11dfdf21bf
commit 5a7fb3ab9e
17 changed files with 1712 additions and 4 deletions
+5
View File
@@ -586,6 +586,11 @@ def main(args: argparse.Namespace):
topk = config.num_experts_per_tok
intermediate_size = config.moe_intermediate_size
shard_intermediate_size = 2 * intermediate_size // args.tp_size
elif config.architectures[0] in ("HunYuanMoEV1ForCausalLM"):
E = config.num_experts
topk = config.moe_topk[0]
intermediate_size = config.moe_intermediate_size[0]
shard_intermediate_size = 2 * intermediate_size // args.tp_size
else:
# Support for llama4
config = config.get_text_config()