Skip to content

exp(acestep): int8 DiT fake-quant quality gate (OPT-0089) - #62

Merged
Alex-Wengg merged 4 commits into
mainfrom
exp/int8-dit-gate
Aug 24, 2026
Merged

Alex-Wengg merged 4 commits into
mainfrom
exp/int8-dit-gate

Conversation

@Alex-Wengg

Copy link
Copy Markdown
Member

Summary

Measured feasibility gate for an int8-weight DiT on iPhone, registered as OPT-0089 (benchmark-only; no kernel, runtime, or production change). Motivated by a real iPhone 17 Safari tab OOM-killed during DiT weight upload at 1,789,925,376 / 3,020,808,192 bytes (layer 14/24): the fp16 rev7 dense DiT cannot fit the tab. Before any int8 kernel work, this measures PURE quantization damage with zero kernel changes.

What this PR contains

  • scripts/requantize-dit-int8.py — streams the hosted dit-revision7 package shard-by-shard, fake-quantizes the 264 rank-two GEMM tensors (symmetric int8, fp16 scale per 32-K block, round-to-nearest, clamp ±127) in their native tile layouts, dequantizes in place, and emits a content-addressed package whose manifest differs only in the 48 shard SHA-256s + its own SHA-256 (byte length preserved at 254,357). Norms/biases/tables/constants byte-identical. Fake-quant package ef8355b9… stays in gitignored models-local/ — weights are NOT in this PR.
  • OPT-0089 ledger registration + closed record + result artifacts (quant-error.json, waveform-metrics.json), following the OPT-0088 registration convention; next-available-ID test pins refreshed.

Measured results

Per-tensor damage (weight level): uniform, NRMSE 0.00515–0.00634 (median 0.00559), min SNR 43.96 dB, no outlier tensor or family → no mixed-precision fp16-retention map needed.

End-to-end, unchanged production graph, fresh profile per run, local model origins; fp16 determinism gate reproduced the pinned seed-12345 baseline WAV byte-exactly (095267d7…) before any fake-quant run:

pair waveform NRMSE SNR Pearson LSD mean peak Δ RMS Δ
lo-fi, seed 12345 0.0669 23.50 dB 0.99777 ≈3.5 dB +0.0000 −0.050 dB
Latin default prompt, seed 424242 0.2268 12.89 dB 0.97460 ≈4.7 dB +0.0000 +0.089 dB

The damage is trajectory divergence of the 8-evaluation sampler, not noise-like corruption (zero non-finite samples, exact peak parity, flat per-second profiles; the latin per-second max 5.19 is a near-silent ending-decay small-denominator artifact).

Memory projection: int8 resident = 1.51 GB weights + 94 MB scales; projected DiT phase peak ≈1.862 GB tracked GPU vs the observed ≈1.920 GB iPhone kill point (conditioning already released before upload) — plausibly fits, ≈58 MB margin; fallback levers identified (quantize 130 MB reference-shared, int4 MLP).

Verdict: int8-per-block-32 does not collapse generation; kernel work justified under a new OPT id; listening gate mandatory before any product claim.

Validation

  • npm run acestep:test green (2025 passed, 27 skipped) after registration and after close.
  • Temporary pinned-SHA patches used for the fake-quant browser runs were reverted and are not part of this PR; the experiment is reproducible from the script + documented invocation.

Do not merge without review; benchmark-only record.

Additive ledger entry and experiment record only; no existing record
content changed. Registers the measured iPhone-memory feasibility gate
before any requantization or comparison work, per the
optimization-history discipline in AGENTS.md. Distinct mechanism from
abandoned OPT-0058 (no activation quantization, no kernel changes).
…llocation

Test-file pin refresh only, per the established convention.
Streams the hosted rev7 dense DiT package shard-by-shard, fake-quantizes
the 264 rank-two GEMM tensors (symmetric int8, fp16 scale per 32-K
block, round-to-nearest, clamp +/-127) in their native tile layouts, and
emits a content-addressed package whose manifest differs only in the 48
shard SHA-256 values plus its own SHA-256 (byte length preserved), plus
a per-tensor quantization-error JSON report. Norms, biases, scale-shift
tables, and constants are byte-identical passthrough. models-local
output stays gitignored; only the script is committed.
…results

Evidence positive (numerical feasibility only, no listening claim),
disposition benchmark-only. Records the per-tensor quantization-error
report (264 tensors, NRMSE 0.00515-0.00634, no outliers), the byte-exact
fp16 determinism reproduction of the pinned seed-12345 baseline WAV, the
fake-quant vs fp16 waveform/spectral comparison on two prompt/seed pairs
(NRMSE 0.0669 / 0.2268, trajectory divergence rather than noise-like
corruption), and the iPhone residency projection (~1.862 GB int8 phase
peak vs the observed ~1.920 GB kill boundary). Updates only the OPT-0089
row and record; no prior ledger content changed.
@Alex-Wengg
Alex-Wengg merged commit 51b024c into main Aug 24, 2026
6 of 7 checks passed
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