server: add --stop-idle-seconds for router mode#19380
Closed
leonardcser wants to merge 2 commits intoggml-org:masterfrom
Closed
server: add --stop-idle-seconds for router mode#19380leonardcser wants to merge 2 commits intoggml-org:masterfrom
--stop-idle-seconds for router mode#19380leonardcser wants to merge 2 commits intoggml-org:masterfrom
Conversation
77061f7 to
fccef3e
Compare
--unload-idle-seconds for router mode--stop-idle-seconds for router mode
Contributor
|
I disagree with this feature, it sounds redundant to me. The auto-sleep functionality added in #18228 should already allow model weight to be unloaded after a timeout, while also allowing static endpoints like If the server instance need to be unloaded, it's up to the downstream application to decide when to unload it. |
Author
|
Thanks for the feedback |
agree, however unloading from downstream app now still leaves ps on gpu as mentioned in #19379_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--stop-idle-secondsCLI flag that fully terminates idle model subprocesses in router mode after N seconds of inactivityensure_model_loaded()re-spawns the process automatically (when--models-autoloadis enabled)--sleep-idle-secondswhich unloads VRAM/RAM within a child process, this flag kills the subprocess entirelyRefs #19379, follow-up to #18189
Test plan
--stop-idle-secondsappears in--help--stop-idle-seconds 5 --models-dir <dir>, send a request, wait >5s, verify process is terminated