Skip to content

feat(quant): pure-quant (no-SC) baselines + 7-bit W/A support - #5

Open
heroarmor wants to merge 1 commit into
feat/mp-global-budget-rawdumpfrom
feat/quant-baselines
Open

feat(quant): pure-quant (no-SC) baselines + 7-bit W/A support#5
heroarmor wants to merge 1 commit into
feat/mp-global-budget-rawdumpfrom
feat/quant-baselines

Conversation

@heroarmor

Copy link
Copy Markdown
Owner

What

Adds pure-quant (no-SC) baselines and 7-bit W/A support.

  • scripts/sbatch_baseline_auto.sb — TIMEOUT-safe auto-resume generation for pure integer-quant baselines (SC never applied: timewise/layerwise unset). Args: <WBITS> <ABITS> <sym|asym> [CHAIN]. 2000 imgs, first 200 classes ×10 (idx 0-1999), cfg=1.5, seed 0 — identical layout to the SC sweeps. sym = --w_sym --a_sym; asym = neither. FP16 = W16A16.
  • scripts/quant_sc_main.py — add 7 to --wbits/--abits choices (was [2,3,4,5,6,8,16]; W7A7 was rejected by argparse).

Baseline results (200-class matched idx 0-1999, vs reference)

KID×1e3 IS PSNR-vs-FP16
FP16 3.56 95
W8A8 / W7A7-asym / W4A8 / W6A8 ~3.36 ~86 ~23 dB
W7A7-sym, W6A6, W5A5, W4A4 92 → 256 (collapse) 1–5 ~14 dB

Takeaways: near-lossless with 8-bit activations (W4A8/W6A8/W8A8 reproduce Q-DiT); asymmetric buys ~1 bit over symmetric; the cliff is activation bit-width, not weight — isolation confirms weight-only 7-bit ≡ FP16 and activation-only 7-bit ≡ the full W7A7 collapse (per-token quant hits outlier channels; no SmoothQuant wired).

Stacked on feat/mp-global-budget-rawdump (#4).

Add scripts/sbatch_baseline_auto.sb: TIMEOUT-safe auto-resume generation
for pure integer-quant baselines (SC never applied — timewise/layerwise
unset). Parametrized by <WBITS> <ABITS> <sym|asym>; 2000 imgs, first 200
classes x10 (idx 0-1999), cfg=1.5, seed 0 — same layout as the SC sweeps.
FP16 = W16A16.

Enable 7-bit: add 7 to --wbits/--abits choices in quant_sc_main.py (was
[2,3,4,5,6,8,16]; W7A7 was rejected by argparse).

Baseline findings (200-class matched, vs reference): FP16 ~= W8A8 ~=
W7A7-asym (near-lossless); asymmetric buys ~1 bit over symmetric; W6 and
below (activations <8-bit) collapse — activation quant is the sole driver
(W4A8/W6A8 reproduce Q-DiT exactly, weight-only 7-bit == FP16).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
heroarmor pushed a commit that referenced this pull request Aug 18, 2026
MP-on-DiT: SC halving + global MP budget + pure-quant baselines + kernels #24/#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant