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
31fad29a
Unverified
Commit
31fad29a
authored
Oct 12, 2024
by
Patrick Yi
Committed by
GitHub
Oct 12, 2024
Browse files
Add get_tokenizer function for Engine class (#1653)
parent
9da5a60b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
python/sglang/srt/server.py
python/sglang/srt/server.py
+8
-0
No files found.
python/sglang/srt/server.py
View file @
31fad29a
...
@@ -809,4 +809,12 @@ class Engine:
...
@@ -809,4 +809,12 @@ class Engine:
def
shutdown
(
self
):
def
shutdown
(
self
):
kill_child_process
(
os
.
getpid
(),
including_parent
=
False
)
kill_child_process
(
os
.
getpid
(),
including_parent
=
False
)
def
get_tokenizer
(
self
):
global
tokenizer_manager
if
tokenizer_manager
is
None
:
raise
ReferenceError
(
"Tokenizer Manager is not initialized."
)
else
:
return
tokenizer_manager
.
tokenizer
# TODO (ByronHsu): encode
# TODO (ByronHsu): encode
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