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
873d0e85
Commit
873d0e85
authored
Jan 30, 2024
by
Lianmin Zheng
Browse files
Ignore detokenization error
parent
1d0fbe8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/managers/detokenizer_manager.py
python/sglang/srt/managers/detokenizer_manager.py
+1
-1
python/sglang/srt/server.py
python/sglang/srt/server.py
+1
-1
No files found.
python/sglang/srt/managers/detokenizer_manager.py
View file @
873d0e85
...
...
@@ -56,7 +56,7 @@ class DetokenizerManager:
int
(
output_tokens
[
i
][
0
])
)
if
not
isinstance
(
first_token
,
str
):
first_token
=
first_token
.
decode
(
"utf-8"
)
first_token
=
first_token
.
decode
(
"utf-8"
,
errors
=
"ignore"
)
if
first_token
.
startswith
(
"▁"
):
output_strs
[
i
]
=
" "
+
output_strs
[
i
]
...
...
python/sglang/srt/server.py
View file @
873d0e85
...
...
@@ -320,7 +320,7 @@ def launch_server(server_args, pipe_finish_writer):
# Load chat template if needed
if
server_args
.
chat_template
is
not
None
:
print
(
server_args
.
chat_template
)
print
(
f
"Use chat template:
{
server_args
.
chat_template
}
"
)
if
not
chat_template_exists
(
server_args
.
chat_template
):
if
not
os
.
path
.
exists
(
server_args
.
chat_template
):
raise
RuntimeError
(
...
...
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