Repository navigation
feat: load FFT revisions onto sampling pool replicas - #357
Merged
Merged
Conversation
ShubyM
marked this pull request as ready for review
October 21, 2026 23:50
droot
approved these changes
Oct 22, 2026
ShubyM
force-pushed
the
feat/sampling-pool-weight-loads
branch
3 times, most recently
from
October 23, 2026 19:00
97a293e to
88442f7
Compare
HttpSampler starts a load on every replica not at the pool's revision. A load pauses the replica, runs vLLM's weight update, resets the prefix cache, finishes the update with the revision as its version, and resumes it. The reset comes before the finish, so a replica never reports the revision while its cache holds the old weights' entries. vLLM refuses a reset while a request holds cache blocks, so a refused reset is tried up to three times, and one that keeps failing forgets the weights. An answer from a replica that paused to load weights after the request went out is dropped and sent again. The version check after an answer tries three times on a connection error or timeout, so a slow check does not throw away a finished answer. A revision that retention deleted fails its records, before the switch or while the pool serves it, so the pool moves on. A 404 sends the request again until its deadline, since a replica's view of the shared volume may not show a just-frozen LoRA snapshot yet. A 400 or 422 still fails it. The first time the dispatcher sees a replica, and after one of its loads breaks off, it closes any weight update an earlier load left open and resumes a replica left paused. Such a replica may hold part of a revision, so it reports "unknown" until a full load replaces its weights. The check runs as a task of its own for each replica, like a load, so a wedged replica holds up no send. Until its check finishes the replica gets no load and counts for nothing, and a check that fails runs again on a later pass. The FFT trainer writes `bases` in each delta's metadata, the sampler saves that hold the weights the delta starts from or reaches. A replica loads a delta only when it is at one of its bases. When no save holds the starting weights, as after load_from_state, the sampler save is written in full. The pool still switches revision once nothing pending names the current one, as before, so a sparse delta serves every pending record for it before the pool moves past it. When every replica answers, none holds a delta revision or weights it applies on, and none is loading, as for an older delta after a newer revision loaded, HttpSampler raises RevisionUnloadable. The dispatcher fails that revision's records at once, saying full weights must be saved to sample it, instead of letting them wait out the deadline. A replica that does not answer may hold the revision, so the decision waits for it.
ShubyM
force-pushed
the
feat/sampling-pool-weight-loads
branch
from
October 23, 2026 20:41
88442f7 to
3af9378
Compare
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.
Teaches the dispatcher to keep a pool's
vllm servereplicas on the right FFT weights. When a new revision shows up,HttpSamplerloads it onto every replica that doesn't have it (pause, update weights, reset the prefix cache, resume) and drops any answer from a replica that paused to load after the request went out. A revision that retention deleted, or an old delta no replica can apply, fails its requests right away so the pool moves on.It also recovers replicas a dead dispatcher left mid-load. The first time the dispatcher sees a replica it closes any weight update left open, and the replica reports "unknown" until a full load replaces its weights.
This changes one thing on main. The FFT trainer now records which saves each sparse delta applies on (
bases), and when no save holds a delta's starting weights, as afterload_from_stateor several optimizer steps between sampler saves, it writes the sampler save in full. Main sends a delta there that leaves the sampler on the wrong weights. One step per save still writes a delta.