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
3c79ad35
Unverified
Commit
3c79ad35
authored
Dec 01, 2024
by
Lianmin Zheng
Committed by
GitHub
Dec 01, 2024
Browse files
[Fix] Fix the padded hash value for image tokens (#2309)
parent
983bfcf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+8
-0
No files found.
python/sglang/srt/managers/scheduler.py
View file @
3c79ad35
...
...
@@ -1170,6 +1170,14 @@ class Scheduler:
+
1
:
len
(
req
.
fill_ids
)
-
req
.
last_update_decode_tokens
]
# Clip the padded hash values from image tokens.
# Otherwise, it will lead to detokenization errors.
input_token_ids
=
[
x
if
x
<
self
.
model_config
.
vocab_size
-
1
else
0
for
x
in
input_token_ids
]
req
.
input_token_logprobs
=
list
(
zip
(
input_token_logprobs
,
input_token_ids
))
if
(
...
...
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