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] A one-shot iterable (generator) as calibration data fails with GPTAQ or LoRA/EoRA: "calibration dataset is empty" (incomplete fix of #4192) #4307
Severity: medium. Status: confirmed end-to-end on opt-125m. Kind: incomplete fix of #4192 (b7a352f).
Where
gptqmodel/models/base.py:2655 (NATIVE step) and :2667 (EORA step) both pass the same raw calibration object to separate CalibrationConfigs.
Each LoopProcessor.__init__ (looper/loop_processor.py:470-492) re-runs prepare_dataset on that raw input.
b7a352f only made the prepared result sized. A generator is used up by the first processor, so the second processor receives nothing.
Repro
fromgptqmodelimportGPTQModel, QuantizeConfigfromgptqmodel.quantization.configimportGPTAQConfigtexts= [f"The quick brown fox number {i} jumps over the lazy dog."foriinrange(16)]
m=GPTQModel.load("facebook/opt-125m", QuantizeConfig(bits=4, group_size=128, gptaq=GPTAQConfig()))
m.quantize((tfortintexts), batch_size=4)
# The same failure happens with QuantizeConfig(bits=4, group_size=128) + quantize(..., adapter=Lora(rank=4, path=out_dir))
Actual:ValueError: Quantize: calibration dataset is empty., raised from gptq_processor.__init__ → prepare_calibration_dataset. Passing list(texts) instead succeeds.
Expected: materialise unsized input once in quantize(), or prepare it once and share the result between processors.
Not affected: HF IterableDataset, because it can be iterated again.
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.
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: materialise one-shot calibration input for native and EoRA passes (
fix(eora): keep zeroed eigenspace out of leading SVD columns
fix(eora): keep zeroed eigenspace out of leading SVD columns (#6671)