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
test: checkpoint_interop_4053 HF-bridge runtime-layout refusal loads on CPU via .to(cuda) since #6473 (marlin/exllama_v2 reject cpu) #6542
tests/test_checkpoint_interop_4053.py::test_hf_bridge_save_pretrained_refuses_runtime_layout[marlin-MarlinLinear] and [exllama_v2-ExllamaV2Linear] fail on main (c649fcb, RTX 4090):
ValueError: <class 'gptqmodel.nn_modules.qlinear.marlin.MarlinLinear'> does not support device: cpu
ValueError: <class 'gptqmodel.nn_modules.qlinear.exllamav2.ExllamaV2Linear'> does not support device: cpu
Cause: stale test after #6473, same mechanism as #6527
#6473 rewrote _hf_bridge_load from from_pretrained(..., device_map=device) to from_pretrained(...).to(device). Without a device_map, Transformers loads on CPU, so the HF bridge selects the kernel for CPU. The checkpoint pins backend=marlin / exllama_v2, and those kernels correctly reject CPU. .to() runs too late to change that, so the test never reaches the runtime-layout save refusal it guards (#6137).
Fix
For accelerator targets, load with device_map={"": device} (Transformers requires the optional accelerate package for this; #6501 restored that path), and skip when accelerate is missing. CPU callers are unchanged.
Activity