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] LazyTurtle .bin → safetensors conversion still goes to the system TMPDIR and ignores offload_to_disk_path (incomplete fix of #4205) #4319
Severity: low. Status: confirmed by repro on CPU and on an RTX 4090. Kind: incomplete fix of #4205 (2c625bb).
Where
gptqmodel/models/loader.py:2015: LazyTurtle.maybe_create(...) is called without offload_path=.
gptqmodel/utils/structure.py:1171 and :1244: _infer_conversion_root looks for the path in model_init_kwargs, where it never is, and in target_model.quantize_config, which the HF shell does not have.
Repro
fromgptqmodelimportGPTQModel, QuantizeConfigOFF="/data/offload"# any writable dirGPTQModel.load("facebook/opt-125m", quantize_config=QuantizeConfig(bits=4, offload_to_disk_path=OFF))
Actual: the ~250 MB lazyturtle-<pid>-<digest> directory is created under $TMPDIR, and OFF stays empty.
Expected: the conversion goes under the configured offload path. On hosts where /tmp is a small tmpfs this matters.
What 2c625bb does fix: the conversion is reused across loads and deleted when the model and turtle are freed.
Found during an AI-assisted review (Claude Code, round 11) of 842d666; repros were run at that commit on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
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.
Already fixed on main by #4340 (commit 688208d20): the loader now passes offload_path=getattr(quantize_config, "offload_to_disk_path", None) to LazyTurtle.maybe_create. Verified on current main (313529a97): tests/test_lazy_turtle_conversion_cache.py → 6 passed, and a CPU load of cached sshleifer/tiny-gpt2 (.bin source) with offload_to_disk_path=/tmp/a4319_real/offload created lazyturtle-<pid>-<digest> under that directory (TMPDIR untouched) and removed it on turtle.close(). No additional PR is needed.
Activity
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(loader): put LazyTurtle pickle conversion under offload_to_disk_p…
Qubitium commentedon Nov 16, 2026
Already fixed on
mainby #4340 (commit688208d20): the loader now passesoffload_path=getattr(quantize_config, "offload_to_disk_path", None)toLazyTurtle.maybe_create. Verified on currentmain(313529a97):tests/test_lazy_turtle_conversion_cache.py→ 6 passed, and a CPU load of cachedsshleifer/tiny-gpt2(.binsource) withoffload_to_disk_path=/tmp/a4319_real/offloadcreatedlazyturtle-<pid>-<digest>under that directory (TMPDIR untouched) and removed it onturtle.close(). No additional PR is needed.