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] ParoQuant quantization is not reproducible with a fixed opt_seed (±0.3 PPL run-to-run) #4460
Severity: low-medium. Kind: new; same at def6e61. Confirmed at 489aed6 on an RTX 5090.
paroquant_processor.py:631 derives "deterministic per-module seeds", so run-to-run reproducibility is intended. Two back-to-back runs with the same code, calibration and default opt_seed=0 give different models:
The source of the nondeterminism was not localized. Candidates:
AMP autocast;
atomics in the fused rotation backward;
cudagraph staging;
unseeded data shuffling in the train/validation split.
This noise also makes it impossible to measure numerics fixes such as 9b11fb3 (#4317) by PPL. Expected: a fixed seed gives a bit-identical checkpoint, or the docs say that ParoQuant is nondeterministic.
Found during an AI-assisted review (Claude Code, round 13) of 489aed6; repros were run at that commit (A/B against def6e61 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
A likely contributor: #4461. The ParoQuant fused rotate_pair_grad_kernel has a shared-memory write-after-read race, so the rotation gradient is sporadically wrong (max abs diff up to 2.5). It was confirmed on ROCm; a one-line barrier makes the output bit-identical.
Reopening: #4499 auto-closed this, but it only fixes CUDA. Cold-cache repeat ParoQuant runs on CUDA now give bitwise-identical checkpoints.
Still open on ROCm: two Qwen2.5-0.5B runs give PPL 21.26 vs 21.44.
Cause:_needs_deterministic_hessian (models/base.py) keeps hipBLASLt for ParoQuant on ROCm, and hipBLASLt picks GEMM kernels per process.
Workaround: with rocBLAS pinned, two runs give bitwise-identical checkpoints.
Open decision: whether ParoQuant should pin rocBLAS on ROCm (deterministic but slower).
Also still open: the ParoQuant rotation autotune knobs are read from GPTQMODEL_PAROQUANT_ROTATE_AUTOTUNE_* environment variables in rotation.cu, which AGENTS.md forbids.
Claimed by an AI agent for the remaining items: pin a deterministic GEMM path for ParoQuant on ROCm (or document the trade-off) and remove the GPTQMODEL_PAROQUANT_ROTATE_AUTOTUNE_* environment knobs that AGENTS.md forbids.
Activity
Qubitium commentedon Nov 16, 2026
A likely contributor: #4461. The ParoQuant fused
rotate_pair_grad_kernelhas a shared-memory write-after-read race, so the rotation gradient is sporadically wrong (max abs diff up to 2.5). It was confirmed on ROCm; a one-line barrier makes the output bit-identical.fix(paroquant): race-free, plan-invariant and correct fused rotation …
Qubitium commentedon Nov 16, 2026
Reopening: #4499 auto-closed this, but it only fixes CUDA. Cold-cache repeat ParoQuant runs on CUDA now give bitwise-identical checkpoints.
Still open on ROCm: two Qwen2.5-0.5B runs give PPL 21.26 vs 21.44.
_needs_deterministic_hessian(models/base.py) keeps hipBLASLt for ParoQuant on ROCm, and hipBLASLt picks GEMM kernels per process.Also still open: the ParoQuant rotation autotune knobs are read from
GPTQMODEL_PAROQUANT_ROTATE_AUTOTUNE_*environment variables inrotation.cu, which AGENTS.md forbids.Qubitium commentedon Nov 16, 2026
Claimed by an AI agent for the remaining items: pin a deterministic GEMM path for ParoQuant on ROCm (or document the trade-off) and remove the
GPTQMODEL_PAROQUANT_ROTATE_AUTOTUNE_*environment knobs that AGENTS.md forbids.fix(paroquant): deterministic ROCm GEMMs and config-only autotune kno…
fix(paroquant): wire the benchmark fused-rotation flag through config (…