Skip to content

SC FID eval (KID) + 9-GPU FP/W8A8 runners + MP calibration fix - #3

Open
heroarmor wants to merge 3 commits into
feat/sc-halvefrom
feat/sc-eval-runners-calibfix
Open

SC FID eval (KID) + 9-GPU FP/W8A8 runners + MP calibration fix#3
heroarmor wants to merge 3 commits into
feat/sc-halvefrom
feat/sc-eval-runners-calibfix

Conversation

@heroarmor

Copy link
Copy Markdown
Owner

Summary

SC FID-evaluation + multi-GPU run tooling from this session, plus a calibration bug fix. Stacked on feat/sc-halve so the diff is only this work.

Fix

  • scripts/calibrate_mp_thresholds.py — the MLP chunked path in _run_mlp_linear_level called sc_matmul_enable_triton_mlp, a stale symbol that no longer exists (runtime NameError), with obsolete max/min positional args. Switched to sc_matmul(granularity="per_row", ...), matching the attention chunked branch and the non-chunked MLP branch. Unblocks MP threshold calibration in this repo (previously only runnable in scmp_diffusion_prev).

New tooling

  • scripts/eval/kid_openai.{py,sh} — KID (polynomial-kernel unbiased MMD², 100×1000 subsets) on the same Inception pool3 features the ADM/OpenAI evaluator uses for FID, so KID is directly comparable to reported FID/sFID/IS. Re-derives FID from the same features as a consistency check.
  • scripts/eval_openai.sh — ADM FID/sFID/IS/Precision/Recall wrapper (packs PNGs→npz, runs the evaluator in the tfeval env vs the ImageNet-256 reference).
  • scripts/run_quant_9gpu.sh + _quant_node_worker.sh — generalized no-SC baseline runner, 3 nodes × 3 GPU. WBITS=16→FP16 baseline; WBITS=8→W8A8 (no stochastic computing). Generate → eval (FID/sFID/IS/P/R) + KID.
  • scripts/run_fp_9gpu.sh + _fp_node_worker.sh — FP16 baseline 9-GPU runner.
  • scripts/_mp_calib_worker.sh — builds fresh MP threshold tables (avg 64/96/128) via the fixed calibrate_mp_thresholds.py.

Results produced (DiT-XL/2 256×256, cfg=1.5, 50 DDIM steps, bitrev, 10k samples)

run FID↓ sFID↓ IS↑ Prec↑ Rec↑ KID×10³↓
FP (w16a16) 4.79 19.78 164.5 0.802 0.675 0.32
W8A8 no-SC 7.55 27.41 140.5 0.731 0.704 1.84
W8A8+SC sl=64 9.07 22.70 130.5 0.701 0.710 3.04
W8A8+SC sl=96 7.66 22.72 138.4 0.722 0.700 2.09
W8A8+SC sl=128 6.08 21.05 148.0 0.751 0.693 1.06

FID/sFID use the ADM precomputed reference; KID + Precision/Recall use the 10k arr_0 reference images.

Notes

  • Base is feat/sc-halve (depends on its per-row QK granularity) — retarget to main if preferred.
  • Other untracked working-tree files (run_3gpu_*.sh, run_ngpu_uniform_nohalve_fanout.sh, tools/*) were intentionally left out; say the word to include them.
  • Scripts use absolute cluster paths, consistent with the rest of the repo.

🤖 Generated with Claude Code

heroarmor and others added 3 commits June 13, 2026 04:31
_run_mlp_linear_level's chunked path called sc_matmul_enable_triton_mlp, a
stale name that no longer exists (NameError at runtime), with obsolete max/min
positional args. Switch to sc_matmul(granularity='per_row', ...) to match the
attention chunked branch and the non-chunked MLP branch. Unblocks MP threshold
calibration in this repo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- eval/kid_openai.{py,sh}: KID (poly-kernel unbiased MMD^2, 100x1000 subsets)
  on the SAME Inception pool3 features as the ADM evaluator FID, so KID is
  directly comparable to reported FID/sFID/IS; re-derives FID as a check.
- eval_openai.sh: ADM FID/sFID/IS/Precision/Recall wrapper (pack PNGs->npz,
  run evaluator in tfeval env vs the ImageNet-256 reference).
- run_quant_9gpu.sh + _quant_node_worker.sh: generalized no-SC baseline runner,
  3 nodes x 3 GPU. wbits=16 -> FP16 baseline; wbits=8 -> W8A8 (no SC).
- run_fp_9gpu.sh + _fp_node_worker.sh: FP16 baseline 9-GPU runner.
- _mp_calib_worker.sh: build fresh MP threshold tables (avg 64/96/128).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- run_ngpu_uniform_nohalve_fanout.sh: N-GPU uniform-precision SC FID sweep with
  work-steal index planning (the cfg=1.5 uniform sl=64/96/128 results came from
  this). NUM_GPUS env-overridable.
- run_3gpu_uniform_nohalve_bitrev.sh / run_3gpu_uniform_halve_bitrev.sh: 3-GPU
  uniform sweep variants (halve OFF / ON, bitrev scramble).

SC configs live under results/ (gitignored, regenerable); FID numbers are in PR #3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
heroarmor pushed a commit that referenced this pull request Aug 18, 2026
docs: update README to match current code
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