Skip to content

feat(local): add model pool unload to release GPU memory#903

Merged
starpit merged 1 commit into
IBM:mainfrom
starpit:feat/model-pool-unload
Feb 23, 2026
Merged

feat(local): add model pool unload to release GPU memory#903
starpit merged 1 commit into
IBM:mainfrom
starpit:feat/model-pool-unload

Conversation

@starpit
Copy link
Copy Markdown
Member

@starpit starpit commented Feb 23, 2026

Summary

  • Adds ModelPool::unload_all() to clear all cached models and release GPU memory
  • Exposes as spnl::model_pool::unload_all() (behind local feature gate)
  • Fixes OOM when running multiple models sequentially (e.g. multi-model PIC benchmarks) — previously loaded models accumulated in VRAM

Test plan

  • Run bench pic --full (multi-model sweep) — verify models unload between runs and no OOM
  • Run single-model bench — verify no regression (model still cached within a run)
  • cargo check --features bench,metal

🤖 Generated with Claude Code

When running multiple models sequentially (e.g. multi-model benchmarks),
previously loaded models remained in VRAM causing OOM errors. Adds
ModelPool::unload_all() and exposes it as spnl::model_pool::unload_all()
so callers can free GPU memory between model runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
@starpit starpit merged commit 7757498 into IBM:main Feb 23, 2026
36 checks passed
@starpit starpit deleted the feat/model-pool-unload branch February 23, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant