Ludovico commited on
Card: the Sage MXFP4 experts in WEX4 with WNR3 records (same weights as the WEX1 file, 0.832 of its size)
Browse files
README.md
CHANGED
|
@@ -36,6 +36,7 @@ The weights are 4-bit, and making them 4-bit did lose some precision. That happe
|
|
| 36 |
| `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek publishes the experts of [DeepSeek-V4.1-Flash-1017](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017) already in 4 bits (MXFP4). Then a third party removed half of the experts and published the rest as [patrickbdevaney/DeepSeek-V4.1-Flash-1017-REAP192-MXFP4](https://huggingface.co/patrickbdevaney/DeepSeek-V4.1-Flash-1017-REAP192-MXFP4) ("REAP" pruning: 192 of 384 experts kept in each layer, the kept ones copied unchanged). Removing experts loses quality | Compressed to 85% of the size. Every weight is the same number (one detail about zero, see below) |
|
| 37 |
| `Sage-S2.1-Flash-int4/Sage-S2.1-Flash-int4.wex4` | Shanghai AI Laboratory published [Sage-S2.1-Flash](https://huggingface.co/internlm/Sage-S2.1-Flash) and an official 8-bit version, [internlm/Sage-S2.1-Flash-FP8](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8). **We** rounded its experts to 4-bit integers (int4) and turned its other 8-bit tensors into 16-bit BF16, which can round too. **Lossy; we have not measured the quality** | Keeps our int4 files unchanged. A small part is compressed ZIP-style (WBP1), and that is lossless too |
|
| 38 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex` | the same official 8-bit version; **we** rounded its experts to MXFP4. **Lossy; we have not measured the quality** | Not compressed. Uses the older WEX1 layout, which has no fingerprints inside; the manifest file next to it has them |
|
|
|
|
| 39 |
|
| 40 |
## Is this a quantization? No.
|
| 41 |
|
|
@@ -118,6 +119,8 @@ The rest of this card is technical detail.
|
|
| 118 |
| `Sage-S2.1-Flash-int4/Sage-S2.1-Flash-int4.wex4` | our int4 requantization of the 62 model shards of Sage-S2.1-Flash-FP8 (see below); WEX4 holding 62 safetensors files (ST_SOURCES) | 75,273 (74,304 RAW, 969 WBP1); 75,922 tensors, of which 12,384 routed experts (43 Γ 288) | 187,770,384,384 B (187.77 GB) | [MIT](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8#license) |
|
| 119 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex` | Sage-S2.1-Flash routed experts of layers 3-44 in our MXFP4 requantization; WEX1 (older layout: no index fingerprints) | 12,096 (42 Γ 288), 13,369,344 B each | 161,716,523,008 B (161.72 GB) | [MIT](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8#license) |
|
| 120 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex.manifest.json` | SHA-256 of each layer's records and of the header page and table of the WEX1 file | β | 10,924 B | β |
|
|
|
|
|
|
|
| 121 |
| `provenance/q38_experts.wex.verified.pre-wex4` | SHA-256 of the WEX1 copy the Qwen RAW file was upgraded from | β | 123 B | β |
|
| 122 |
| `provenance/v4_flash_experts.nr3.wex.verified.pre-wex4` | build and read-back note of the DeepSeek file | β | 177 B | β |
|
| 123 |
|
|
@@ -137,6 +140,7 @@ WEX4 and WNR3 are separate layers:
|
|
| 137 |
| `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `203d55dc96f5c2fe16716cef2c767fa63c387e8cbbbe98991ecd4f7039c7e4b2` | 7,680 records decoded, every hash matches the index; content digest `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` |
|
| 138 |
| `Sage-S2.1-Flash-int4.wex4` | `85246e738032d8734d27575448952f69f49308f8cb5caaba7b281b13ce25bf0d` | `bbfa112154425fb73339ebd1b05d3d53f987b8374a2e5481ba5c1f3e8e3e0747` | a SHA-256 for each of the 62 source files is inside; no full check of this file is on record, so run `wex4_verify` or `unpack` |
|
| 139 |
| `Sage-S2.1-Flash-MXFP4.wex` | none (WEX1) | `cae23f8575f92f29be895ef460caf1d66d764a870389b6a234a1aff876949249` | a local copy was re-hashed against this manifest (header page and table `ef4b66cfcc72f539367eaffc64bbb18ddb442b90ecd06a63a5169bea8596a158`) |
|
|
|
|
| 140 |
|
| 141 |
The root is the SHA-256 of the first 4,064 bytes of the header page. The record SHA-256 covers the stored bytes, so `wex4_verify` proves the file is intact, not that decoding is exact. The content digest is the SHA-256 over, for each tensor in table order, its name, dtype, shape, size and decoded bytes; it does not cover metadata, blobs or feature bits ([WEX4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WEX4-SPEC.md) section 5). The WNR3 builder decodes every record on the CPU and refuses to write one that does not decode back exactly. A damaged WNR3 record is caught twice: by the stream hashes (0 of 2,231,336 wrong single-bit flips accepted on the GPU, 0 of 3,000 on the CPU, [WNR3-VERIFY](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/reports/WNR3-VERIFY.md)) and by the record's SHA-256 in the index.
|
| 142 |
|
|
@@ -148,7 +152,8 @@ The root is the SHA-256 of the first 4,064 bytes of the header page. The record
|
|
| 148 |
| DeepSeek V4.1 REAP-192, WNR3 with canonical zero, against the raw WEX1 container of the same experts | 123,312,910,336 B | 144,389,472,256 B | **0.854** |
|
| 149 |
| DeepSeek V4.1 REAP-192, WNR3 byte-exact (40 held-out experts, not a full file) | | | about 0.882 |
|
| 150 |
| Sage int4, against its 62 source safetensors files | 187,770,384,384 B | 194,727,333,920 B | 0.964 |
|
| 151 |
-
|
|
|
|
|
| 152 |
|
| 153 |
## Quality of the 4-bit weights (steps taken before the container)
|
| 154 |
|
|
|
|
| 36 |
| `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek publishes the experts of [DeepSeek-V4.1-Flash-1017](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017) already in 4 bits (MXFP4). Then a third party removed half of the experts and published the rest as [patrickbdevaney/DeepSeek-V4.1-Flash-1017-REAP192-MXFP4](https://huggingface.co/patrickbdevaney/DeepSeek-V4.1-Flash-1017-REAP192-MXFP4) ("REAP" pruning: 192 of 384 experts kept in each layer, the kept ones copied unchanged). Removing experts loses quality | Compressed to 85% of the size. Every weight is the same number (one detail about zero, see below) |
|
| 37 |
| `Sage-S2.1-Flash-int4/Sage-S2.1-Flash-int4.wex4` | Shanghai AI Laboratory published [Sage-S2.1-Flash](https://huggingface.co/internlm/Sage-S2.1-Flash) and an official 8-bit version, [internlm/Sage-S2.1-Flash-FP8](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8). **We** rounded its experts to 4-bit integers (int4) and turned its other 8-bit tensors into 16-bit BF16, which can round too. **Lossy; we have not measured the quality** | Keeps our int4 files unchanged. A small part is compressed ZIP-style (WBP1), and that is lossless too |
|
| 38 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex` | the same official 8-bit version; **we** rounded its experts to MXFP4. **Lossy; we have not measured the quality** | Not compressed. Uses the older WEX1 layout, which has no fingerprints inside; the manifest file next to it has them |
|
| 39 |
+
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.nr3.wex` | exactly the same Sage MXFP4 weights as the file above | Compressed to 83% of the older file, in the newer WEX4 layout with a fingerprint for every expert. Unpacking gives exactly the same bytes: all 12,096 experts were unpacked and compared byte for byte with the source files, 0 differences |
|
| 40 |
|
| 41 |
## Is this a quantization? No.
|
| 42 |
|
|
|
|
| 119 |
| `Sage-S2.1-Flash-int4/Sage-S2.1-Flash-int4.wex4` | our int4 requantization of the 62 model shards of Sage-S2.1-Flash-FP8 (see below); WEX4 holding 62 safetensors files (ST_SOURCES) | 75,273 (74,304 RAW, 969 WBP1); 75,922 tensors, of which 12,384 routed experts (43 Γ 288) | 187,770,384,384 B (187.77 GB) | [MIT](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8#license) |
|
| 120 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex` | Sage-S2.1-Flash routed experts of layers 3-44 in our MXFP4 requantization; WEX1 (older layout: no index fingerprints) | 12,096 (42 Γ 288), 13,369,344 B each | 161,716,523,008 B (161.72 GB) | [MIT](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8#license) |
|
| 121 |
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.wex.manifest.json` | SHA-256 of each layer's records and of the header page and table of the WEX1 file | β | 10,924 B | β |
|
| 122 |
+
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.nr3.wex` | the same Sage-S2.1-Flash routed experts (layers 3-44, our MXFP4 requantization); WEX4, WNR3 records with canonical zero (byte-exact here: the experts contain no -0) | 12,096 (42 Γ 288) | 134,545,358,848 B (134.55 GB) | [MIT](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8#license) |
|
| 123 |
+
| `Sage-S2.1-Flash-MXFP4/Sage-S2.1-Flash-MXFP4.nr3.wex.json` | build record of the WNR3 file (codec settings, per-layer hashes) | β | 6,216,021 B | β |
|
| 124 |
| `provenance/q38_experts.wex.verified.pre-wex4` | SHA-256 of the WEX1 copy the Qwen RAW file was upgraded from | β | 123 B | β |
|
| 125 |
| `provenance/v4_flash_experts.nr3.wex.verified.pre-wex4` | build and read-back note of the DeepSeek file | β | 177 B | β |
|
| 126 |
|
|
|
|
| 140 |
| `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `203d55dc96f5c2fe16716cef2c767fa63c387e8cbbbe98991ecd4f7039c7e4b2` | 7,680 records decoded, every hash matches the index; content digest `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` |
|
| 141 |
| `Sage-S2.1-Flash-int4.wex4` | `85246e738032d8734d27575448952f69f49308f8cb5caaba7b281b13ce25bf0d` | `bbfa112154425fb73339ebd1b05d3d53f987b8374a2e5481ba5c1f3e8e3e0747` | a SHA-256 for each of the 62 source files is inside; no full check of this file is on record, so run `wex4_verify` or `unpack` |
|
| 142 |
| `Sage-S2.1-Flash-MXFP4.wex` | none (WEX1) | `cae23f8575f92f29be895ef460caf1d66d764a870389b6a234a1aff876949249` | a local copy was re-hashed against this manifest (header page and table `ef4b66cfcc72f539367eaffc64bbb18ddb442b90ecd06a63a5169bea8596a158`) |
|
| 143 |
+
| `Sage-S2.1-Flash-MXFP4.nr3.wex` | `35de35aa5766e8f4a7e4fa69c695d83d69648b6ceb6a7c4624f4bf20b1a689dd` | `96d9124e3d4fd9fc1b2f3812f39d374e41b21ab91a4381fe7f2f9fe1bfc1436d` | `wex4_verify`: every blob and record matches the index; all 12,096 records decoded and compared byte for byte with the 62 source safetensors files (161.7 GB, 0 failures); every layer's records hash equal to the WEX1 manifest above. The root was read back from the hub after upload |
|
| 144 |
|
| 145 |
The root is the SHA-256 of the first 4,064 bytes of the header page. The record SHA-256 covers the stored bytes, so `wex4_verify` proves the file is intact, not that decoding is exact. The content digest is the SHA-256 over, for each tensor in table order, its name, dtype, shape, size and decoded bytes; it does not cover metadata, blobs or feature bits ([WEX4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WEX4-SPEC.md) section 5). The WNR3 builder decodes every record on the CPU and refuses to write one that does not decode back exactly. A damaged WNR3 record is caught twice: by the stream hashes (0 of 2,231,336 wrong single-bit flips accepted on the GPU, 0 of 3,000 on the CPU, [WNR3-VERIFY](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/reports/WNR3-VERIFY.md)) and by the record's SHA-256 in the index.
|
| 146 |
|
|
|
|
| 152 |
| DeepSeek V4.1 REAP-192, WNR3 with canonical zero, against the raw WEX1 container of the same experts | 123,312,910,336 B | 144,389,472,256 B | **0.854** |
|
| 153 |
| DeepSeek V4.1 REAP-192, WNR3 byte-exact (40 held-out experts, not a full file) | | | about 0.882 |
|
| 154 |
| Sage int4, against its 62 source safetensors files | 187,770,384,384 B | 194,727,333,920 B | 0.964 |
|
| 155 |
+
| Sage MXFP4, WNR3 file against the older WEX1 file of the same experts | 134,545,358,848 B | 161,716,523,008 B | **0.832** |
|
| 156 |
+
| Qwen3.8 RAW and Sage MXFP4 WEX1 | | | 1.000 (not compressed) |
|
| 157 |
|
| 158 |
## Quality of the 4-bit weights (steps taken before the container)
|
| 159 |
|