Skip to content

Commit 75202b0

Browse files
authored
Read config pattern for Qwen3Next (#40792)
read it
1 parent 7401cfa commit 75202b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transformers/models/qwen3_next/configuration_qwen3_next.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ def __init__(
243243

244244
self.layer_types = layer_types
245245
if self.layer_types is None:
246+
interval_pattern = kwargs.get("full_attention_interval", 4)
246247
self.layer_types = [
247-
"linear_attention" if bool((i + 1) % 4) else "full_attention" for i in range(self.num_hidden_layers)
248+
"linear_attention" if bool((i + 1) % interval_pattern) else "full_attention"
249+
for i in range(self.num_hidden_layers)
248250
]
249251
layer_type_validation(self.layer_types)
250252

0 commit comments

Comments
 (0)