Repository navigation
[rl] Generator aborts a request whose caller left (11/14) - #5509
Closed
felipemello1 wants to merge 7 commits into
Closed
felipemello1 wants to merge 7 commits into
felipemello1 wants to merge 7 commits into
Conversation
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
October 18, 2026 23:31
66f7d01 to
15817d3
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 18, 2026 23:31
0309c31 to
e1ce3b5
Compare
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
October 19, 2026 00:38
15817d3 to
9df6ee4
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 19, 2026 00:38
e1ce3b5 to
18f4e80
Compare
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
October 19, 2026 01:16
9df6ee4 to
d0ac2ea
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 19, 2026 01:16
18f4e80 to
3cd6910
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 22, 2026 23:31
3cd6910 to
feaee20
Compare
This was referenced Oct 23, 2026
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
October 23, 2026 07:34
2703106 to
f35c21c
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 23, 2026 07:34
feaee20 to
115c064
Compare
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
October 27, 2026 14:31
f35c21c to
a683e38
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
October 27, 2026 14:31
115c064 to
6c784be
Compare
felipemello1
force-pushed
the
felipemello1/http/3-generate-over-http
branch
from
November 5, 2026 00:37
a683e38 to
6fe0b09
Compare
felipemello1
force-pushed
the
felipemello1/http/5-abort-when-caller-left
branch
from
November 5, 2026 00:38
6c784be to
4d94d82
Compare
added 6 commits
November 4, 2026 20:49
…o1/http/5-abort-when-caller-left
…o1/http/5-abort-when-caller-left
…o1/http/5-abort-when-caller-left
…o1/http/5-abort-when-caller-left
…o1/http/5-abort-when-caller-left
…o1/http/5-abort-when-caller-left
Contributor
Author
|
Reply from claude: Superseded: this PR aborts a request when its HTTP caller disconnects, and that HTTP path (#5506) is closing in favor of #5990's look-aside routing and the #5520 -> #5876 stack. Aborting a generator request whose caller left is still worth doing, since a cancelled group's requests keep their KV until they finish; it can come back as a follow-up on #5990's API. Closing. |
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.
TLDR: A
generatecall cancelled after the engine loop took its request (e.g. a Verifiers harness that hittimeout.rolloutclosed its POST) now aborts the request on every rank of its replica and frees its KV, instead of generating it to the end for nobody.Stack (14 PRs, merge bottom-up; this PR is in bold)
PRs 2-7 don't need the HTTP design and can be reviewed now. PRs 8-14 wait on the design discussion on PRs 9 and 10.
Problem
Generator.generate.GenerationEnginehas no abort, so a taken request keeps a sequence's KV and decode steps until it ends.hot_swap=False, a request parked by a draining load whose caller left is still generated after the load.Solution
generatecancelled after the loop took its request puts aRequestAbortMessage(request_id)on the queue.aborted_request_idsmakes every rank callengine.abort_requests(ids); rank 0 fails the reply and frees its DP reservation.GenerationEngine.abort_requests(ids)returns the ids it ran (default[]);VLLMEngineaborts one id per call, so every TP rank frees blocks in the same order.Results
Numerics: bitwise vs main when no call is cancelled; a cancel removes that request from the batch, so other requests' tokens can differ, as with any load change.
You may ask:
step()that finishes it, so an abort after the finish (or on a replica that doesn't run it) skips it; finish and abort reports travel on one port from the same sender.process_rejected_requests? It logs one warning per request, and aborts come in bursts.NOTE:
VLLMEngine.abort_requestsreads vLLM internals (OutputProcessor.external_req_ids,LLMEngine.abort_request); a CPU test fails if either moves.Test plan
pytest tests/rl/unit_tests/cpu # verifiers 0.4.0, at this position (local, 11-04): 634 passed, 4 skippedtest_engine_loop.py: parked request never admitted (draining and non-draining load, DP=2), admitted request aborted, abort after the finish is a no-op, cancel while the generator closes, HTTP client hang-up after admission, peer DP replica aborts.test_generator.py: only this replica's requests aborted (one id per vLLM call, in order), vLLM still has the internals it reads, aborted replies fail without a warning, peer TP rank 1 doesn't report.