Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def generate_maxtext_config(vllm_config: VllmConfig) -> pyconfig.HyperParameters
if hasattr(vllm_config.model_config.hf_config, "text_config")
else vllm_config.model_config.hf_config
)
hidden_size = getattr(hf_config, "moe_intermediate_size", None)
hidden_size = (
getattr(hf_config, "moe_intermediate_size", None)
or getattr(hf_config, "intermediate_size", None)
)
num_lanes = pltpu.get_tpu_info().num_lanes
num_kv_heads = hf_config.num_key_value_heads

Expand Down
2 changes: 2 additions & 0 deletions src/maxtext/layers/moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,8 @@ def fused_moe_matmul(

# Map MaxText config fields to fused_moe_func args
activation = self.config.mlp_activations[0] # e.g. "silu"
if activation == "sigmoid":
activation = "swigluoai"
scoring_fn = self.config.routed_score_func if self.config.routed_score_func else "softmax"

# Check if the model architecture intrinsically renormalizes weights
Expand Down
Loading