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