Skip to content

feat: load FFT revisions onto sampling pool replicas - #357

Merged
ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:feat/sampling-pool-weight-loads
Oct 23, 2026
Merged

ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:feat/sampling-pool-weight-loads

Conversation

@ShubyM

@ShubyM ShubyM commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Teaches the dispatcher to keep a pool's vllm serve replicas on the right FFT weights. When a new revision shows up, HttpSampler loads 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 after load_from_state or 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.

@ShubyM
ShubyM marked this pull request as ready for review October 21, 2026 23:50
@ShubyM
ShubyM force-pushed the feat/sampling-pool-weight-loads branch 3 times, most recently from 97a293e to 88442f7 Compare October 23, 2026 19:00
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
ShubyM force-pushed the feat/sampling-pool-weight-loads branch from 88442f7 to 3af9378 Compare October 23, 2026 20:41
@ShubyM
ShubyM merged commit 334de4a into openrl-dev:main Oct 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants