Ludovico commited on
Commit
d344b93
·
verified ·
1 Parent(s): d7a368c

Update README and licenses with 6 new verified WEX4/WNR4 models

Browse files
README.md CHANGED
@@ -7,10 +7,12 @@ tags:
7
  - wex4
8
  - wnr3
9
  - wnr4
 
10
  - lossless-compression
11
  - mixture-of-experts
12
  - mxfp4
13
  - nvfp4
 
14
  - int4
15
  - gguf
16
  - expert-weights
@@ -18,17 +20,17 @@ tags:
18
  ---
19
  # WEX4 Expert Containers
20
 
21
- Expert weights of three Mixture-of-Experts AI models (**Qwen3.8-Flash-Next 125B-A6B**, **DeepSeek-V4.1-Flash-1017 REAP-192**, and **NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4**), stored in **WEX4** containers with **RAW**, **WNR3 (codec 5)** and **WNR4 (codec 8: MX, NV, I4, GG)** lossless compression.
22
 
23
- **Storing the weights in these files does not change the value of any weight. It is not a quantization.** WEX4 is the file layout. WNR3 and WNR4 are optional lossless codecs inside it, like ZIP. Unpacking gives back the same weights: the very same bytes for Qwen3.8-Flash-Next (MXFP4, INT4-g64, GSQ-IQ1_M), and the very same numbers for DeepSeek-V4.1-Flash-1017 REAP-192 (a zero written as "-0" comes back written as "+0"; same number, explained below).
24
 
25
- The weights are 4-bit (or 2-bit for the GSQ-IQ1_M GGUF), and making them 4-bit/2-bit did lose some precision. That happened *before* the weights reached these files: AMD did it for Qwen3.8 MXFP4, and DeepSeek did it for its own model. The table below says who did what.
26
 
27
  ## In plain words
28
 
29
- **What is in these files.** A Mixture-of-Experts model is split into hundreds of small blocks of weights called *experts*, and only a few of them work on each word. When a model is too big for a computer's memory, a program keeps some experts in memory and reads the others from the SSD the moment they are needed. These files hold those experts, laid out so that each one comes off the disk in a single read (except the GSQ-IQ1_M WNR4-GG file, which packs both GGUF shards of the full model).
30
 
31
- **Think of a ZIP file.** When you zip a document and unzip it later, you get the same document back, every letter in place; the ZIP was only a smaller way to keep it. WNR3 and WNR4 do that for expert weights. Files with `.nr3` or `.wnr4` in their name use them and are 12-22% smaller. The RAW files are not compressed: they hold the weights' original bytes, one expert per slot.
32
 
33
  **Where precision was lost: before these files.** To *quantize* is to round numbers to fewer bits so that they take less space; the rounding cannot be undone. Turning a model's original 16-bit or 8-bit weights into 4-bit or 2-bit numbers is a quantization, and it does lose some precision. That step happened before the weights reached these files.
34
 
@@ -41,27 +43,33 @@ The weights are 4-bit (or 2-bit for the GSQ-IQ1_M GGUF), and making them 4-bit/2
41
  | `qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | 2-bit GGUF quantization (`Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M`, 2 shards) | **WNR4-GG (codec 8, kind 2)**: full packed WEX4 container of both GGUF shards (`Q2_0`/`IQ4_NL` expert slices coded, other slices verbatim), lossless |
42
  | `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 | WNR3-CZ (codec 5): compressed to 85.4% of the size. Every weight is the same number (canonical zero: -0 → +0) |
43
  | `v41-reap/v4_flash_experts.wnr4.wex` | the same DeepSeek-V4.1-Flash-1017 REAP-192 MXFP4 weights | **WNR4-MX (codec 8, kind 0)**: 32-lane GPU-parallel rANS tiles (188 GB/s kernel decode on RTX 5090), compressed to **85.1%** (122.87 GB, -21.52 GB vs safetensors). Value-exact (canonical zero) |
 
44
  | `nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex` | NVIDIA published [NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4) with 4-bit NVFP4 LatentMoE routed experts (40 MoE layers × 512 experts, per-16 E4M3 scales + F32 `weight_scale_2`) | **WNR4-NV (codec 8, kind 1, `pb=5`, `G=64`)**: compressed to **91.37%** (57.98 GB / 54.00 GiB vs 63.42 GB raw, -5.44 GB). Includes all 40,960 `weight_scale_2` scalars in the final RAW record. Verified **20,480/20,480 byte-exact** |
 
 
 
 
 
45
 
46
  ## Is this a quantization? No.
47
 
48
- **Does WEX4 or WNR3 reduce the precision of the weights?**
49
- No. Quantization rounds every weight to a number with fewer bits, so the numbers change. WEX4 and WNR3 round nothing: unpack a stored expert and you have the weights that were put in.
50
 
51
- **Then why is a WNR3 file smaller?**
52
- For the same reason a ZIP is smaller. In real weights some 4-bit values occur much more often than others. WNR3 gives the common values short codes and the rare values long codes. It uses a table that says how common each value usually is; if the table guesses wrong, the file only gets bigger, never different. Nothing is generated or predicted by an AI: it is plain arithmetic, and a stored expert that would not get smaller is kept uncompressed.
53
 
54
  **So why does it say "MXFP4" and "4-bit" everywhere?**
55
- Because the weights were already 4-bit when we got them (Qwen3.8 MXFP4, DeepSeek V4.1). We keep them exactly in that form.
56
 
57
  **Is anything lossy, then?**
58
- Yes, the steps in the table, all of them before our files: DeepSeek's own 4-bit release, AMD's 4-bit rounding of Qwen3.8-Flash-Next, and the REAP pruning of DeepSeek. Nothing is lossy in the WEX4 layout or in the WNR3/WNR4 compression.
59
 
60
- **What does "value-exact" mean for the DeepSeek file?**
61
- In 4-bit floating point, zero can be written two ways, +0 and -0, and both are the same number. It is like writing 0 or -0 on paper: the amount is the same. To save space (85% of the size instead of about 88%), WNR3 writes every -0 as +0. Every weight unpacks to the same number; only the way some zeros are written differs from the source files. We ran the model from this file and from a byte-exact copy: its output scores were identical to the last bit on 7 short prompts (64 tokens each), and a long 1,886-token conversation turn produced the same text ([report](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/reports/WNR3-PRODUCTION-20261110.md)). The two Qwen files are byte-exact.
62
 
63
- **Why are there two files of the same Qwen experts?**
64
- The compressed file is 7.7 GB smaller, but unpacking costs computer work. On the test machine (one run per case, RTX 5090, earlier copies of the same records) that work made generation 19-29% slower, for example 9.48 instead of 11.48 tokens per second ([report](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/reports/QWEN38-MXFP4-20261111.md)). The program gets the same bytes from either file.
65
 
66
  ## The words, one sentence each
67
 
@@ -90,21 +98,20 @@ sha256sum q38_experts.nr3.wex # must equal the SHA-256 that Hugging Face lis
90
  ```sh
91
  git clone https://github.com/KairaCode/Wex-WRN2 && cd Wex-WRN2
92
  gcc -O2 -fopenmp c/tools/wex4_verify.c -o wex4_verify
93
- ./wex4_verify v4_flash_experts.nr3.wex # about 150 s from an NVMe SSD, 260 s from a SATA SSD (8 threads, i7-7700K)
94
  ```
95
 
96
- **3. Does unpacking give exactly the same weights?** `wex4.py verify` unpacks every record and prints the content digest. Needs Python 3 and the helper library that `check_all.sh` builds (it is named `.dll` on every system):
97
 
98
  ```sh
99
  bash scripts/check_all.sh
100
- python -I wex4/wex4.py verify q38_experts.wex --dll wex4/out/wex4_tools.dll
101
- python -I wex4/wex4.py verify q38_experts.nr3.wex --dll wex4/out/wex4_tools.dll
 
 
 
102
  ```
