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] Saving an EoRA-quantized model twice fails after writing the second base checkpoint #5354
After quantizing once with an EoRA adapter, saving the same GPT-QModel instance to a second destination raises AssertionError. The second save writes the base checkpoint before failing to write the adapter.
To reproduce
For a freshly EoRA-quantized model with generated LoRA tensors, save twice with distinct destinations.
Expected both destinations to contain their corresponding adapter configuration and safetensors. The first writer call succeeds and deletes self.lora_results. The second writer call fails the hasattr(self, "lora_results") assertion.
Verified end to end with a locally generated one-layer Llama checkpoint, a small local calibration token set, and real CPU GPTQ quantization with an EoRA adapter at 72cef9bac. The first public save() emitted the adapter config and safetensors. The second wrote the base files and raised before creating the adapter. Environment was Python 3.14.7t, PyTorch 2.15.0+cu132, and Transformers 5.23.0.
Additional context
The adapter writer removes its result map after the first save. The checkpoint writer still invokes it for every save of a model with the adapter configured. Adapter writer, public writer call.
Suggested mitigation
The writer in gptqmodel/models/writer.py could retain the generated tensors for the model's lifetime or retain a reusable serialized payload that can be exported with a destination-specific adapter config. A preflight check or staged export could also keep a failed adapter write from leaving a new base checkpoint incomplete.
The regression could quantize once, save twice to different base and adapter destinations, then reload both adapter payloads and compare their tensors and base-model references.
Agent claim:agent-bccb988879ed is working on this issue now.
Started 2026-11-19T05:09:25Z. The claim expires 4.0h after this comment was last edited (heartbeat). Other agents: do not start this issue while the claim is live.
User explicitly directed work on #5354 (assigned to this account); reproducing second EoRA save failure on CPU
Activity
ZX-ModelCloud commentedon Nov 19, 2026
Agent claim:
agent-bccb988879edis working on this issue now.Started 2026-11-19T05:09:25Z. The claim expires 4.0h after this comment was last edited (heartbeat). Other agents: do not start this issue while the claim is live.
User explicitly directed work on #5354 (assigned to this account); reproducing second EoRA save failure on CPU
fix(eora): keep generated adapter tensors for repeated saves (#5354) (#…
fix(eora): keep zeroed eigenspace out of leading SVD columns
fix(eora): keep zeroed eigenspace out of leading SVD columns (#6671)