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
477fddf2
Commit
477fddf2
authored
Oct 30, 2025
by
maxiao1
Browse files
适配qwen3-next
parent
8fc55263
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/models/qwen3_next.py
python/sglang/srt/models/qwen3_next.py
+1
-1
No files found.
python/sglang/srt/models/qwen3_next.py
View file @
477fddf2
...
@@ -396,7 +396,7 @@ class Qwen3GatedDeltaNet(nn.Module):
...
@@ -396,7 +396,7 @@ class Qwen3GatedDeltaNet(nn.Module):
def
_forward_input_proj
(
self
,
hidden_states
:
torch
.
Tensor
):
def
_forward_input_proj
(
self
,
hidden_states
:
torch
.
Tensor
):
DUAL_STREAM_TOKEN_THRESHOLD
=
1024
if
not
_is_npu
else
0
DUAL_STREAM_TOKEN_THRESHOLD
=
1024
if
not
_is_npu
else
0
seq_len
,
_
=
hidden_states
.
shape
seq_len
,
_
=
hidden_states
.
shape
if
seq_len
<
DUAL_STREAM_TOKEN_THRESHOLD
:
if
seq_len
<
DUAL_STREAM_TOKEN_THRESHOLD
and
self
.
alt_stream
is
not
None
:
current_stream
=
torch
.
cuda
.
current_stream
()
current_stream
=
torch
.
cuda
.
current_stream
()
self
.
alt_stream
.
wait_stream
(
current_stream
)
self
.
alt_stream
.
wait_stream
(
current_stream
)
projected_states_qkvz
,
_
=
self
.
in_proj_qkvz
(
hidden_states
)
projected_states_qkvz
,
_
=
self
.
in_proj_qkvz
(
hidden_states
)
...
...
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