Repository navigation
Description
🧭 SoT drift: GF format constants disagree across trios-trainer-igla / trios / zig-golden-float
Severity: P1 — data-integrity risk (Wave-3..7 BPB measurements attribute to "format X" with three different meanings of X)
R5 classification: methodology-drift
Summary
The canonical bit layouts for the GoldenFloat family live in gHashTag/zig-golden-float/specs/*.tri and docs/spec-gf16.md. Only GF16 and GF8 are sealed (production + experimental). Everything else is either a proposal in docs/research/gf16_family_phi_layout.md §3.1, or has no spec at all.
Downstream consumers drifted:
GF16
| Source | mantissa | exp | bias |
|---|---|---|---|
zig-golden-float/specs/gf16.tri SoT |
9 | 6 | 31 |
zig-golden-float/docs/spec-gf16.md §1 |
9 | 6 | 31 |
trios-trainer-igla/src/gf16.rs l.16 EXP_BIAS: i32 = 15 |
9 | 6 | 15 ❌ |
trios-trainer-igla/src/fake_quant.rs l.136 |
9 | — (f32=8) | — (f32=127) |
Conflict: bias=15 vs 31 → roundtrip through the local src/gf16.rs vs phi_numbers::gf16 may scale values by 2^16.
GF8
| Source | mantissa | exp | bias |
|---|---|---|---|
zig-golden-float/specs/gf8.tri SoT |
4 | 3 | 7 |
trios-trainer-igla/src/phi_numbers/gf8.rs l.22 EXP_BIAS: i8 = 3 |
4 | 3 | 3 ❌ |
trios-trainer-igla/src/fake_quant.rs l.137 |
4 | — | — |
GF32 — three different layouts
| Source | mantissa | exp | bias |
|---|---|---|---|
zig-golden-float/docs/research/gf16_family_phi_layout.md §3.1 proposal |
23 | 8 | 127 |
trios-trainer-igla/src/phi_numbers/gf32.rs l.18-22 |
18 | 13 | 4095 |
trios-trainer-igla/src/fake_quant.rs l.139 |
19 | — | — |
Three files, three different GF32. There is no specs/gf32.tri to arbitrate.
GF12 / GF20 / GF24 / GF64 — no SoT at all
Mentioned in:
- Family proposals §3.1 (GF12 proposal
1:5:6,bias=15, GF24 proposal1:7:16,bias=63) fake_quant.rsassigns mantissa=7/12/14/39 for GF12/20/24/64phi_numbers/gf64.rsexists with its own layout
No specs/gf{12,20,24,64}.tri file exists.
Wave-3..7 runs recorded BPB against these format labels. The label is ambiguous.
Requested actions
- Declare the canonical layout authoritatively. For each of GF4/8/12/16/20/24/32/64: either seal a
.triinzig-golden-float/specs/or mark the formatRETIRED. - Remove or conform the trios-trainer-igla local copies:
- Delete
src/gf16.rsin favour of FFI intocrates/trios-golden-float::GF16 - Delete
src/phi_numbers/gf8.rs/gf32.rs/gf64.rs(or conformEXP_BIASto the sealed spec)
- Delete
- Add a cross-repo conformance CI: generate
vectors.jsonfromspecs/*.triand run Rust/Zig/Python/C++/Go implementations against it on every PR. - Patch
fake_quant.rs(see trios#509-B) to call the canonicalphi_numbers::gf*::from_f32/to_f32instead of an ad-hoc mantissa mask. - Freeze claims in
phd_format_registryfor GF12/20/24/32/64 until their SoT is sealed — cells inphd_format_algo_matrixwith these format rows should carry asot_status='unsealed'flag.
Cites
- PR fix(gf16): reconcile production codec to standard (1+M/512), reclaim wasted mantissa bit #94 (
43f817b1) introducedsrc/fake_quant.rs specs/gf16.trispecs/gf8.tridocs/spec-gf16.mddocs/research/gf16_family_phi_layout.md§3.1trios-trainer-igla/src/gf16.rsl.16trios-trainer-igla/src/phi_numbers/gf8.rsl.22trios-trainer-igla/src/phi_numbers/gf32.rsl.18-22
phi^2 + phi^-2 = 3 · TRINITY · ONE SOURCE OF TRUTH
Activity