feat: version rollout weight updates

Track a monotonic policy version across optimizer steps, scheduler updates, and rollout results. Serialize synchronous generation with weight acknowledgements and invalidate reusable prefix KV entries so cached samples remain attributable to the behavior policy that generated them.
This commit is contained in:
0z5a
2026-09-02 19:01:41 +08:00
parent 1fad50d847
commit e58a728b80
13 changed files with 232 additions and 7 deletions
+6
View File
@@ -139,6 +139,12 @@ attention backends share the same rotary dispatch — it is backend-agnostic.
4. Decode → Run single-token forward for each same-position group
```
For in-process training rollout, `InferenceScheduler.update_weights(version)`
acknowledges that the shared model was updated in place. Versions are monotonic;
the scheduler rejects updates while requests are queued and invalidates reusable
prefix KV pages before exposing the new version. Synchronous `run_batch()` and
weight updates are serialized so a generation cannot straddle two versions.
## Sampling (Strategy Pattern)
```