mirror of
https://github.com/vllm-project/vllm.git
synced 2025-10-20 14:53:52 +08:00
[model] make llama4 compatible with pure dense layers (#17315)
Signed-off-by: Lucia Fang <fanglu@fb.com>
This commit is contained in:
@ -273,8 +273,8 @@ class Llama4DecoderLayer(nn.Module):
|
||||
cache_config=cache_config,
|
||||
prefix=f"{prefix}.self_attn",
|
||||
)
|
||||
is_moe_layer = (self.layer_idx +
|
||||
1) % config.interleave_moe_layer_step == 0
|
||||
is_moe_layer = config.interleave_moe_layer_step > 0 and (
|
||||
self.layer_idx + 1) % config.interleave_moe_layer_step == 0
|
||||
if is_moe_layer:
|
||||
self.feed_forward = Llama4MoE(
|
||||
config=config,
|
||||
|
Reference in New Issue
Block a user