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
a04efc49
Unverified
Commit
a04efc49
authored
Oct 14, 2025
by
Simo Lin
Committed by
GitHub
Oct 14, 2025
Browse files
[router] when given both local tokenizer and chat template, log all (#11601)
parent
642fa966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sgl-router/src/tokenizer/factory.rs
sgl-router/src/tokenizer/factory.rs
+4
-4
No files found.
sgl-router/src/tokenizer/factory.rs
View file @
a04efc49
...
...
@@ -49,9 +49,9 @@ pub fn create_tokenizer_with_chat_template(
if
path
.is_dir
()
{
let
tokenizer_json
=
path
.join
(
"tokenizer.json"
);
if
tokenizer_json
.exists
()
{
let
chat
_
template
_path
=
chat_template_path
.map
(|
s
|
s
.to_string
())
.or_else
(||
discover_chat_template_in_dir
(
path
)
)
;
// Resolve
chat
template
: provided path takes precedence over auto-discovery
let
final_chat_template
=
resolve_and_log_chat_template
(
chat_template_path
,
path
,
file_
path
);
let
tokenizer_path_str
=
tokenizer_json
.to_str
()
.ok_or_else
(||
{
Error
::
msg
(
format!
(
"Tokenizer path is not valid UTF-8: {:?}"
,
...
...
@@ -60,7 +60,7 @@ pub fn create_tokenizer_with_chat_template(
})
?
;
return
create_tokenizer_with_chat_template
(
tokenizer_path_str
,
chat_template
_path
.as_deref
(),
final_
chat_template
.as_deref
(),
);
}
...
...
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