You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Every quantize() creates a new full-size run-<uuid> directory under offload_to_disk_path, and it is never deleted (regression from 2bc2f63, #4202) #4368
Severity: medium-high: disk use grows without bound on large models. Status: confirmed on an RTX 4090; A/B tested against 842d666. Kind: regression from 2bc2f63.
Where
gptqmodel/utils/offload.py:79-110 (bind_private_offload_root), called from ModuleLooper.__init__ and WeightOnlyLooper.__init__.
Description
Each looper creates <offload_to_disk_path>/run-<uuid16>, and every offload bundle for that run is written into it. That is the whole model.
Nothing ever removes the directory: not after save(), not after the model is freed, not on an exception, and not on a later run.
Before this commit the bundle names were reused, so disk use stayed at one model.
An auto temp dir is cleaned up at interpreter exit. An explicit path, which is the normal choice for large models, grows by one full model per run, across processes too.
The EoRA-generate looper allocates another run dir on top.
Found during an AI-assisted review (Claude Code, round 12) of def6e61; repros were run at that commit (A/B against 842d666 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Confirmed independently by a second reviewer: 4 runs of a 3-layer Qwen3-0.6B left 1.3 GB of run-<uuid> trees, including the dense embed_tokens bundle, under an explicit offload_to_disk_path.
The auto /tmp/gptqmodel_* directory is still removed at exit.
The per-run isolation itself works: two same-architecture models, quantized sequentially or concurrently with a shared path, each save bit-identical to their own reference. So the fix is only missing cleanup.
Taking this. I'll investigate against current main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.
Activity
Qubitium commentedon Nov 16, 2026
Confirmed independently by a second reviewer: 4 runs of a 3-layer Qwen3-0.6B left 1.3 GB of
run-<uuid>trees, including the denseembed_tokensbundle, under an explicitoffload_to_disk_path.The auto
/tmp/gptqmodel_*directory is still removed at exit.The per-run isolation itself works: two same-architecture models, quantized sequentially or concurrently with a shared path, each save bit-identical to their own reference. So the fix is only missing cleanup.
Qubitium commentedon Nov 16, 2026
Taking this. I'll investigate against current
main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.fix(offload): remove per-run offload directory after save, teardown, …
fix(offload): keep run bundles after save for in-session use
fix(offload): keep run bundles after save for in-session use (#4416)
fix(paroquant): race-free, plan-invariant and correct fused rotation …
fix(looper): keep the offload root for completed layers of a cancelle…
tests: pin file-backed offload instead of meta + hook offload (#6471)
Remove accelerate: explicit WeightLoader for weight loading, placemen…