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
f3bf6110
"vscode:/vscode.git/clone" did not exist on "2c175a5d1436b40105cd73898cbcbed74f053e07"
Unverified
Commit
f3bf6110
authored
May 15, 2025
by
Junrong Lin
Committed by
GitHub
May 14, 2025
Browse files
feat: add flush cache to EngineBase and HttpServerEngineAdapter (#6009)
parent
198b9056
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
python/sglang/srt/entrypoints/EngineBase.py
python/sglang/srt/entrypoints/EngineBase.py
+5
-0
python/sglang/srt/entrypoints/http_server_engine.py
python/sglang/srt/entrypoints/http_server_engine.py
+3
-0
No files found.
python/sglang/srt/entrypoints/EngineBase.py
View file @
f3bf6110
...
@@ -27,6 +27,11 @@ class EngineBase(ABC):
...
@@ -27,6 +27,11 @@ class EngineBase(ABC):
"""Generate outputs based on given inputs."""
"""Generate outputs based on given inputs."""
pass
pass
@
abstractmethod
def
flush_cache
(
self
):
"""Flush the cache of the engine."""
pass
@
abstractmethod
@
abstractmethod
def
update_weights_from_tensor
(
def
update_weights_from_tensor
(
self
,
self
,
...
...
python/sglang/srt/entrypoints/http_server_engine.py
View file @
f3bf6110
...
@@ -140,3 +140,6 @@ class HttpServerEngineAdapter(EngineBase):
...
@@ -140,3 +140,6 @@ class HttpServerEngineAdapter(EngineBase):
def
resume_memory_occupation
(
self
):
def
resume_memory_occupation
(
self
):
return
self
.
_make_request
(
"resume_memory_occupation"
)
return
self
.
_make_request
(
"resume_memory_occupation"
)
def
flush_cache
(
self
):
return
self
.
_make_request
(
"flush_cache"
)
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