forked from ggml-org/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 44
server: tell a streaming client when its slot is parked and restored #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
danielhanchen
wants to merge
25
commits into
feat/server-side-preemption
Choose a base branch
from
feat/server-side-preemption-notify
base: feat/server-side-preemption
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
65f8f54
server: tell a streaming client when its slot is parked and restored
danielhanchen 5a791e0
server: make the result queue timeout a deadline, so a parked stream …
danielhanchen e9aeb3a
Merge branch 'feat/server-side-preemption' into feat/server-side-pree…
danielhanchen 5864dae
server: tell the stream about a park made as a last resort
danielhanchen 301f480
Merge branch 'feat/server-side-preemption' into feat/server-side-pree…
danielhanchen 76baf1a
Merge branch 'feat/server-side-preemption' into feat/server-side-pree…
danielhanchen 7fb42b5
server: keep the park notices of a multi-prompt stream apart
danielhanchen 53c59a1
Merge branch 'feat/server-side-preemption' into feat/server-side-pree…
danielhanchen ab40f16
server: a stream parked before its first token starts with the notice…
danielhanchen 356978a
Merge feat/server-side-preemption: keep only the shared prefix of a r…
danielhanchen 3306d4b
Merge feat/server-side-preemption: planner accounting for reused slot…
danielhanchen 7efef20
Merge feat/server-side-preemption: the rotation parks the resident th…
danielhanchen 3d179fd
Merge feat/server-side-preemption: a parked slot survives an aborted …
danielhanchen a06419d
Merge feat/server-side-preemption: the leader is measured by what a r…
danielhanchen 1d52885
Merge feat/server-side-preemption: parent and child alone in the pool…
danielhanchen a158200
Merge feat/server-side-preemption: recurrent caches served without pr…
danielhanchen ce02834
Merge feat/server-side-preemption: a started slot's reservation count…
danielhanchen 5ecdba8
Merge feat/server-side-preemption: the shift and the planner inside t…
danielhanchen 02a908b
server: a parked stream keeps a shorter ping interval the request ask…
danielhanchen 4918294
Merge feat/server-side-preemption: what a started slot keeps is decid…
danielhanchen 03e57da
Merge feat/server-side-preemption: the resume order read on every load
danielhanchen 801e29a
Merge feat/server-side-preemption: the rotation-budget test keeps its…
danielhanchen 929809f
Merge feat/server-side-preemption: the resume order belongs to the co…
danielhanchen a33c563
Merge /mnt/disks/unslothai/daniel3/workspace_12/llamacpp_fork into fe…
danielhanchen 90a5094
server : validate a started slot's prompt before it can be parked
danielhanchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a streaming request contains multiple prompts, this opens the HTTP 200 response as soon as any task's preemption notice arrives, before checking whether another task has produced an initial error. For example, with an oversized prompt first and a valid shorter prompt second under KV pressure, the oversized task can remain the leader while the valid task is parked; its notice is dequeued here before the oversized-prompt error, converting the expected non-stream 4xx into a 200 response with an in-stream error. Buffer notices until the first ordinary result/error for every task has been resolved, or prevalidate all prompts before allowing any notice to start the response.
Useful? React with 👍 / 👎.