mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Fix L270 - hasattr("moe_args") returning False error
This commit is contained in:
parent
81799d8b55
commit
aadef12312
@ -267,7 +267,7 @@ def write_model(
|
||||
|
||||
num_key_value_heads = params["n_kv_heads"] # for GQA / MQA
|
||||
|
||||
if hasattr(params, "moe_args"):
|
||||
if params.get("moe_args", ""):
|
||||
num_experts = params["moe_args"]["num_experts"]
|
||||
interleave_moe_layer_step = params["moe_args"].get("interleave_moe_layer_step", 1)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user