server: allow router to report child instances sleep status#20849
Merged
ngxson merged 4 commits intoggml-org:masterfrom Mar 22, 2026
Merged
server: allow router to report child instances sleep status#20849ngxson merged 4 commits intoggml-org:masterfrom
ngxson merged 4 commits intoggml-org:masterfrom
Conversation
ggerganov
reviewed
Mar 22, 2026
Comment on lines
+58
to
+59
| server_model_status status = SERVER_MODEL_STATUS_UNLOADED; | ||
| bool is_sleeping = false; // whether the model is in sleeping state (only valid when status == LOADED) |
Member
There was a problem hiding this comment.
Can we have a new status SERVER_MODEL_STATUS_SLEEPING instead of the extra bool?
Contributor
Author
There was a problem hiding this comment.
Yeah it's a bit complicated but still possible, my initial plan is to consider "sleeping" as a sub-state of "loaded". but on second thought, it maybe more beneficial in the long term to have just one set of states.
I implemented it in 02c8b88 , it also requires changing the semantic of "loaded" in some places to be "ready", with "ready" means either "loaded" or "sleeping"
ggerganov
approved these changes
Mar 22, 2026
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
…#20849) * server: allow router to report child instances sleep status * refactor * move sleeping to state * nits
rsenthilkumar6
pushed a commit
to rsenthilkumar6/llama.cpp
that referenced
this pull request
May 1, 2026
…#20849) * server: allow router to report child instances sleep status * refactor * move sleeping to state * nits
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.
Allow router server to report child sleeping status via
/modelsendpoint, example: