Skip to content

fix(exl3): release per-stream tile scratch at end of run (#4391) - #4432

Merged
Qubitium merged 1 commit into
mainfrom
fix/exl3-tile-workspace
Nov 16, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/exl3-tile-workspace

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

EXL3 quantization allocates per-stream tile scratch that was never released at the end of a run, leaving 2-8 GiB pinned after quantize(). The workspace is allocated through the EXL3 library's stream-local scratch and outlived the processor.

Addresses the EXL3 item of #4391.

What Changed

  • gptqmodel/looper/exllamav3_processor.py, loop_processor.py, module_looper.py: release the EXL3 tile workspace at the end of the run (and on the processor teardown path).
  • exl3_lib/quantize.py: expose the release hook.
  • New regression tests/test_exl3_workspace_release.py.

Tests

PYTHONPATH=/root/work-4391 /root/venv/bin/python -m pytest tests/test_exl3_workspace_release.py tests/test_exl3_workspace.py -q
56 passed; only tests/test_exl3_workspace.py::...[cuda:0] fails, pre-existing here because CUDA_HOME is unset in this container (same failure on pristine main).
/root/venv/bin/python -m ruff check <changed files>
All checks passed!

Logic Flow Documentation

Adds a release step to the existing run teardown; no decision mechanism changed.

Review Requirements

  • Reviewed; release is idempotent and covered by the new test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant