[API] add get memory pool size (#1760)
Co-authored-by: Byron Hsu <byronhsu1230@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ from sglang.srt.managers.io_struct import (
|
||||
BatchEmbeddingOut,
|
||||
BatchStrOut,
|
||||
BatchTokenIDOut,
|
||||
GetMemPoolSizeReqOutput,
|
||||
UpdateWeightReqOutput,
|
||||
)
|
||||
from sglang.srt.managers.schedule_batch import FINISH_MATCHED_STR, FINISH_MATCHED_TOKEN
|
||||
@@ -111,6 +112,9 @@ class DetokenizerManager:
|
||||
# If it is a weight update request, no detokenization is needed.
|
||||
self.send_to_tokenizer.send_pyobj(recv_obj)
|
||||
continue
|
||||
elif isinstance(recv_obj, GetMemPoolSizeReqOutput):
|
||||
self.send_to_tokenizer.send_pyobj(recv_obj)
|
||||
continue
|
||||
elif self.tokenizer is None:
|
||||
# If the tokenizer is skipped, no detokenization is needed
|
||||
self.send_to_tokenizer.send_pyobj(recv_obj)
|
||||
|
||||
Reference in New Issue
Block a user