103
 
104
- For the two Qwen files: if both print the same content digest, `0d752bbf2d169b611ac79b005f07d0b9152c0591b23b65cbd12e06ea8300ec77` for the uncompressed file, then every expert of the compressed file unpacked to exactly the same bytes. The DeepSeek file has no uncompressed twin here; its content digest when we checked it was `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512`.
105
-
106
- **What you cannot check yet.** No published command compares these files with the original upstream downloads (AMD's Qwen files, the REAP-192 files). The checks above prove that the files are intact and that unpacking is exact; the link to the upstream files rests on the build-time checks described in the Integrity section.
107
-
108
  ---
109
 
110
  The rest of this card is technical detail.
@@ -120,15 +127,21 @@ The rest of this card is technical detail.
120
  | `qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | Qwen3.8-Flash-Next GSQ-RCO-IQ1_M (2-shard GGUF, full model); WEX4, **WNR4-GG (codec 8, kind 2)**, byte-exact | 13,809 (37,944 tensors) | 57,821,315,072 B (57.82 GB) | [Qwen Community License 1.0](https://huggingface.co/Qwen/Qwen3.8-Flash-Next/blob/main/LICENSE) |
121
  | `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek-V4.1-Flash-1017 REAP-192 routed experts, MXFP4; WEX4, WNR3-CZ (codec 5, value-exact) | 7,680 (40 × 192) | 123,312,910,336 B (123.31 GB) | [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE) |
122
  | `v41-reap/v4_flash_experts.wnr4.wex` | the same DeepSeek-V4.1-Flash-1017 REAP-192 experts; WEX4, **WNR4-MX (codec 8, kind 0, value-exact)** | 7,680 (40 × 192) | 122,872,295,424 B (122.87 GB) | [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE) |
 
123
  | `nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex` | NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 LatentMoE routed experts + `weight_scale_2`; WEX4, **WNR4-NV (codec 8, kind 1, byte-exact)** | 20,481 (40 × 512 + 1 scale2 RAW) | 57,976,958,976 B (57.98 GB / 54.00 GiB) | [NVIDIA Open Model License](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4/blob/main/LICENSE) |
 
 
 
 
 
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
 
127
- The GSQ-IQ1_M WNR4-GG file holds both GGUF shards of the full model. The other files hold routed experts only: a runtime takes the rest of the model (dense weights, attention, engram, head, tokenizer) from the original checkpoint. None of them loads with `transformers.from_pretrained()`.
128
 
129
- WEX4 and WNR3 are separate layers:
130
 
131
- - **WEX4** is the container: one record per expert (or per tensor group), 4096-byte aligned so that an expert is one aligned read; a self-describing tensor index; a SHA-256 of the stored bytes of every record and blob; and a root, the SHA-256 of the header page, that names the whole file. WEX4 does not compress, except with the optional WBP1 codec, which is lossless byte-plane rANS for BF16, FP8, F32 and integer tensors.
132
  - **WNR3 (codec 5)** is a lossless codec for MXFP4 expert records (FP4 E2M1 weights and E8M0 scales): context-modelled rANS entropy coding with a 59,408-byte table of value statistics (the WNM2 model, a count table, not a neural network) stored once in the file, a 23-bit hash in every stream, and a CPU decoder and an NVIDIA GPU decoder. With *canonical zero* it stores FP4 -0 as +0 (value-exact); without it, it is byte-exact.
133
  - **WNR4 (codec 8)** is the GPU-parallel successor of WNR3 ([WNR4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR4-SPEC.md)): tiles of 32 rANS lanes sharing one 16-bit word stream decoded by one GPU warp (up to **209 GB/s** kernel decode on RTX 5090, 0.19 ms single-record latency at G = 32), with a 32-bit hash per tile and a WNM4 model blob (kind 3). It supports four kinds: **MX** (kind 0, MXFP4), **NV** (kind 1, NVFP4), **GG** (kind 2, GGUF `Q2_0`/`IQ4_NL` slices), and **I4** (kind 3, int4-g64 experts with FP8 block-scaled lattice scales).
134
 
@@ -137,15 +150,21 @@ WEX4 and WNR3 are separate layers:
137
  | File | WEX4 root (`COLI_WEX_ROOT`) | SHA-256 of the whole file (as listed by Hugging Face) | Checked |
138
  |---|---|---|---|
139
  | `q38_experts.wex` | `db5389f699abb49a164a9e73d925b5b629b0ce6de430a553388ba3e1cae5c0df` | `9f6caa9a1e4e5ffe300108d3865ad0c4a246862c86ddaea2d3ee56b37e286bbf` | 24,576 records, every hash matches the index; content digest `0d752bbf2d169b611ac79b005f07d0b9152c0591b23b65cbd12e06ea8300ec77`. Against AMD's tensors: all 512 records of layers 0 and 47, and the first and last record of every layer, byte-identical when the file was built |
140
- | `q38_experts.nr3.wex` | `7d78e6ccfb8dee558a08371da86d275d53b7356d255d25ae4cac831dabd3e7f9` | `abddc4243b56a109d74973cee324b19296db0cf5b996f2e8a5585b798e29255b` | at build time, layers 0, 10, 23 and 47 decoded on the GPU and compared with the RAW records. An archive copy was later found damaged (11,666 records zeroed, old root `cd47fa8b…`, not valid) and was repaired; on 2026-11-20 the repaired local copy passed a full check and all 48 layers decoded equal to the RAW file. The upload itself was not re-verified (only its SHA-256 is known) |
141
  | `q38_experts.wnr4.wex` | `68745b781dd947e57c4cacabe2c87e21bfa606559320cf3486ba87ee051d87b9` | `81ea4790fca378a40fff23d212e86df1c32ef6c62ce5fa2c4d4fea336314ae92` | 24,576 WNR4-MX records (48 × 512), header & root verified |
142
  | `qwen38_flash_next_int4g64.wnr4i4.wex` | `6545bff2dd755ed1660a18feff75406829dc9b25b1bed2f4f6a0ee2532b1098f` | `9116ed1e15cf8e641a5f582eafaff2e350d3003400b59e0c66cc4d83dcd874e7` | 24,576 WNR4-I4 records verified 24,576/24,576 byte-exact against RAW (`wex4/wnr4i4.py verify --source`) |
143
  | `qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | `fbc259fdc37a672b039276d167cd84376422514fa4d192776852b94b6911ef12` | `df943c94067445cb59f6979a27dfef001f89f7edf9497597317e4ffff5e388a3` | 13,809 records (2-shard full GGUF packed with `wex4/wnr4gg.py`), header & root verified |
144
  | `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `203d55dc96f5c2fe16716cef2c767fa63c387e8cbbbe98991ecd4f7039c7e4b2` | 7,680 records decoded, every hash matches the index; content digest `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` |
145
  | `v4_flash_experts.wnr4.wex` | `75520a3b0a52f161a02cafebc94d57e58ef2c4ccfbff5b4ba637cc3d66252e30` | `bebd6fd2171514c5158dd629a4225350ac922e9accae9c23fff177cf9e4543b1` | 7,680 WNR4-MX records (40 × 192), header & root verified |
 
146
  | `nemotron35_super_vl_nvfp4.wnr4nv.wex` | `d5c8cb449797d8385aba3ad03202fad9fa623af12c7175b2cb2e87861c7df9c5` | `1d9a8d5733b35f5a6a90a6b398b088d6fe5fdc5ee1e6259b2c7385af6cc44b3b` | 20,480 WNR4-NV records (40 × 512) + 1 RAW `weight_scale_2` record (40,960 scalars); verified **20,480/20,480 byte-exact** round-trip + `wex4.Reader` validated |
 
 
 
 
 
147
 
148
- 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.
149
 
150
  ## Size
151
 
@@ -157,9 +176,14 @@ The root is the SHA-256 of the first 4,064 bytes of the header page. The record
157
  | Qwen3.8-Flash-Next GSQ-RCO-IQ1_M (full 2-shard GGUF), **WNR4-GG** | 57,821,315,072 B | 58,397,560,320 B | **0.990** |
158
  | DeepSeek-V4.1-Flash-1017 REAP-192, WNR3-CZ against raw WEX1 | 123,312,910,336 B | 144,389,472,256 B | **0.854** |
159
  | DeepSeek-V4.1-Flash-1017 REAP-192, **WNR4-MX (CZ)** against raw | 122,872,295,424 B | 144,388,915,200 B | **0.851** |
 
160
  | NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4, **WNR4-NV** against raw NVFP4 | 57,976,958,976 B | 63,417,876,480 B | **0.914** |
161
- | DeepSeek-V4.1-Flash-1017 REAP-192, WNR3 byte-exact (40 held-out experts, not a full file) | | | about 0.882 |
162
- | Qwen3.8-Flash-Next RAW | | | 1.000 (not compressed) |
 
 
 
 
163
 
164
  ## Quality of the 4-bit weights (steps taken before the container)
165
 
@@ -170,30 +194,15 @@ The container adds no error, so these are the only quality questions, and they b
170
 
171
  ## Use with colibri
172
 
173
- The WEX4 series for colibri lives on the fork [KairaCode/colibri](https://github.com/KairaCode/colibri) (`main`) and is proposed upstream in [JustVugg/colibri#2920](https://github.com/JustVugg/colibri/pull/2920). Everything is opt-in: with `COLI_WEX_PATH` unset an engine behaves as before.
174
 
175
  ```sh
176
- # DeepSeek V4.1: trunk from the original checkpoint, routed experts from the container
177
- export COLI_WEX_PATH=/models/v4_flash_experts.nr3.wex
178
- export COLI_WEX_ROOT=f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1 # refuse any other file
179
- export COLI_WEX_CUDA_LIB=/path/to/kaira_wex_cuda.so # optional: decode WNR3 on an NVIDIA GPU (make wex-cuda-helper)
180
  ```
181
 
182
- WNR3 records decode on the CPU (a fast AVX2/NEON decoder, `COLI_WEX_FAST_DECODE`, on by default) or, when `COLI_WEX_CUDA_LIB` names the helper, on the GPU. `COLI_WEX_VERIFY` (on when a root is pinned) checks each record's SHA-256 the first time it is read.
183
-
184
- Measured with `deepseek_v41` on one desktop (i7-7700K 4C/8T, 32 GB RAM, RTX 3070 8 GB, Windows 10), the DeepSeek file on NVMe, trunk from the shards on a SATA SSD, 8 expert slots, prompt "The three primary colors of light are", 8 greedy tokens: **the same tokens in every arm**.
185
-
186
- | Arm | 8 tokens | tok/s |
187
- |---|---:|---:|
188
- | shards only (no container) | 62.5-91.6 s | 0.09-0.13 |
189
- | container, fast CPU decoder | 71.1 s | 0.11 |
190
- | container, CUDA helper on the RTX 3070 | 35.2 s | 0.23 |
191
-
192
- One DeepSeek record decodes in about 101 ms on one CPU thread with the fast decoder (742 ms with the reference decoder) and in about 6 ms on the RTX 3070.
193
-
194
- **Help wanted:** runs on other machines (ARM, Apple silicon, other GPUs, 16 GB RAM, two NVMe drives) with the one-command bench `c/tools/wex_bench.py`: the list and how to report are in [KairaCode/colibri#1](https://github.com/KairaCode/colibri/issues/1).
195
-
196
-
197
  ## Quick Start: DeepSeek-V4.1-Flash REAP-192 + WNR4-MX
198
 
199
  To run **DeepSeek-V4.1-Flash-1017 REAP-192** with the WNR4-MX expert container (`v41-reap/v4_flash_experts.wnr4.wex`, 122.87 GB) and learned prefetch gates (`v41-reap/v41_pred_gates.bin`, 151 MB):
@@ -240,12 +249,17 @@ $env:V41_ATTN_GPU = "1"
240
  ## Download
241
 
242
  ```sh
243
- hf download Kaira666/Kaira-WEX4-Experts v41-reap/v4_flash_experts.wnr4.wex --local-dir WEX4-Experts # DeepSeek V4.1 REAP-192 WNR4-MX (122.87 GB)
244
- hf download Kaira666/Kaira-WEX4-Experts qwen38-mxfp4/q38_experts.wnr4.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next MXFP4 WNR4-MX (56.85 GB)
245
- hf download Kaira666/Kaira-WEX4-Experts qwen38-int4g64/qwen38_flash_next_int4g64.wnr4i4.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next INT4-g64 WNR4-I4 (53.29 GB)
246
- hf download Kaira666/Kaira-WEX4-Experts qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next GSQ-IQ1_M WNR4-GG (57.82 GB)
247
- hf download Kaira666/Kaira-WEX4-Experts v41-reap/v4_flash_experts.nr3.wex --local-dir WEX4-Experts # DeepSeek V4.1 REAP-192 WNR3-CZ (123.31 GB)
248
- hf download Kaira666/Kaira-WEX4-Experts nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex --local-dir WEX4-Experts # Nemotron-3.5-Super-VL-120B NVFP4 WNR4-NV (57.98 GB)
 
 
 
 
 
249
  ```
250
 
251
  ## Source and specifications
@@ -254,15 +268,19 @@ The format, the codecs, the specifications, conformance vectors, four independen
254
 
255
  - [WEX4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WEX4-SPEC.md), [WNR3-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR3-SPEC.md), and [WNR4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR4-SPEC.md)
256
  - [Colibri integration guide](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/COLIBRI-INTEGRATION.md)
257
- - `wex4/wex4_convert.py`, `wex4/wnr4gg.py`, `wex4/wnr4i4.py`: pack, verify and unpack WEX4 containers (RAW, WNR3, WNR4-GG, WNR4-I4)
258
 
259
  ## Licenses
260
 
261
  The files here carry different terms, so no single license is asserted for the repository:
262
 
263
  - Qwen3.8-Flash-Next expert weights (MXFP4, INT4-g64, GSQ-IQ1_M): [Qwen Community License 1.0](https://huggingface.co/Qwen/Qwen3.8-Flash-Next/blob/main/LICENSE), the license of the base model and of AMD's release.
264
- - DeepSeek-V4.1-Flash-1017 REAP-192 expert weights: [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE), Copyright (c) 2023 DeepSeek; the REAP-192 release is MIT too.
265
  - NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 expert weights: [NVIDIA Open Model License](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4/blob/main/LICENSE).
 
 
 
 
266
  - The WEX format, codecs, specifications and tools (not stored here): [Apache-2.0](https://github.com/KairaCode/Wex-WRN2/blob/main/LICENSE).
267
 
268
  The license texts are in [`licenses/`](licenses/NOTICE.md), copied unchanged from the upstream repositories.
 
7
  - wex4
8
  - wnr3
9
  - wnr4
10
+ - wbp1
11
  - lossless-compression
12
  - mixture-of-experts
13
  - mxfp4
14
  - nvfp4
15
+ - mxfp8
16
  - int4
17
  - gguf
18
  - expert-weights
 
20
  ---
21
  # WEX4 Expert Containers
22
 
23
+ Expert weights (and lossless packed GGUF containers) of **8 Mixture-of-Experts AI models** (**Qwen3.8-Flash-Next 125B-A6B**, **DeepSeek-V4.1-Flash-1017 REAP-192**, **DeepSeek-V4-Flash-0731**, **NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4**, **Cyber-Tiel-Coder-35B-A3B-MTP**, **LFM2.5-24B-A2B**, **Inkling-2-Mini**, and **Mellum2.1-12B-A2.5B-Thinking**), stored in **WEX4** containers with **RAW**, **WBP1 (codec 6)**, **WNR3 (codec 5)** and **WNR4 (codec 8: MX, NV, I4, GG)** lossless compression.
24
 
25
+ **Storing the weights in these files does not change the value of any weight. It is not a quantization.** WEX4 is the file layout. WNR3, WNR4 and WBP1 are optional lossless codecs inside it, like ZIP. Unpacking gives back the same weights: the very same bytes for Qwen3.8-Flash-Next (MXFP4, INT4-g64, GSQ-IQ1_M), Nemotron-3.5-Super-VL, Inkling-2-Mini (NVFP4/MXFP8 and INT4-g64), Cyber-Tiel-Coder-35B-A3B-MTP, LFM2.5-24B-A2B, and Mellum2.1-12B-A2.5B-Thinking, and the very same numbers for DeepSeek-V4.1-Flash-1017 REAP-192 and DeepSeek-V4-Flash-0731 (a zero written as "-0" comes back written as "+0"; same number, explained below).
26
 
27
+ The weights are 4-bit (or 2-bit/6-bit for the GGUFs, and mixed NVFP4+MXFP8 for Inkling-2-Mini), and making them 4-bit/2-bit did lose some precision. That happened *before* the weights reached these files: AMD did it for Qwen3.8 MXFP4, DeepSeek did it for V4/V4.1, NVIDIA for Nemotron, Thinking Machines for Inkling-2-Mini, and the respective GGUF publishers for the GGUF quants. The table below says who did what.
28
 
29
  ## In plain words
30
 
31
+ **What is in these files.** A Mixture-of-Experts model is split into hundreds of small blocks of weights called *experts*, and only a few of them work on each word. When a model is too big for a computer's memory, a program keeps some experts in memory and reads the others from the SSD the moment they are needed. These files hold those experts, laid out so that each one comes off the disk in a single read (full-model GGUF containers `qwen38_flash_next_gsq_iq1m.wnr4gg.wex`, `lfm25_24b_a2b_q4kxl.wex4`, and `mellum21_12b_a25b_q6k.wex4` pack the entire GGUF losslessly so `gguf2wex4.py unpack` rebuilds the exact original GGUF file).
32
 
33
+ **Think of a ZIP file.** When you zip a document and unzip it later, you get the same document back, every letter in place; the ZIP was only a smaller way to keep it. WNR3, WNR4 and WBP1 do that for expert weights. Files with `.nr3` or `.wnr4` in their name use them and are 9-22% smaller. The RAW files are not compressed: they hold the weights' original bytes, one expert per slot.
34
 
35
  **Where precision was lost: before these files.** To *quantize* is to round numbers to fewer bits so that they take less space; the rounding cannot be undone. Turning a model's original 16-bit or 8-bit weights into 4-bit or 2-bit numbers is a quantization, and it does lose some precision. That step happened before the weights reached these files.
36
 
 
43
  | `qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | 2-bit GGUF quantization (`Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M`, 2 shards) | **WNR4-GG (codec 8, kind 2)**: full packed WEX4 container of both GGUF shards (`Q2_0`/`IQ4_NL` expert slices coded, other slices verbatim), lossless |
44
  | `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 | WNR3-CZ (codec 5): compressed to 85.4% of the size. Every weight is the same number (canonical zero: -0 → +0) |
45
  | `v41-reap/v4_flash_experts.wnr4.wex` | the same DeepSeek-V4.1-Flash-1017 REAP-192 MXFP4 weights | **WNR4-MX (codec 8, kind 0)**: 32-lane GPU-parallel rANS tiles (188 GB/s kernel decode on RTX 5090), compressed to **85.1%** (122.87 GB, -21.52 GB vs safetensors). Value-exact (canonical zero) |
46
+ | `deepseek-v4-flash-0731/v4_flash_0731_experts.wnr4.wex` | DeepSeek published [DeepSeek-V4-Flash-0731](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731) with all 43 backbone layers × 256 routed experts (11,008 unpruned experts) natively in 4-bit MXFP4 (`F8_E8M0` scales + `I8` weights) | **WNR4-MX (codec 8, kind 0, `pb=5`, `G=32`, CZ)**: compressed to **83.7%** (123.12 GB vs 147.17 GB raw, **-24.05 GB**). Value-exact (canonical zero), verified **11,008/11,008** decoded via `wex4_tools.dll` + `wex4_verify` |
47
  | `nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex` | NVIDIA published [NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4) with 4-bit NVFP4 LatentMoE routed experts (40 MoE layers × 512 experts, per-16 E4M3 scales + F32 `weight_scale_2`) | **WNR4-NV (codec 8, kind 1, `pb=5`, `G=64`)**: compressed to **91.37%** (57.98 GB / 54.00 GiB vs 63.42 GB raw, -5.44 GB). Includes all 40,960 `weight_scale_2` scalars in the final RAW record. Verified **20,480/20,480 byte-exact** |
48
+ | `inkling-2-mini/inkling2_mini_nvfp4.wnr4nv.wex` | Thinking Machines published [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (26.4B-A3.4B looped multimodal MoE) with mixed precision routed experts: layers 0–19 in NVFP4 (`20 × 128`) and layers 20–23 in MXFP8 (`4 × 128`) | **WNR4-NV + WBP1 (codec 8 kind 1 `pb=5 G=64` + codec 6)**: compressed to **89.6%** (14.05 GB vs 15.68 GB raw, **-1.63 GB**). Includes all 80 F32 `amax`/`outer_scale_denominator` tensors in the final RAW record. Verified **3,073/3,073 byte-exact** via `wex4.py verify --dll wex4_tools.dll` |
49
+ | `inkling-2-mini/inkling2_mini_int4g64.wnr4i4.wex` | INT4-g64 export of Inkling-2-Mini routed experts across all 24 layers (`24 × 128`, planar 4-bit codes + per-64 F32 scales) | **WNR4-I4 (codec 8, kind 3, planar, `G=32`)**: compressed to **88.0%** (12.11 GB vs 13.77 GB raw, **-1.66 GB**). Verified **3,072/3,072 byte-exact** via `wnr4i4.py verify` + `wex4_verify` |
50
+ | `cyber-tiel-coder-35b-a3b/cyber_tiel_coder_35b_a3b_mtp.wex4` | `UD-Q4_K_XL` GGUF quantization ([peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP](https://huggingface.co/peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP), Qwen3.5-MoE `41L × 256E` with MTP) | **WEX4 RAW experts container** (`20.03 GB`, 10,496 aligned expert records + GGUF header blob for Colibri `qwen36` `Q36_WEX4`). Byte-exact, verified via `wex4_verify` |
51
+ | `lfm2.5-24b-a2b/lfm25_24b_a2b_q4kxl.wex4` | `UD-Q4_K_XL` GGUF quantization of [LiquidAI/LFM2.5-24B-A2B-Base](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B-Base) (`38` MoE layers × `64` experts) | **Full lossless GGUF WEX4** (`14.88 GB`, 2,750 records, `gguf2wex4.py pack`). Verified byte-exact (`gguf2wex4.py unpack --check` rebuilds the exact original GGUF SHA-256) + `wex4_verify` |
52
+ | `mellum-2.1-12b-a2.5b/mellum21_12b_a25b_q6k.wex4` | `Q6_K` GGUF quantization of [JetBrains/Mellum2.1-12B-A2.5B-Thinking](https://huggingface.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking) (`28` MoE layers × `64` experts) | **Full lossless GGUF WEX4** (`10.89 GB`, 2,051 records, `gguf2wex4.py pack`). Verified byte-exact (`gguf2wex4.py unpack --check` rebuilds the exact original GGUF SHA-256) + `wex4_verify` |
53
 
54
  ## Is this a quantization? No.
55
 
56
+ **Does WEX4 or WNR3/WNR4 reduce the precision of the weights?**
57
+ No. Quantization rounds every weight to a number with fewer bits, so the numbers change. WEX4, WBP1, WNR3 and WNR4 round nothing: unpack a stored expert and you have the weights that were put in.
58
 
59
+ **Then why is a WNR3/WNR4 file smaller?**
60
+ For the same reason a ZIP is smaller. In real weights some 4-bit values occur much more often than others. WNR3/WNR4 gives the common values short codes and the rare values long codes. It uses a table that says how common each value usually is; if the table guesses wrong, the file only gets bigger, never different. Nothing is generated or predicted by an AI: it is plain arithmetic, and a stored expert that would not get smaller is kept uncompressed.
61
 
62
  **So why does it say "MXFP4" and "4-bit" everywhere?**
63
+ Because the weights were already 4-bit when we got them (Qwen3.8 MXFP4, DeepSeek V4/V4.1, Nemotron NVFP4, Inkling-2-Mini). We keep them exactly in that form.
64
 
65
  **Is anything lossy, then?**
66
+ Yes, the steps in the table, all of them before our files: DeepSeek's own 4-bit release, AMD's 4-bit rounding of Qwen3.8-Flash-Next, the REAP pruning of DeepSeek V4.1, and the upstream GGUF/INT4 quantizations. Nothing is lossy in the WEX4 layout or in the WBP1/WNR3/WNR4 compression.
67
 
68
+ **What does "value-exact" mean for the DeepSeek files?**
69
+ In 4-bit floating point, zero can be written two ways, +0 and -0, and both are the same number. It is like writing 0 or -0 on paper: the amount is the same. To save space (83.7–85.4% of the size instead of about 88%), WNR3/WNR4-MX CZ writes every -0 as +0. Every weight unpacks to the same number; only the way some zeros are written differs from the source files. We ran the model from this file and from a byte-exact copy: its output scores were identical to the last bit on 7 short prompts (64 tokens each), and a long 1,886-token conversation turn produced the same text ([report](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/reports/WNR3-PRODUCTION-20261110.md)). All non-CZ files are byte-exact.
70
 
71
+ **Why are there multiple files of the same Qwen / Inkling experts?**
72
+ Each format matches a different precision or runtime trade-off (RAW for zero decode CPU/GPU overhead, WNR3 for legacy codec-5 readers, WNR4-MX/NV/I4 for high-bandwidth RTX GPU warp decode with 10–22% smaller disk & PCIe footprint).
73
 
74
  ## The words, one sentence each
75
 
 
98
  ```sh
99
  git clone https://github.com/KairaCode/Wex-WRN2 && cd Wex-WRN2
100
  gcc -O2 -fopenmp c/tools/wex4_verify.c -o wex4_verify
101
+ ./wex4_verify v4_flash_0731_experts.wnr4.wex
102
  ```
103
 
104
+ **3. Does unpacking give exactly the same weights?** `wex4.py verify` (for RAW/WBP1/WNR3/WNR4-MX/WNR4-NV), `wnr4i4.py verify` (for WNR4-I4), and `gguf2wex4.py unpack --check` (for full GGUF containers) unpack every record and verify every byte:
105
 
106
  ```sh
107
  bash scripts/check_all.sh
108
+ python -I wex4/wex4.py verify q38_experts.wex --dll wex4/out/wex4_tools.dll
109
+ python -I wex4/wex4.py verify inkling2_mini_nvfp4.wnr4nv.wex --dll wex4/out/wex4_tools.dll
110
+ python -I wex4/wnr4i4.py verify inkling2_mini_int4g64.wnr4i4.wex --dll out/wnr4i4-test/wnr4_i4_tools.dll
111
+ python -I wex4/gguf2wex4.py unpack lfm25_24b_a2b_q4kxl.wex4 --check
112
+ python -I wex4/gguf2wex4.py unpack mellum21_12b_a25b_q6k.wex4 --check
113
  ```
114
 
 
 
 
 
115
  ---
116
 
117
  The rest of this card is technical detail.
 
127
  | `qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | Qwen3.8-Flash-Next GSQ-RCO-IQ1_M (2-shard GGUF, full model); WEX4, **WNR4-GG (codec 8, kind 2)**, byte-exact | 13,809 (37,944 tensors) | 57,821,315,072 B (57.82 GB) | [Qwen Community License 1.0](https://huggingface.co/Qwen/Qwen3.8-Flash-Next/blob/main/LICENSE) |
128
  | `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek-V4.1-Flash-1017 REAP-192 routed experts, MXFP4; WEX4, WNR3-CZ (codec 5, value-exact) | 7,680 (40 × 192) | 123,312,910,336 B (123.31 GB) | [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE) |
129
  | `v41-reap/v4_flash_experts.wnr4.wex` | the same DeepSeek-V4.1-Flash-1017 REAP-192 experts; WEX4, **WNR4-MX (codec 8, kind 0, value-exact)** | 7,680 (40 × 192) | 122,872,295,424 B (122.87 GB) | [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE) |
130
+ | `deepseek-v4-flash-0731/v4_flash_0731_experts.wnr4.wex` | DeepSeek-V4-Flash-0731 full unpruned routed experts, MXFP4; WEX4, **WNR4-MX (codec 8, kind 0, `pb=5`, `G=32`, CZ value-exact)** | 11,008 (43 × 256) | 123,115,499,520 B (123.12 GB) | [MIT](licenses/DeepSeek-V4-Flash-0731-LICENSE.txt) |
131
  | `nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex` | NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 LatentMoE routed experts + `weight_scale_2`; WEX4, **WNR4-NV (codec 8, kind 1, byte-exact)** | 20,481 (40 × 512 + 1 scale2 RAW) | 57,976,958,976 B (57.98 GB / 54.00 GiB) | [NVIDIA Open Model License](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4/blob/main/LICENSE) |
132
+ | `inkling-2-mini/inkling2_mini_nvfp4.wnr4nv.wex` | Inkling-2-Mini (26.4B-A3.4B) routed experts: L0–19 NVFP4 + L20–23 MXFP8 + L0–19 F32 scalars; WEX4, **WNR4-NV (codec 8, kind 1) + WBP1 (codec 6)**, byte-exact | 3,073 (20×128 NV + 4×128 MXFP8 + 1 RAW) | 14,048,350,208 B (14.05 GB) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) |
133
+ | `inkling-2-mini/inkling2_mini_int4g64.wnr4i4.wex` | Inkling-2-Mini (26.4B-A3.4B) routed experts, INT4-g64 planar; WEX4, **WNR4-I4 (codec 8, kind 3)**, byte-exact | 3,072 (24 × 128) | 12,109,963,264 B (12.11 GB) | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) |
134
+ | `cyber-tiel-coder-35b-a3b/cyber_tiel_coder_35b_a3b_mtp.wex4` | Cyber-Tiel-Coder-35B-A3B-MTP `UD-Q4_K_XL` (Qwen3.5-MoE) routed experts + GGUF header blob; WEX4, RAW, byte-exact | 10,496 (41 × 256) | 20,033,175,552 B (20.03 GB) | [MIT](https://huggingface.co/ornith-ai/Ornith-1.5-35B-A3B) |
135
+ | `lfm2.5-24b-a2b/lfm25_24b_a2b_q4kxl.wex4` | LFM2.5-24B-A2B `UD-Q4_K_XL` (full GGUF packed with `gguf2wex4.py`); WEX4, RAW, byte-exact | 2,750 (38 expert layers, 7,610 tensors) | 14,878,310,400 B (14.88 GB) | [LFM Open License 1.0](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B-Base) |
136
+ | `mellum-2.1-12b-a2.5b/mellum21_12b_a25b_q6k.wex4` | Mellum2.1-12B-A2.5B-Thinking `Q6_K` (full GGUF packed with `gguf2wex4.py`); WEX4, RAW, byte-exact | 2,051 (28 expert layers, 5,631 tensors) | 10,885,849,088 B (10.89 GB) | [Apache-2.0](https://huggingface.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking) |
137
  | `provenance/q38_experts.wex.verified.pre-wex4` | SHA-256 of the WEX1 copy the Qwen RAW file was upgraded from | — | 123 B | — |
138
  | `provenance/v4_flash_experts.nr3.wex.verified.pre-wex4` | build and read-back note of the DeepSeek file | — | 177 B | — |
139
 
140
+ The full-model GGUF containers (`qwen38_flash_next_gsq_iq1m.wnr4gg.wex`, `lfm25_24b_a2b_q4kxl.wex4`, `mellum21_12b_a25b_q6k.wex4`) hold the complete GGUF file(s). The other files hold routed experts only: a runtime takes the rest of the model (dense weights, attention, engram, head, tokenizer) from the original checkpoint. None of them loads with `transformers.from_pretrained()`.
141
 
142
+ WEX4, WNR3 and WNR4 are separate layers:
143
 
144
+ - **WEX4** is the container: one record per expert (or per tensor group), 4096-byte aligned so that an expert is one aligned read; a self-describing tensor index; a SHA-256 of the stored bytes of every record and blob; and a root, the SHA-256 of the header page, that names the whole file. WEX4 does not compress, except with the optional **WBP1 (codec 6)**, which is lossless byte-plane rANS for BF16, FP8, F32 and integer tensors.
145
  - **WNR3 (codec 5)** is a lossless codec for MXFP4 expert records (FP4 E2M1 weights and E8M0 scales): context-modelled rANS entropy coding with a 59,408-byte table of value statistics (the WNM2 model, a count table, not a neural network) stored once in the file, a 23-bit hash in every stream, and a CPU decoder and an NVIDIA GPU decoder. With *canonical zero* it stores FP4 -0 as +0 (value-exact); without it, it is byte-exact.
146
  - **WNR4 (codec 8)** is the GPU-parallel successor of WNR3 ([WNR4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR4-SPEC.md)): tiles of 32 rANS lanes sharing one 16-bit word stream decoded by one GPU warp (up to **209 GB/s** kernel decode on RTX 5090, 0.19 ms single-record latency at G = 32), with a 32-bit hash per tile and a WNM4 model blob (kind 3). It supports four kinds: **MX** (kind 0, MXFP4), **NV** (kind 1, NVFP4), **GG** (kind 2, GGUF `Q2_0`/`IQ4_NL` slices), and **I4** (kind 3, int4-g64 experts with FP8 block-scaled lattice scales).
147
 
 
150
  | File | WEX4 root (`COLI_WEX_ROOT`) | SHA-256 of the whole file (as listed by Hugging Face) | Checked |
151
  |---|---|---|---|
152
  | `q38_experts.wex` | `db5389f699abb49a164a9e73d925b5b629b0ce6de430a553388ba3e1cae5c0df` | `9f6caa9a1e4e5ffe300108d3865ad0c4a246862c86ddaea2d3ee56b37e286bbf` | 24,576 records, every hash matches the index; content digest `0d752bbf2d169b611ac79b005f07d0b9152c0591b23b65cbd12e06ea8300ec77`. Against AMD's tensors: all 512 records of layers 0 and 47, and the first and last record of every layer, byte-identical when the file was built |
153
+ | `q38_experts.nr3.wex` | `7d78e6ccfb8dee558a08371da86d275d53b7356d255d25ae4cac831dabd3e7f9` | `abddc4243b56a109d74973cee324b19296db0cf5b996f2e8a5585b798e29255b` | at build time, layers 0, 10, 23 and 47 decoded on the GPU and compared with the RAW records; repaired copy passed full check across all 48 layers |
154
  | `q38_experts.wnr4.wex` | `68745b781dd947e57c4cacabe2c87e21bfa606559320cf3486ba87ee051d87b9` | `81ea4790fca378a40fff23d212e86df1c32ef6c62ce5fa2c4d4fea336314ae92` | 24,576 WNR4-MX records (48 × 512), header & root verified |
155
  | `qwen38_flash_next_int4g64.wnr4i4.wex` | `6545bff2dd755ed1660a18feff75406829dc9b25b1bed2f4f6a0ee2532b1098f` | `9116ed1e15cf8e641a5f582eafaff2e350d3003400b59e0c66cc4d83dcd874e7` | 24,576 WNR4-I4 records verified 24,576/24,576 byte-exact against RAW (`wex4/wnr4i4.py verify --source`) |
156
  | `qwen38_flash_next_gsq_iq1m.wnr4gg.wex` | `fbc259fdc37a672b039276d167cd84376422514fa4d192776852b94b6911ef12` | `df943c94067445cb59f6979a27dfef001f89f7edf9497597317e4ffff5e388a3` | 13,809 records (2-shard full GGUF packed with `wex4/wnr4gg.py`), header & root verified |
157
  | `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `203d55dc96f5c2fe16716cef2c767fa63c387e8cbbbe98991ecd4f7039c7e4b2` | 7,680 records decoded, every hash matches the index; content digest `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` |
158
  | `v4_flash_experts.wnr4.wex` | `75520a3b0a52f161a02cafebc94d57e58ef2c4ccfbff5b4ba637cc3d66252e30` | `bebd6fd2171514c5158dd629a4225350ac922e9accae9c23fff177cf9e4543b1` | 7,680 WNR4-MX records (40 × 192), header & root verified |
159
+ | `v4_flash_0731_experts.wnr4.wex` | `2205858fc24d26c012ff4d436f01ea43e3ca055ff6d8cb34254665fcdc7353b7` | `f4178513030ec33e0c83bfdfc0c61001ff0cbd729779f7530210522818516194` | 11,008 WNR4-MX CZ records (43 × 256), verified **11,008/11,008** value-exact round-trip at build time + `wex4_verify` (123.12 GB) + full read-back decode via C `wex4_tools.dll` |
160
  | `nemotron35_super_vl_nvfp4.wnr4nv.wex` | `d5c8cb449797d8385aba3ad03202fad9fa623af12c7175b2cb2e87861c7df9c5` | `1d9a8d5733b35f5a6a90a6b398b088d6fe5fdc5ee1e6259b2c7385af6cc44b3b` | 20,480 WNR4-NV records (40 × 512) + 1 RAW `weight_scale_2` record (40,960 scalars); verified **20,480/20,480 byte-exact** round-trip + `wex4.Reader` validated |
161
+ | `inkling2_mini_nvfp4.wnr4nv.wex` | `fc9a162838fcf2d0d4c8cd5117a4b4177dd0f10a106d65ac66a2ffbc6b748585` | `99f96dda3e7e0d72e207e86d20dbe6ee4da042f7c4297a066091c703b2dd70da` | 2,560 WNR4-NV (L0–19) + 512 WBP1 MXFP8 (L20–23) + 1 RAW scalar record; verified **3,073/3,073 byte-exact** via `wex4_verify` + `wex4.py verify --dll wex4_tools.dll` (content digest `d07fd228224a610add02984861d395a459614d0ea866dbf0ada009fe7a7c7e0e`) |
162
+ | `inkling2_mini_int4g64.wnr4i4.wex` | `01ee37273615f1e826fcbac8e894fdf823cdd0fca614af85636327d7be9253e2` | `6bde80144512f06672892f4caaa92f05b321cac49cd0d2c8c222899d09d330f3` | 3,072 WNR4-I4 planar records (24 × 128); verified **3,072/3,072 byte-exact** via `wex4_verify` + `wnr4i4.py verify` |
163
+ | `cyber_tiel_coder_35b_a3b_mtp.wex4` | `0aaecf2470b99e8e26f4fdaa954df0ee05711e2a6f7c89bddf67c8c73cefd950` | `4cbfe5e2f78fe9df770a76941d05f34ec26567555406fcd035ec1035fb32dabb` | 10,496 RAW expert records (41 × 256) + GGUF header blob; verified via `wex4_verify` (20.03 GB) |
164
+ | `lfm25_24b_a2b_q4kxl.wex4` | `cbcd7d58072b7146f9205b146367f467737d84b1fe8e9491296ac98306d8efcd` | `a4c560dd3828ad908031b203881766ae9a1ceb45a67cc35e88175c17c0ac1b13` | 2,750 records (full GGUF); verified via `gguf2wex4.py unpack --check` (source SHA-256 `a235d23638cc5549cb1ff61da7522c8a7e97f056f27093462a1e56f35aba91d8` identical) + `wex4_verify` |
165
+ | `mellum21_12b_a25b_q6k.wex4` | `575cb024b7ee9f8719c8d114e34cd697fbfb87d9b9cb9d676d269290c4ae1e98` | `b7a8e914dac272801304f3133f7625d7f84f34d1c9a9d12ea8fa2455ff1b6de7` | 2,051 records (full GGUF); verified via `gguf2wex4.py unpack --check` (source SHA-256 `12aec619f6a2c82b1ea8998f03665b3b5fc5bb758af97efdf4b1ec7a822b8668` identical) + `wex4_verify` |
166
 
167
+ 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).
168
 
169
  ## Size
170
 
 
176
  | Qwen3.8-Flash-Next GSQ-RCO-IQ1_M (full 2-shard GGUF), **WNR4-GG** | 57,821,315,072 B | 58,397,560,320 B | **0.990** |
177
  | DeepSeek-V4.1-Flash-1017 REAP-192, WNR3-CZ against raw WEX1 | 123,312,910,336 B | 144,389,472,256 B | **0.854** |
178
  | DeepSeek-V4.1-Flash-1017 REAP-192, **WNR4-MX (CZ)** against raw | 122,872,295,424 B | 144,388,915,200 B | **0.851** |
179
+ | DeepSeek-V4-Flash-0731 (full 43L × 256E), **WNR4-MX (CZ)** against raw | 123,115,499,520 B | 147,169,738,752 B | **0.837** |
180
  | NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4, **WNR4-NV** against raw NVFP4 | 57,976,958,976 B | 63,417,876,480 B | **0.914** |
181
+ | Inkling-2-Mini (20L NVFP4 + 4L MXFP8), **WNR4-NV + WBP1** against raw | 14,048,350,208 B | 15,676,235,776 B | **0.896** |
182
+ | Inkling-2-Mini INT4-g64 (24L × 128E), **WNR4-I4** against raw | 12,109,963,264 B | 13,765,705,728 B | **0.880** |
183
+ | Cyber-Tiel-Coder-35B-A3B-MTP `UD-Q4_K_XL` experts, RAW | 20,033,175,552 B | 20,033,175,552 B | 1.000 (not compressed) |
184
+ | LFM2.5-24B-A2B `UD-Q4_K_XL` (full GGUF), RAW | 14,878,310,400 B | 14,878,310,400 B | 1.000 (not compressed) |
185
+ | Mellum2.1-12B-A2.5B-Thinking `Q6_K` (full GGUF), RAW | 10,885,849,088 B | 10,885,849,088 B | 1.000 (not compressed) |
186
+ | Qwen3.8-Flash-Next RAW | 64,251,047,936 B | 64,251,047,936 B | 1.000 (not compressed) |
187
 
188
  ## Quality of the 4-bit weights (steps taken before the container)
189
 
 
194
 
195
  ## Use with colibri
196
 
197
+ The WEX4/WNR4 series for colibri lives on the fork [KairaCode/colibri](https://github.com/KairaCode/colibri) (`wex4-wnr4-test` / `main`) and is proposed upstream in [JustVugg/colibri#2920](https://github.com/JustVugg/colibri/pull/2920). Everything is opt-in: with `COLI_WEX_PATH` unset an engine behaves as before.
198
 
199
  ```sh
200
+ # DeepSeek V4-Flash-0731 (full 43L x 256E): trunk from the original checkpoint, routed experts from WNR4-MX
201
+ export COLI_WEX_PATH=/models/v4_flash_0731_experts.wnr4.wex
202
+ export COLI_WEX_ROOT=2205858fc24d26c012ff4d436f01ea43e3ca055ff6d8cb34254665fcdc7353b7
203
+ export COLI_WEX_CUDA_LIB=/path/to/kaira_wex_cuda.so # optional: decode WNR3/WNR4 on an NVIDIA GPU
204
  ```
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  ## Quick Start: DeepSeek-V4.1-Flash REAP-192 + WNR4-MX
207
 
208
  To run **DeepSeek-V4.1-Flash-1017 REAP-192** with the WNR4-MX expert container (`v41-reap/v4_flash_experts.wnr4.wex`, 122.87 GB) and learned prefetch gates (`v41-reap/v41_pred_gates.bin`, 151 MB):
 
249
  ## Download
250
 
251
  ```sh
252
+ hf download Kaira666/Kaira-WEX4-Experts deepseek-v4-flash-0731/v4_flash_0731_experts.wnr4.wex --local-dir WEX4-Experts # DeepSeek-V4-Flash-0731 full 43L×256E WNR4-MX (123.12 GB)
253
+ hf download Kaira666/Kaira-WEX4-Experts v41-reap/v4_flash_experts.wnr4.wex --local-dir WEX4-Experts # DeepSeek-V4.1 REAP-192 WNR4-MX (122.87 GB)
254
+ hf download Kaira666/Kaira-WEX4-Experts qwen38-mxfp4/q38_experts.wnr4.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next MXFP4 WNR4-MX (56.85 GB)
255
+ hf download Kaira666/Kaira-WEX4-Experts qwen38-int4g64/qwen38_flash_next_int4g64.wnr4i4.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next INT4-g64 WNR4-I4 (53.29 GB)
256
+ hf download Kaira666/Kaira-WEX4-Experts qwen38-gsq-iq1m/qwen38_flash_next_gsq_iq1m.wnr4gg.wex --local-dir WEX4-Experts # Qwen3.8-Flash-Next GSQ-IQ1_M WNR4-GG (57.82 GB)
257
+ hf download Kaira666/Kaira-WEX4-Experts nemotron-3.5-super-vl/nemotron35_super_vl_nvfp4.wnr4nv.wex --local-dir WEX4-Experts # Nemotron-3.5-Super-VL-120B NVFP4 WNR4-NV (57.98 GB)
258
+ hf download Kaira666/Kaira-WEX4-Experts inkling-2-mini/inkling2_mini_nvfp4.wnr4nv.wex --local-dir WEX4-Experts # Inkling-2-Mini NVFP4+MXFP8 WNR4-NV+WBP1 (14.05 GB)
259
+ hf download Kaira666/Kaira-WEX4-Experts inkling-2-mini/inkling2_mini_int4g64.wnr4i4.wex --local-dir WEX4-Experts # Inkling-2-Mini INT4-g64 WNR4-I4 (12.11 GB)
260
+ hf download Kaira666/Kaira-WEX4-Experts cyber-tiel-coder-35b-a3b/cyber_tiel_coder_35b_a3b_mtp.wex4 --local-dir WEX4-Experts # Cyber-Tiel-Coder-35B-A3B-MTP UD-Q4_K_XL experts (20.03 GB)
261
+ hf download Kaira666/Kaira-WEX4-Experts lfm2.5-24b-a2b/lfm25_24b_a2b_q4kxl.wex4 --local-dir WEX4-Experts # LFM2.5-24B-A2B UD-Q4_K_XL full GGUF WEX4 (14.88 GB)
262
+ hf download Kaira666/Kaira-WEX4-Experts mellum-2.1-12b-a2.5b/mellum21_12b_a25b_q6k.wex4 --local-dir WEX4-Experts # Mellum2.1-12B-A2.5B-Thinking Q6_K full GGUF WEX4 (10.89 GB)
263
  ```
264
 
265
  ## Source and specifications
 
268
 
269
  - [WEX4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WEX4-SPEC.md), [WNR3-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR3-SPEC.md), and [WNR4-SPEC](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/WNR4-SPEC.md)
270
  - [Colibri integration guide](https://github.com/KairaCode/Wex-WRN2/blob/main/docs/COLIBRI-INTEGRATION.md)
271
+ - `wex4/wex4_convert.py`, `wex4/gguf2wex4.py`, `wex4/wnr4mx.py`, `wex4/wnr4gg.py`, `wex4/wnr4i4.py`: pack, verify and unpack WEX4 containers (RAW, WBP1, WNR3, WNR4-MX/NV/GG/I4)
272
 
273
  ## Licenses
274
 
275
  The files here carry different terms, so no single license is asserted for the repository:
276
 
277
  - Qwen3.8-Flash-Next expert weights (MXFP4, INT4-g64, GSQ-IQ1_M): [Qwen Community License 1.0](https://huggingface.co/Qwen/Qwen3.8-Flash-Next/blob/main/LICENSE), the license of the base model and of AMD's release.
278
+ - DeepSeek-V4.1-Flash-1017 REAP-192 & DeepSeek-V4-Flash-0731 expert weights: [MIT](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/blob/main/LICENSE), Copyright (c) 2023 DeepSeek.
279
  - NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 expert weights: [NVIDIA Open Model License](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4/blob/main/LICENSE).
280
+ - Inkling-2-Mini (NVFP4/MXFP8 & INT4-g64) expert weights: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) ([thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini)).
281
+ - Cyber-Tiel-Coder-35B-A3B-MTP expert weights: [MIT](https://huggingface.co/ornith-ai/Ornith-1.5-35B-A3B) (derived from Ornith-1.5-35B-A3B / [peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP](https://huggingface.co/peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP)).
282
+ - LFM2.5-24B-A2B weights: [LFM Open License 1.0](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B-Base).
283
+ - Mellum2.1-12B-A2.5B-Thinking weights: [Apache-2.0](https://huggingface.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking).
284
  - The WEX format, codecs, specifications and tools (not stored here): [Apache-2.0](https://github.com/KairaCode/Wex-WRN2/blob/main/LICENSE).
285
 
286
  The license texts are in [`licenses/`](licenses/NOTICE.md), copied unchanged from the upstream repositories.
licenses/DeepSeek-V4-Flash-0731-LICENSE.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
licenses/NOTICE.md CHANGED
@@ -1,13 +1,18 @@
1
  # Licenses of the files in this repository
2
 
3
  Each container holds weights derived from a model published by someone else, and keeps that model's license.
4
- The license texts are copied here unchanged from the upstream repositories.
5
 
6
  | Files | Upstream | License | Text |
7
  |---|---|---|---|
8
- | `qwen38-mxfp4/*` | [Qwen/Qwen3.8-Flash-Next](https://huggingface.co/Qwen/Qwen3.8-Flash-Next) (MXFP4 quantization by AMD) | Qwen Community License 1.0 | [`Qwen3.8-Flash-Next-LICENSE.txt`](Qwen3.8-Flash-Next-LICENSE.txt), copied from the upstream `LICENSE` |
9
  | `v41-reap/*` | [deepseek-ai/DeepSeek-V4.1-Flash-1017](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017) | MIT | [`DeepSeek-V4.1-Flash-1017-LICENSE.txt`](DeepSeek-V4.1-Flash-1017-LICENSE.txt), copied from the upstream `LICENSE` |
10
- | `Sage-S2.1-Flash-int4/*`, `Sage-S2.1-Flash-MXFP4/*` | [internlm/Sage-S2.1-Flash-FP8](https://huggingface.co/internlm/Sage-S2.1-Flash-FP8) (requantized by us) | MIT | The upstream repository has no `LICENSE` file; its model card states: "The code and model weights in this repository are released under the **MIT License**." |
 
 
 
 
 
11
 
12
  The WEX format, codecs, specifications and tools are not stored here; they are Apache-2.0 in
13
  [KairaCode/Wex-WRN2](https://github.com/KairaCode/Wex-WRN2/blob/main/LICENSE).
 
1
  # Licenses of the files in this repository
2
 
3
  Each container holds weights derived from a model published by someone else, and keeps that model's license.
4
+ The license texts are copied here unchanged from the upstream repositories where an upstream `LICENSE` file exists.
5
 
6
  | Files | Upstream | License | Text |
7
  |---|---|---|---|
8
+ | `qwen38-mxfp4/*`, `qwen38-int4g64/*`, `qwen38-gsq-iq1m/*` | [Qwen/Qwen3.8-Flash-Next](https://huggingface.co/Qwen/Qwen3.8-Flash-Next) (MXFP4 quantization by AMD) | Qwen Community License 1.0 | [`Qwen3.8-Flash-Next-LICENSE.txt`](Qwen3.8-Flash-Next-LICENSE.txt), copied from the upstream `LICENSE` |
9
  | `v41-reap/*` | [deepseek-ai/DeepSeek-V4.1-Flash-1017](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017) | MIT | [`DeepSeek-V4.1-Flash-1017-LICENSE.txt`](DeepSeek-V4.1-Flash-1017-LICENSE.txt), copied from the upstream `LICENSE` |
10
+ | `deepseek-v4-flash-0731/*` | [deepseek-ai/DeepSeek-V4-Flash-0731](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731) | MIT | [`DeepSeek-V4-Flash-0731-LICENSE.txt`](DeepSeek-V4-Flash-0731-LICENSE.txt), copied from the upstream `LICENSE` |
11
+ | `nemotron-3.5-super-vl/*` | [nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4) | NVIDIA Open Model License | Upstream `LICENSE` in the NVIDIA repo |
12
+ | `inkling-2-mini/*` | [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini) | Apache-2.0 | Standard Apache License 2.0 |
13
+ | `cyber-tiel-coder-35b-a3b/*` | [peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP](https://huggingface.co/peculiar-ragdoll/Cyber-Tiel-Coder-35B-A3B-GGUF-MTP) / [ornith-ai/Ornith-1.5-35B-A3B](https://huggingface.co/ornith-ai/Ornith-1.5-35B-A3B) | MIT | Model card asserts MIT |
14
+ | `lfm2.5-24b-a2b/*` | [LiquidAI/LFM2.5-24B-A2B-Base](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B-Base) | LFM Open License 1.0 | Model card asserts `lfm1.0` |
15
+ | `mellum-2.1-12b-a2.5b/*` | [JetBrains/Mellum2.1-12B-A2.5B-Thinking](https://huggingface.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking) | Apache-2.0 | Standard Apache License 2.0 |
16
 
17
  The WEX format, codecs, specifications and tools are not stored here; they are Apache-2.0 in
18
  [KairaCode/Wex-WRN2](https://github.com/KairaCode/Wex-WRN2/blob/main/LICENSE).