Update draft model #2
Open
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.
Motivation
The goal of this pull request is to enable hot-swapping of the draft model without restarting the serving server.
Currently, updating the speculative draft model requires a full server restart, which interrupts ongoing requests and complicates integration with runtime speculative model training pipelines.
By allowing the draft model to be reloaded dynamically at runtime, we can:
Modifications
is_draft_modelfiled toUpdateWeightFromDiskReqInputinio_struct.pyto distinguish draft model updates.update_weights_from_disk()ineagle_worker.pyset_embed_and_head()ineagle_worker.py.update_weights_from_disk()inscheduler_update_weights_mixin.pyto handleis_draft_model=Truefor draft model weight updates.self.pending_weight_update_queueandmaybe_process_pending_weight_update()inscheduler.pyto defer weight updates until no running batch is active.test/srt/rl/test_update_weights_from_disk.pyAccuracy Tests
Benchmarking and Profiling
Checklist