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
0a0dd34e
"vscode:/vscode.git/clone" did not exist on "9c29e938d7bf5e8b40d9a5f861a6b7a6a7c7c7d7"
Unverified
Commit
0a0dd34e
authored
Apr 20, 2025
by
fzyzcjy
Committed by
GitHub
Apr 20, 2025
Browse files
Fix BumpAllocator error when no input_ids (#5564)
parent
80ac527d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
python/sglang/srt/models/deepseek_nextn.py
python/sglang/srt/models/deepseek_nextn.py
+3
-1
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+3
-1
No files found.
python/sglang/srt/models/deepseek_nextn.py
View file @
0a0dd34e
...
@@ -94,7 +94,9 @@ class DeepseekModelNextN(nn.Module):
...
@@ -94,7 +94,9 @@ class DeepseekModelNextN(nn.Module):
zero_allocator
=
BumpAllocator
(
zero_allocator
=
BumpAllocator
(
buffer_size
=
2
,
buffer_size
=
2
,
dtype
=
torch
.
float32
,
dtype
=
torch
.
float32
,
device
=
input_ids
.
device
,
device
=
(
input_embeds
.
device
if
input_embeds
is
not
None
else
input_ids
.
device
),
)
)
if
input_embeds
is
None
:
if
input_embeds
is
None
:
...
...
python/sglang/srt/models/deepseek_v2.py
View file @
0a0dd34e
...
@@ -1374,7 +1374,9 @@ class DeepseekV2Model(nn.Module):
...
@@ -1374,7 +1374,9 @@ class DeepseekV2Model(nn.Module):
# TODO for two-batch-overlap, we need a larger buffer size
# TODO for two-batch-overlap, we need a larger buffer size
buffer_size
=
len
(
self
.
layers
)
*
2
,
buffer_size
=
len
(
self
.
layers
)
*
2
,
dtype
=
torch
.
float32
,
dtype
=
torch
.
float32
,
device
=
input_ids
.
device
,
device
=
(
input_embeds
.
device
if
input_embeds
is
not
None
else
input_ids
.
device
),
)
)
if
input_embeds
is
None
:
if
input_embeds
is
None
:
...
...
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