feat: release and resume inference runtime - #56
Open
0z5a wants to merge 4 commits into
Open
Conversation
Add a reversible scheduler lifecycle that drops scheduler-owned KV storage, decode workspace, and CUDA graph state while retaining shared model weights and policy version. Expose the lifecycle through inference and rollout APIs, clear cached rollout tensors, and add single-GPU memory/parity benchmarking.
Capture five release/resume cycles for the AstrAI 1B BF16 preset at 2K, 8K, and 32K context bounds, including raw memory, latency, and greedy-parity data from the implementation commit.
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.
Summary
resume()and restart an async loop only when it was running before releaseInferenceEngine,RolloutGenerator, andRolloutRunner, including rollout tensor-cache cleanupNVIDIA L20 benchmark
AstrAI 1B, BF16, batch 4, prompt 128, four greedy decode tokens, five complete release/resume cycles per cell:
The benchmark is bound to implementation commit
5900c786322b522162af0bef0674464806f1628a; raw per-cycle JSON and the reproduction tool are checked in. CUDA Graph was disabled to isolate scheduler-owned KV/workspace memory. The source-mounted image did not expose the optional attention, rotary, and GEMV extensions, so it used the established fallbacks; this PR makes a runtime-allocation lifecycle claim, not a kernel-throughput claim.Validation
628 passed, 103 skipped71 passed in 2.27s811bc775ed5b3a6ec853219245f3469f78818020: comparison cell validated and 53 Draft/system-path tests passed92.29/10097.40/100The InfraSWE score is explicitly diagnostic and unsealed. Official ProjectFit remains unresolved because the Draft seal, system-trace evidence, hidden probes, and verified evidence manifest are absent.