Skip to content

Two theorems about the metric, not about the format - #834

Merged
gHashTag merged 1 commit into
mainfrom
science/metric-theorems
Aug 18, 2026
Merged

Two theorems about the metric, not about the format#834
gHashTag merged 1 commit into
mainfrom
science/metric-theorems

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Two theorems about the measurement, not about the format — both from trinity-fpga#587.

T41 — relative dot-product error cannot see a format destroying a tensor. When one term dominates a sum, that term governs the relative error. So a format that flushes most of a tensor to zero still scores well:

8 bits, one outlier 4096× the rest error rank weights zeroed
e3m4 best 97.6%
e4m3 fields worse 2.1%

The first draft of that benchmark reported e3m4 as beating both OCP FP8 splits on exactly this basis. Ranking is now gated at 1% flushed.

T42 — a per-tensor scale moves the optimal split toward narrower exponents. The scale already covers the range between tensors, leaving the exponent responsible only for the spread within one. The ranking reverses between the unscaled round-trip benchmark and the scaled dot-product one, which is why both are kept: 16 bits, rule e6m9 at 2.0e-03 against e3m12 at 1.7e-04; 32 bits, e12m19 at 1.7e-06 against e4m27 at 8.1e-09.

T42's refusal matters: the optimum is for weights under amax scaling. Activation outliers run ~100× typical and gradients wider still — which is what E5M2's extra exponent is for, and neither was measured.

Citation verified through the arXiv API before publishing: arXiv:2209.05433, FP8 Formats for Deep Learning, Micikevicius et al.

Language audits run locally before pushing: RU PASS (27 маршрутов), EN PASS (27 маршрутов). Last iteration I skipped that step and merged a red audit.

T41 - relative dot-product error cannot see a format destroying a
      tensor. When one term dominates a sum, that term governs the
      relative error, so a format flushing most weights to zero still
      scores well. Measured: at 8 bits under a 4096x outlier, e3m4
      scored BEST while zeroing 97.6%, against 2.1% for e4m3.
T42 - a per-tensor scale moves the optimal split toward narrower
      exponents, because the scale already covers the range the
      exponent bits were being kept for. The ranking reverses between
      the unscaled and scaled benchmarks, which is why both are kept.

Citations verified: arXiv:2209.05433 confirmed through the arXiv API
(FP8 Formats for Deep Learning, Micikevicius et al.).

Language audits run locally before pushing this time: RU PASS and EN
PASS over 27 routes each. Last iteration I skipped that and merged a
red audit.
@gHashTag
gHashTag merged commit bbd4b1e into main Aug 18, 2026
19 of 23 checks passed
@gHashTag
gHashTag deleted the science/metric-theorems branch August 18, 2026 06:42
github-actions Bot added a commit that referenced this pull request Aug 18, 2026
Two theorems about the metric, not about the format (#834)

T41 - relative dot-product error cannot see a format destroying a
      tensor. When one term dominates a sum, that term governs the
      relative error, so a format flushing most weights to zero still
      scores well. Measured: at 8 bits under a 4096x outlier, e3m4
      scored BEST while zeroing 97.6%, against 2.1% for e4m3.
T42 - a per-tensor scale moves the optimal split toward narrower
      exponents, because the scale already covers the range the
      exponent bits were being kept for. The ranking reverses between
      the unscaled and scaled benchmarks, which is why both are kept.

Citations verified: arXiv:2209.05433 confirmed through the arXiv API
(FP8 Formats for Deep Learning, Micikevicius et al.).

Language audits run locally before pushing this time: RU PASS and EN
PASS over 27 routes each. Last iteration I skipped that and merged a
red audit.
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