jon1012 commited on
Commit
ae846b7
·
verified ·
1 Parent(s): f5110b4

Card: verified transcode is bit-exact; credit s-zaizen prior art; Engram is the real differentiator

Browse files
Files changed (1) hide show
  1. README.md +30 -12
README.md CHANGED
@@ -25,9 +25,8 @@ by [LibertAI](https://libertai.io).
25
 
26
  ## ⚠️ Read this first: V4.1-Flash already ships in 4-bit
27
 
28
- If you came here expecting the usual ~70% NVFP4 cut, **it does not exist for this model,
29
- and any repo that claims one is measuring against something other than the released
30
- checkpoint.** DeepSeek quantized V4.1-Flash themselves. From the upstream `config.json`:
31
 
32
  ```json
33
  "quantization_config": {
@@ -70,10 +69,26 @@ so the identity holds for every block whose scale lands in that window — the g
70
  is chosen per tensor to centre it. ⬜ Fraction of blocks outside the window: to be
71
  reported here per tensor (expected 0).
72
 
 
 
 
 
 
73
  **This costs size.** NVFP4 is 4 + 8/16 = 4.5 bits/weight against MXFP4's 4 + 8/32 = 4.25,
74
- so the experts *grow* from 268.9 to ~284.6 GiB. Take this variant only if your engine's
75
- Blackwell MoE kernels want NVFP4 and have no MX path — it is a compatibility shim, not a
76
- compression win, and we would rather say so than let you find out from a disk-full error.
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  ### 2. Engram: FP8 → FP4, the one real size lever ⬜
79
 
@@ -96,12 +111,15 @@ Upstream's own `convert.py` already shards `engram.embed` along dim 0 across ran
96
 
97
  ### Net effect ⬜
98
 
99
- | | as shipped | this repo |
100
- |---|---:|---:|
101
- | routed experts + MTP | 276.3 GiB | ~292 GiB |
102
- | Engram | 189.1 GiB | ~97 GiB |
103
- | everything else | 8.9 GiB | 8.9 GiB |
104
- | **total** | **475.2 GiB** | **~398 GiB** |
 
 
 
105
 
106
  ## Hardware notes ⬜
107
 
 
25
 
26
  ## ⚠️ Read this first: V4.1-Flash already ships in 4-bit
27
 
28
+ If you came here expecting the usual ~70% NVFP4 cut, **it does not exist for this model.**
29
+ DeepSeek quantized V4.1-Flash themselves. From the upstream `config.json`:
 
30
 
31
  ```json
32
  "quantization_config": {
 
69
  is chosen per tensor to centre it. ⬜ Fraction of blocks outside the window: to be
70
  reported here per tensor (expected 0).
71
 
72
+ ✅ Verified on shard 4: 1,152 expert weights transcoded, and an independent
73
+ reconstruction from both representations found **0 mismatches over 2.36 billion elements,
74
+ `max|delta| = 0` exactly**, with **0 of 849,346,560 block scales** falling outside E4M3's
75
+ window.
76
+
77
  **This costs size.** NVFP4 is 4 + 8/16 = 4.5 bits/weight against MXFP4's 4 + 8/32 = 4.25,
78
+ so the experts *grow*: shard 4 went from 7,389,759,032 to 7,814,559,376 bytes, **+5.75%**.
79
+ Take this variant only if your engine's Blackwell MoE kernels want NVFP4 and have no MX
80
+ path — it is a compatibility shim, not a compression win, and we would rather say so than
81
+ let you find out from a disk-full error.
82
+
83
+ To be clear about prior art: this losslessness is not something we invented, it is what
84
+ any careful implementation of this transcode gets, for the structural reason above. We
85
+ checked [`s-zaizen/DeepSeek-V4.1-Flash-NVFP4`](https://huggingface.co/s-zaizen/DeepSeek-V4.1-Flash-NVFP4),
86
+ published the same day, by reconstructing `layers.1.ffn.experts.0.w1` from both their
87
+ checkpoint and the source: **their nibbles are identical and all 11,796,480 elements match
88
+ exactly too.** Their repo is **491.1 GiB — larger than the 475.2 GiB original** — because
89
+ the expert transcode grows the file and the Engram tables are left at FP8. That is the gap
90
+ this repo is trying to close, and it is the only thing that meaningfully separates the
91
+ two.
92
 
93
  ### 2. Engram: FP8 → FP4, the one real size lever ⬜
94
 
 
111
 
112
  ### Net effect ⬜
113
 
114
+ | | upstream | s-zaizen NVFP4 | this repo |
115
+ |---|---:|---:|---:|
116
+ | routed experts + MTP | 276.3 GiB | ~292 GiB | ~292 GiB |
117
+ | Engram | 189.1 GiB | 189.1 GiB | ~97 GiB |
118
+ | everything else | 8.9 GiB | 8.9 GiB | 8.9 GiB |
119
+ | **total** | **475.2 GiB** | **491.1 GiB** ✅ | **~398 GiB** |
120
+
121
+ The Engram column is the whole point. If you need NVFP4 experts and do not care about
122
+ Engram, s-zaizen's repo is a perfectly good checkpoint and was there first.
123
 
124
  ## Hardware notes ⬜
125