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
7ed8e51b
Unverified
Commit
7ed8e51b
authored
Aug 03, 2025
by
Varun Vinayak Shenoy
Committed by
GitHub
Aug 03, 2025
Browse files
[fix] Fix divide by zero error for llama4. (#8683)
parent
32f28154
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/models/llama4.py
python/sglang/srt/models/llama4.py
+2
-0
No files found.
python/sglang/srt/models/llama4.py
View file @
7ed8e51b
...
...
@@ -415,6 +415,8 @@ class Llama4DecoderLayer(nn.Module):
)
def
_is_moe_layer
(
self
,
layer_id
:
int
)
->
bool
:
if
self
.
config
.
interleave_moe_layer_step
==
0
:
return
self
.
config
.
num_local_experts
>
0
return
(
layer_id
+
1
)
%
self
.
config
.
interleave_moe_layer_step
==
0
def
forward
(
...
...
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