Repository navigation
Free the GPU after a run finishes; one waiting row in shadow mode - #18
Merged
Merged
Conversation
The runner's locals kept the trained model alive until the next job, so the GPU stayed full between runs (39 GB after a Qwen3-8B MoRE run) and Clean VRAM, which only drops the inference cache, couldn't free it. Drop the references and release the allocator's cache after each run.
Once the shadow answered, the playground still drew a second pair of waiting panes under the row already waiting on the base, so one question read as two.
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.
Why
lyzr-assistant(Qwen3-8B MoRE) finished, the studio box kept ~39 GB on the GPU. Clean VRAM unloaded the playground cache but couldn't touch it: the runner loop's locals (be,result,callbacks) held the trained model until the next job.What
serve.py: after each run is persisted, drop the runner's references and release the allocator's cache (_release_gpu_cache, shared with the inference-cache drop).Playground.tsx: draw the waiting pair only until the shadow answers; after that its row carries the base's wait._static.Testing
make test: 225 passed. Newtest_a_finished_run_lets_go_of_its_modelruns a job on a fake backend and asserts the backend is garbage-collected after the run; it fails without the fix.