Skip to content

Commit 80c7b48

Browse files
author
gHashTag
committed
conformance: complete catalog-wide pack set for all 83 formats
- Add 78 new conformance packs (one per catalog format), reaching full 83-format coverage: 49 bit-exact (encode-decode round-trip) + 34 structural (formats without a fixed radix-2 S:E:M layout). - Add INDEX_all_formats.json (machine-readable: total_packs=83, bitexact_packs=49, structural_packs=34) with phi^2+1/phi^2=3 anchor. - Add gen_all_formats.py master generator (reads catalog SSOT). - Rewrite conformance/vectors/README.md to document all 83 packs: coverage policy, 49-pack bit-exact index, 34-pack structural index with reasons, full SHA-256 block, schema, provenance. - Tier-1 subset (GF16, MXFP4 element, BF16, FP8 E4M3, FP8 E5M2, E8M0) remains deeply validated and cross-checked against ml_dtypes 0.5.4.
1 parent b76eeff commit 80c7b48

81 files changed

Lines changed: 27801 additions & 67 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

conformance/vectors/INDEX_all_formats.json

Lines changed: 671 additions & 0 deletions
Large diffs are not rendered by default.

conformance/vectors/README.md

Lines changed: 242 additions & 67 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"schema": "t27-conformance/v0.1",
3+
"format": "AFP",
4+
"format_name": "AFP (Adaptive Floating-Point)",
5+
"bitexact": false,
6+
"format_notes": "AFP (Adaptive Floating-Point) -- Tambe 2020",
7+
"catalog": {
8+
"id": "afp",
9+
"bits": 16,
10+
"s": 1,
11+
"e": 8,
12+
"m": 7,
13+
"bias": 127,
14+
"storage": "u16_plus_tensor_shift",
15+
"cluster": "QuantTuned",
16+
"status": "Verified",
17+
"standard": "Tambe 2020",
18+
"use_case": "efficient training",
19+
"gf_relation": "orthogonal",
20+
"source": "Tambe 2020 (DAC)",
21+
"phi_distance": -1.0
22+
},
23+
"ssot": "https://github.com/gHashTag/t27/blob/master/conformance/FORMAT-SPEC-001.json",
24+
"preprint": "https://arxiv.org/abs/2606.05017",
25+
"anchor_identity": "phi^2 + 1/phi^2 = 3",
26+
"structural_reason": "No fixed bit-precise round-trip is defined for this entry; recorded structurally with catalog metadata.",
27+
"anchor_note": "Anchor identity phi^2 + 1/phi^2 = 3 recorded per shared schema.",
28+
"n_vectors": 0,
29+
"vectors": []
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"schema": "t27-conformance/v0.1",
3+
"format": "BCD",
4+
"format_name": "BCD (binary-coded decimal)",
5+
"bitexact": false,
6+
"format_notes": "BCD (binary-coded decimal) -- IBM 1959",
7+
"catalog": {
8+
"id": "bcd",
9+
"bits": 0,
10+
"s": 0,
11+
"e": 0,
12+
"m": 0,
13+
"bias": 0,
14+
"storage": "u4_per_digit",
15+
"cluster": "IntegerFixed",
16+
"status": "Historical",
17+
"standard": "IBM 1959",
18+
"use_case": "calculators, GAAP",
19+
"gf_relation": "orthogonal",
20+
"source": "ISO/IEC 8859",
21+
"phi_distance": -1.0
22+
},
23+
"ssot": "https://github.com/gHashTag/t27/blob/master/conformance/FORMAT-SPEC-001.json",
24+
"preprint": "https://arxiv.org/abs/2606.05017",
25+
"anchor_identity": "phi^2 + 1/phi^2 = 3",
26+
"structural_reason": "This format has no single fixed bit layout (parametric / technique / variable-width). A bit-precise round-trip vector table is not well-defined; the catalog metadata and anchor note are recorded instead.",
27+
"anchor_note": "Anchor identity phi^2 + 1/phi^2 = 3 recorded per shared schema.",
28+
"n_vectors": 0,
29+
"vectors": []
30+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"schema": "t27-conformance/v0.1",
3+
"format": "BINARY128",
4+
"format_name": "binary128 (fp128, quad)",
5+
"bitexact": true,
6+
"format_notes": "IEEE 754 binary128, S1E15M112, bias 16383. inf at max exp m=0, nan at max exp m!=0 (mantissa exceeds f64; decode approximate for wide formats)",
7+
"catalog": {
8+
"id": "binary128",
9+
"bits": 128,
10+
"s": 1,
11+
"e": 15,
12+
"m": 112,
13+
"bias": 16383,
14+
"storage": "u128",
15+
"cluster": "Ieee754Binary",
16+
"status": "Verified",
17+
"standard": "IEEE 754-2008",
18+
"use_case": "high-precision simulations",
19+
"gf_relation": "competitor",
20+
"source": "IEEE 754-2008",
21+
"phi_distance": 0.484
22+
},
23+
"ssot": "https://github.com/gHashTag/t27/blob/master/conformance/FORMAT-SPEC-001.json",
24+
"preprint": "https://arxiv.org/abs/2606.05017",
25+
"anchor_identity": "phi^2 + 1/phi^2 = 3",
26+
"anchor_check": {
27+
"value": 3.0,
28+
"expected": 3.0,
29+
"ieee754_exact": true,
30+
"binary128_bits_hex": "0x40008000000000000000000000000000"
31+
},
32+
"round_trip_policy": "decode: exact bits->f64 (curated_named). encode (reference): round-nearest-ties-even; overflow per format convention. abs_error 0 for representable values.",
33+
"vector_mode": "curated_named",
34+
"n_vectors": 8,
35+
"vectors": [
36+
{
37+
"name": "pos_zero",
38+
"input_f64": 0.0,
39+
"input_f64_hex": "0x0000000000000000",
40+
"binary128_bits_hex": "0x00000000000000000000000000000000",
41+
"binary128_bits_int": 0,
42+
"decoded_f64": 0.0,
43+
"decoded_f64_hex": "0x0000000000000000",
44+
"abs_error": 0.0,
45+
"category": "zero"
46+
},
47+
{
48+
"name": "pos_one",
49+
"input_f64": 1.0,
50+
"input_f64_hex": "0x3FF0000000000000",
51+
"binary128_bits_hex": "0x3FFF0000000000000000000000000000",
52+
"binary128_bits_int": 85065399433376081038215121361612832768,
53+
"decoded_f64": 1.0,
54+
"decoded_f64_hex": "0x3FF0000000000000",
55+
"abs_error": 0.0,
56+
"category": "normal"
57+
},
58+
{
59+
"name": "neg_one",
60+
"input_f64": -1.0,
61+
"input_f64_hex": "0xBFF0000000000000",
62+
"binary128_bits_hex": "0xBFFF0000000000000000000000000000",
63+
"binary128_bits_int": 255206582893845312769902425077496938496,
64+
"decoded_f64": -1.0,
65+
"decoded_f64_hex": "0xBFF0000000000000",
66+
"abs_error": 0.0,
67+
"category": "normal"
68+
},
69+
{
70+
"name": "pos_two",
71+
"input_f64": 2.0,
72+
"input_f64_hex": "0x4000000000000000",
73+
"binary128_bits_hex": "0x40000000000000000000000000000000",
74+
"binary128_bits_int": 85070591730234615865843651857942052864,
75+
"decoded_f64": 2.0,
76+
"decoded_f64_hex": "0x4000000000000000",
77+
"abs_error": 0.0,
78+
"category": "normal"
79+
},
80+
{
81+
"name": "pos_three",
82+
"input_f64": 3.0,
83+
"input_f64_hex": "0x4008000000000000",
84+
"binary128_bits_hex": "0x40008000000000000000000000000000",
85+
"binary128_bits_int": 85073187878663883279657917106106662912,
86+
"decoded_f64": 3.0,
87+
"decoded_f64_hex": "0x4008000000000000",
88+
"abs_error": 0.0,
89+
"category": "normal"
90+
},
91+
{
92+
"name": "pos_half",
93+
"input_f64": 0.5,
94+
"input_f64_hex": "0x3FE0000000000000",
95+
"binary128_bits_hex": "0x3FFE0000000000000000000000000000",
96+
"binary128_bits_int": 85060207136517546210586590865283612672,
97+
"decoded_f64": 0.5,
98+
"decoded_f64_hex": "0x3FE0000000000000",
99+
"abs_error": 0.0,
100+
"category": "normal"
101+
},
102+
{
103+
"name": "pos_four",
104+
"input_f64": 4.0,
105+
"input_f64_hex": "0x4010000000000000",
106+
"binary128_bits_hex": "0x40010000000000000000000000000000",
107+
"binary128_bits_int": 85075784027093150693472182354271272960,
108+
"decoded_f64": 4.0,
109+
"decoded_f64_hex": "0x4010000000000000",
110+
"abs_error": 0.0,
111+
"category": "normal"
112+
},
113+
{
114+
"name": "neg_three",
115+
"input_f64": -3.0,
116+
"input_f64_hex": "0xC008000000000000",
117+
"binary128_bits_hex": "0xC0008000000000000000000000000000",
118+
"binary128_bits_int": 255214371339133115011345220821990768640,
119+
"decoded_f64": -3.0,
120+
"decoded_f64_hex": "0xC008000000000000",
121+
"abs_error": 0.0,
122+
"category": "normal"
123+
}
124+
]
125+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"schema": "t27-conformance/v0.1",
3+
"format": "BINARY16",
4+
"format_name": "binary16 (fp16, half)",
5+
"bitexact": true,
6+
"format_notes": "IEEE 754 binary16, S1E5M10, bias 15. inf at max exp m=0, nan at max exp m!=0",
7+
"catalog": {
8+
"id": "binary16",
9+
"bits": 16,
10+
"s": 1,
11+
"e": 5,
12+
"m": 10,
13+
"bias": 15,
14+
"storage": "u16",
15+
"cluster": "Ieee754Binary",
16+
"status": "Verified",
17+
"standard": "IEEE 754-2008",
18+
"use_case": "GPU activations, inference",
19+
"gf_relation": "competitor",
20+
"source": "IEEE 754-2008",
21+
"phi_distance": 0.118
22+
},
23+
"ssot": "https://github.com/gHashTag/t27/blob/master/conformance/FORMAT-SPEC-001.json",
24+
"preprint": "https://arxiv.org/abs/2606.05017",
25+
"anchor_identity": "phi^2 + 1/phi^2 = 3",
26+
"anchor_check": {
27+
"value": 3.0,
28+
"expected": 3.0,
29+
"ieee754_exact": true,
30+
"binary16_bits_hex": "0x4200"
31+
},
32+
"round_trip_policy": "decode: exact bits->f64 (curated_named). encode (reference): round-nearest-ties-even; overflow per format convention. abs_error 0 for representable values.",
33+
"vector_mode": "curated_named",
34+
"n_vectors": 8,
35+
"vectors": [
36+
{
37+
"name": "pos_zero",
38+
"input_f64": 0.0,
39+
"input_f64_hex": "0x0000000000000000",
40+
"binary16_bits_hex": "0x0000",
41+
"binary16_bits_int": 0,
42+
"decoded_f64": 0.0,
43+
"decoded_f64_hex": "0x0000000000000000",
44+
"abs_error": 0.0,
45+
"category": "zero"
46+
},
47+
{
48+
"name": "pos_one",
49+
"input_f64": 1.0,
50+
"input_f64_hex": "0x3FF0000000000000",
51+
"binary16_bits_hex": "0x3C00",
52+
"binary16_bits_int": 15360,
53+
"decoded_f64": 1.0,
54+
"decoded_f64_hex": "0x3FF0000000000000",
55+
"abs_error": 0.0,
56+
"category": "normal"
57+
},
58+
{
59+
"name": "neg_one",
60+
"input_f64": -1.0,
61+
"input_f64_hex": "0xBFF0000000000000",
62+
"binary16_bits_hex": "0xBC00",
63+
"binary16_bits_int": 48128,
64+
"decoded_f64": -1.0,
65+
"decoded_f64_hex": "0xBFF0000000000000",
66+
"abs_error": 0.0,
67+
"category": "normal"
68+
},
69+
{
70+
"name": "pos_two",
71+
"input_f64": 2.0,
72+
"input_f64_hex": "0x4000000000000000",
73+
"binary16_bits_hex": "0x4000",
74+
"binary16_bits_int": 16384,
75+
"decoded_f64": 2.0,
76+
"decoded_f64_hex": "0x4000000000000000",
77+
"abs_error": 0.0,
78+
"category": "normal"
79+
},
80+
{
81+
"name": "pos_three",
82+
"input_f64": 3.0,
83+
"input_f64_hex": "0x4008000000000000",
84+
"binary16_bits_hex": "0x4200",
85+
"binary16_bits_int": 16896,
86+
"decoded_f64": 3.0,
87+
"decoded_f64_hex": "0x4008000000000000",
88+
"abs_error": 0.0,
89+
"category": "normal"
90+
},
91+
{
92+
"name": "pos_half",
93+
"input_f64": 0.5,
94+
"input_f64_hex": "0x3FE0000000000000",
95+
"binary16_bits_hex": "0x3800",
96+
"binary16_bits_int": 14336,
97+
"decoded_f64": 0.5,
98+
"decoded_f64_hex": "0x3FE0000000000000",
99+
"abs_error": 0.0,
100+
"category": "normal"
101+
},
102+
{
103+
"name": "pos_four",
104+
"input_f64": 4.0,
105+
"input_f64_hex": "0x4010000000000000",
106+
"binary16_bits_hex": "0x4400",
107+
"binary16_bits_int": 17408,
108+
"decoded_f64": 4.0,
109+
"decoded_f64_hex": "0x4010000000000000",
110+
"abs_error": 0.0,
111+
"category": "normal"
112+
},
113+
{
114+
"name": "neg_three",
115+
"input_f64": -3.0,
116+
"input_f64_hex": "0xC008000000000000",
117+
"binary16_bits_hex": "0xC200",
118+
"binary16_bits_int": 49664,
119+
"decoded_f64": -3.0,
120+
"decoded_f64_hex": "0xC008000000000000",
121+
"abs_error": 0.0,
122+
"category": "normal"
123+
}
124+
]
125+
}

0 commit comments

Comments
 (0)