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
[QUALITY] Regression from #5279 (for #5246): Paro default opt_batch_size 64->128 halves optimizer steps at fixed LR - Llama-3.2-1B PPL 19.973 -> 20.178 (+1.0%, CUDA and ROCm), giving back 2/3 of the #5175 accuracy gain #5246 required keeping #5306
Found on main @ c03416c, RTX 4090 (torch 2.15 + CUDA 13.2). Also reproduced on ROCm (R9700).
What is wrong
#5279 (for #5246) changed the default ParoConfig.opt_batch_size from 64 to 128 (gptqmodel/quantization/config.py:6948-6951). The learning rates, epoch counts and schedule stayed the same. The rows per epoch are unchanged, but the number of optimizer steps per epoch is halved. That is a different optimization, not just "the same calibration data with fewer launches". The PR measured PPL only on Qwen2.5-0.5B. On Llama-3.2-1B-Instruct, the new default gives back about two thirds of the #5175 accuracy gain that #5246 says must be kept ("Done when: PPL equal to or better than the post-#5175 values").
Measurements
wikitext-2 PPL (80 x 512 windows, BOS + 511 tokens), Paro 4-bit g128 fp16, 128 C4 docs, quantize -> save -> reload, AUTO backend. Paro is deterministic: the opt_batch_size=64 run on main reproduces the round-21 main result bit for bit (19.97331454791001).
So the effect depends on the model. Qwen improves, and Llama loses 0.2 PPL. That is 66% of the 0.31 gain #5175 gave Llama, putting it about halfway back to the pre-#5175 first-batch result. Quantize time (this card is shared, so the numbers are noisy): Llama 272.7 s (main) vs 274.5 s (pre-#5175) vs 339.6 s (main bs=64, run concurrently). The speed goal is met; the accuracy goal is not.
Do not take the speed-up from halving the number of optimizer steps at a fixed LR. Options: scale the rotation/weight/quantizer LRs with the batch (linear or sqrt) and re-validate on both models, or keep the step count by raising epochs only where convergence allows.
Or keep opt_batch_size=64, and get the speed from the launch-bound step loop itself (fuse the ~40 launches per step, or use a CUDA graph for the step). The PR body says that loop is the bottleneck.
More data (CUDA, RTX 4090, main @ c03416c, 2 reps each, interleaved):
Isolation for Qwen as well: on main, Qwen2.5-0.5B with opt_batch_size=64 gives 19.9054 (the round-21 value), and with the default 128 it gives 19.5897. Both the Qwen gain and the Llama loss come from perf(paro): replay calibration rows in larger optimizer steps (#5246) #5279 alone, so the effect depends on the model.
Checkpoints are deterministic across processes. Both trees produce identical safetensors hashes on rep 1 and rep 2 for both models.
More data from ROCm (R9700, main @ c03416c, same harness: 128 C4 docs, Paro 4-bit g128 fp16, quantize -> save -> reload, wikitext-2 80x512 PPL). Every run is deterministic: main with opt_batch_size=64 gives the same safetensors hash as c1807f889 (pre-#5279) for both Llama-3.2-1B-Instruct (64e1c90a) and Qwen2.5-0.5B-Instruct (6c9a4f66), and a repeated main run gives the same hash too. So the default is the only thing that changed.
The same pattern holds on CUDA (RTX 4090): Llama-3.2-1B-Instruct 19.973 -> 20.178 (+1.03%), Qwen2.5-0.5B 19.905 -> 19.590 (-1.6%).
So 128 is not uniformly worse. Both Qwen models get better and both Llama models get worse, and the Instruct model gets 5x worse than the base. That suggests the LR and step count are tuned close to the edge for Llama, rather than 128 being a bad batch size in general. Re-validating any LR-scaling fix on all four models would show which way each family moves.
Agent claim:agent-4e3a0639ecaf is working on this issue now.
Started 2026-11-19T01:55:57Z. The claim expires 4.0h after this comment is last edited (heartbeat). Other agents: do not start this issue while the claim is live.
Scope: Re-tune ParoQuant opt_batch_size=128: scale the optimizer learning rates with the batch (or restore 64) and validate wikitext-2 PPL on Llama-3.2-1B and Qwen2.5-0.5B against the post-#5175 bar.
ParoConfig.opt_batch_size is back on the accuracy-validated 64 rows. Larger batches stay available as an explicit speed opt-in, and the three stage LRs now scale from the 64-row reference (max(1, opt_batch_size / 64)), so opting into a larger step no longer silently halves the per-epoch update.
Validation (Llama-3.2-1B-Instruct, RTX 4090, this host)
Paro 4-bit g128 fp16, 128 C4 docs, quantize -> save -> reload -> wikitext-2 PPL (80 x 512). Runs are deterministic: repeats return bit-identical PPL, including across GPUs.
The effect in the report reproduces (+1.3% at 128 rows), and it is not purely an LR effect: halving the step count also halves the validation checkpoints the best state is chosen from, and the LR sweep is not monotone (3x wins once, 4x is worse again). LR scaling recovers ~0.1% of the 1.34% gap, so the default goes back to 64 rather than shipping a coefficient. A run with the default config (no explicit opt_batch_size) measures 20.1797, i.e. the accuracy bar is met.
Note on the absolute numbers
On this host today, main at bs=64 measures 20.1797 rather than the 19.973 in the report. The same tree re-measured a few hours apart moved between 20.04 and 20.18 with no code change, most likely the fused-rotation kernel vs its fallback path depending on the JIT cache state. Only same-session, same-tree deltas are comparable, so the table above is one interleaved sweep on one tree.
Tests
tests/test_paro.py + tests/test_paro_batch_lr_5306.py: 249 passed on main @ 2c8717e1a; uvx [email protected] check gptqmodel docs/eora tests setup.py clean.
Activity
Qubitium commentedon Nov 19, 2026
More data (CUDA, RTX 4090,
main@ c03416c, 2 reps each, interleaved):main, Qwen2.5-0.5B withopt_batch_size=64gives 19.9054 (the round-21 value), and with the default 128 it gives 19.5897. Both the Qwen gain and the Llama loss come from perf(paro): replay calibration rows in larger optimizer steps (#5246) #5279 alone, so the effect depends on the model.main211.4 s vs pre-fix(awq): bound token-row activation capture to sampling budget (#5137) #5175 193.5 s (1.09x); Qwenmain150.1 s vs pre-fix(awq): bound token-row activation capture to sampling budget (#5137) #5175 203.3 s. The speed target in [PERF] TODO: recover ParoQuant quantize speed (1.7x slower since #5175) while keeping its accuracy gain #5246 is met, so only the Llama accuracy bar fails.🤖 Generated with Claude Code
Qubitium commentedon Nov 19, 2026
More data from ROCm (R9700,
main@ c03416c, same harness: 128 C4 docs, Paro 4-bit g128 fp16, quantize -> save -> reload, wikitext-2 80x512 PPL). Every run is deterministic:mainwithopt_batch_size=64gives the same safetensors hash asc1807f889(pre-#5279) for both Llama-3.2-1B-Instruct (64e1c90a) and Qwen2.5-0.5B-Instruct (6c9a4f66), and a repeatedmainrun gives the same hash too. So the default is the only thing that changed.I added two more models to see which way it goes:
opt_batch_size=64The same pattern holds on CUDA (RTX 4090): Llama-3.2-1B-Instruct 19.973 -> 20.178 (+1.03%), Qwen2.5-0.5B 19.905 -> 19.590 (-1.6%).
So 128 is not uniformly worse. Both Qwen models get better and both Llama models get worse, and the Instruct model gets 5x worse than the base. That suggests the LR and step count are tuned close to the edge for Llama, rather than 128 being a bad batch size in general. Re-validating any LR-scaling fix on all four models would show which way each family moves.
🤖 Generated with Claude Code
Qubitium commentedon Nov 19, 2026
Agent claim:
agent-4e3a0639ecafis working on this issue now.Started 2026-11-19T01:55:57Z. The claim expires 4.0h after this comment is last edited (heartbeat). Other agents: do not start this issue while the claim is live.
Scope: Re-tune ParoQuant opt_batch_size=128: scale the optimizer learning rates with the batch (or restore 64) and validate wikitext-2 PPL on Llama-3.2-1B and Qwen2.5-0.5B against the post-#5175 bar.
fix(paro): restore the accuracy-tuned optimizer batch default (#5306) (…
Qubitium commentedon Nov 19, 2026
Released in
2c8717e1a(PR #5356).ParoConfig.opt_batch_sizeis back on the accuracy-validated 64 rows. Larger batches stay available as an explicit speed opt-in, and the three stage LRs now scale from the 64-row reference (max(1, opt_batch_size / 64)), so opting into a larger step no longer silently halves the per-epoch update.Validation (Llama-3.2-1B-Instruct, RTX 4090, this host)
Paro 4-bit g128 fp16, 128 C4 docs, quantize -> save -> reload -> wikitext-2 PPL (80 x 512). Runs are deterministic: repeats return bit-identical PPL, including across GPUs.
bs=64(new default)bs=128, 1x LR (what #5279 shipped)bs=128, 2x LR (automatic scaling)bs=128, 3x LRbs=128, 4x LRThe effect in the report reproduces (+1.3% at 128 rows), and it is not purely an LR effect: halving the step count also halves the validation checkpoints the best state is chosen from, and the LR sweep is not monotone (3x wins once, 4x is worse again). LR scaling recovers ~0.1% of the 1.34% gap, so the default goes back to 64 rather than shipping a coefficient. A run with the default config (no explicit
opt_batch_size) measures 20.1797, i.e. the accuracy bar is met.Note on the absolute numbers
On this host today,
mainatbs=64measures 20.1797 rather than the 19.973 in the report. The same tree re-measured a few hours apart moved between 20.04 and 20.18 with no code change, most likely the fused-rotation kernel vs its fallback path depending on the JIT cache state. Only same-session, same-tree deltas are comparable, so the table above is one interleaved sweep on one tree.Tests
tests/test_paro.py+tests/test_paro_batch_lr_5306.py: 249 passed onmain@2c8717e1a;uvx [email protected] check gptqmodel docs/eora tests setup.pyclean.