Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
1effba4c
Unverified
Commit
1effba4c
authored
Apr 17, 2025
by
Michael Feil
Committed by
GitHub
Apr 17, 2025
Browse files
Configuration qwen2_moe.py - qkv_bias now in transformers (#5512)
parent
a0fc5bc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
python/sglang/srt/models/qwen2_moe.py
python/sglang/srt/models/qwen2_moe.py
+1
-2
No files found.
python/sglang/srt/models/qwen2_moe.py
View file @
1effba4c
...
...
@@ -262,8 +262,7 @@ class Qwen2MoeDecoderLayer(nn.Module):
rope_theta
=
getattr
(
config
,
"rope_theta"
,
10000
)
rope_scaling
=
getattr
(
config
,
"rope_scaling"
,
None
)
max_position_embeddings
=
getattr
(
config
,
"max_position_embeddings"
,
8192
)
# note: replace config.num_hidden_layers < 80 with True once its available in transformers 4.50.0
qkv_bias
=
getattr
(
config
,
"qkv_bias"
,
config
.
num_hidden_layers
<
80
)
qkv_bias
=
getattr
(
config
,
"qkv_bias"
,
True
)
self
.
self_attn
=
Qwen2MoeAttention
(
hidden_size
=
self
.
hidden_size
,
num_heads
=
config
.
num_attention_heads
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment