Ludovico commited on
Document WEX format evolution and verified size ratios
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849---license: otherlibrary_name: colibripipeline_tag: text-generation---# WEX4 expert containersBinary expert-weight assets. These are **not standalone Transformers checkpoints** and cannot be loaded with `from_pretrained()`.## Contents| File | Model/build | Bytes ||---|---|---:|| `qwen38-mxfp4/q38_experts.wex` | Qwen 3.8 MXFP4 expert container | 64,251,047,936 || `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek V4.1 Flash REAP-192, NR3 container | 123,312,910,336 || `provenance/*.verified.pre-wex4` | Supplied source/build verification notes | — |## Format and compatibilityWEX4 is a self-describing container with a hashed header/index, SHA-256 digests for blobs and records, and 4 KiB aligned data. It stores raw records or WNR3 encoded expert records. The Qwen file stores RAW MXFP4 records; the V4.1 file stores WNR3-CZ records.WNR2 is a different, older codec used inside WEX3 containers. Neither file in this repository uses WNR2. Use a runtime build that explicitly supports WEX4 for the corresponding model family. A generic Transformers runtime or an older WEX/WNR2-only build cannot load these files.## DownloadInstall the Hugging Face CLI and download the repository:```powershellhf download Kaira666/Kaira-WEX4-Experts --repo-type model --local-dir .\WEX4-Experts```The containers total about 187.6 GB decimal. Ensure sufficient free disk space before downloading.## Integrity and runtime configurationThe WEX4 whole-file verifier checks the header, index, blobs, records, padding, and indexed SHA-256 values, then prints the 64-digit container root. Run it on each downloaded file before use. In a compatible runtime, `COLI_WEX_ROOT` pins the expected root; `COLI_WEX_VERIFY=1` enables first-read record hashing where supported.| Container | Verified WEX4 root | Content digest ||---|---|---|| `q38_experts.wex` | `db5389f699abb49a164a9e73d925b5b629b0ce6de430a553388ba3e1cae5c0df` | `0d752bbf2d169b611ac79b005f07d0b9152c0591b23b65cbd12e06ea8300ec77` || `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` |The supplied `.verified.pre-wex4` files record provenance before/alongside WEX4 conversion. The Qwen file passed whole-file verification: all 24,576 records decoded and all indexed hashes matched. The V4.1 file passed whole-file verification: all 7,680 records decoded and all indexed hashes matched.## LicenseNo license has been specified for these model assets. Public availability does not grant permission to use, modify, or redistribute them. Add the applicable license before reuse.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283---pipeline_tag: text-generationtags:- wex4- mixture-of-experts- mxfp4- expert-weights---# WEX4 Expert ContainersThese are expert-weight containers for compatible Mixture-of-Experts (MoE) runtimes, not complete model checkpoints. They do not include the full model, tokenizer, chat template, or inference runtime, and are not loadable with `transformers.from_pretrained()`.The container format and the per-record codec are separate layers: WEX4 provides indexed access and integrity checking; WNR3 is an optional custom codec for MXFP4 expert records.## Files| Path | Model and layout | Expert count | Size ||---|---|---:|---:|| `qwen38-mxfp4/q38_experts.wex` | Qwen3.8-Flash-Next, routed MXFP4, WEX4 with RAW records | 24,576 (48 × 512) | 64,251,047,936 bytes (64.25 GB) || `v41-reap/v4_flash_experts.nr3.wex` | DeepSeek V4.1 Flash REAP-192, WEX4 with WNR3-CZ records | 7,680 (40 × 192) | 123,312,910,336 bytes (123.31 GB) || `provenance/q38_experts.wex.verified.pre-wex4` | Supplied Qwen source-copy SHA-256 note | — | 123 bytes || `provenance/v4_flash_experts.nr3.wex.verified.pre-wex4` | Supplied V4.1 build/read-back note | — | 177 bytes |The two containers total about 187.6 GB decimal (174.7 GiB). Allow additional disk space for the runtime, cache, and any local mirrors.## Container evolution| Format | What it adds ||---|---|| **WEX1** | Original layout: raw expert records aligned to 4 KiB for direct per-expert reads. || **WEX2** | Lossless tiled coding for MXFP4 scale values; FP4 weight bytes stay raw. || **WEX3** | Per-record codec support, including WNR2 and WNR3, with the metadata those codecs require. || **WEX4** | Self-describing tensor index, a SHA-256 container root, and hashes for records and blobs. It can hold either raw or encoded records; WEX4 is not itself a compression codec. |WNR2 and WNR3 are different codecs. WNR2 is the earlier codec 4 used in WEX3; these published containers do not use WNR2. The Qwen file contains RAW records. The V4.1 file contains WNR3-CZ records (codec 5) inside WEX4.## WNR3 codec and size resultsWNR3 is a custom entropy codec designed for MXFP4 expert weights and scales. It uses context-based rANS coding and has a purpose-built GPU decoder. It is not a general-purpose archive format. The WNR3-CZ production variant maps negative zero to positive zero: represented numeric values are preserved, but those zero sign bits are not byte-identical to the source.Compression figures below compare expert containers for the same DeepSeek V4.1 REAP-192 experts:| Encoding | Result relative to raw | Evidence and qualification ||---|---:|---|| WNR2, bit-exact | 0.8997×, about 10.03% smaller | Measured full container: 129,905,360,896 B vs 144,389,472,256 B raw. This is historical and is not used by the files in this repository. || WNR3, strict bit-lossless | About 0.8819×, about 11.81% smaller | Estimate from held-out experts; not a full-model non-CZ container measurement. || WNR3-CZ, value-exact | 0.8540×, about 14.60% smaller | Production container: 123,306,192,896 B before the WEX4 index; the published WEX4 file is 123,312,910,336 B. CZ normalizes the FP4 sign of zero. |The Qwen3.8 file is intentionally RAW MXFP4, so it claims no codec compression benefit. Its WEX4 index adds about 26 MB over the prior WEX1 file and supplies integrity metadata and indexed expert records.## DownloadInstall the Hugging Face CLI and download the full repository:```powershellhf download Kaira666/Kaira-WEX4-Experts --repo-type model --local-dir .\WEX4-Experts```You can download either container separately:```powershellhf download Kaira666/Kaira-WEX4-Experts qwen38-mxfp4/q38_experts.wex --repo-type model --local-dir .\WEX4-Expertshf download Kaira666/Kaira-WEX4-Experts v41-reap/v4_flash_experts.nr3.wex --repo-type model --local-dir .\WEX4-Experts```## Runtime compatibility and integrityUse a runtime that explicitly supports WEX4 version 4.0 and the codec/model family in the selected file. An older WEX/WNR2-only build or a generic Transformers loader cannot read these assets. The Qwen3.8 file needs a WEX4 loader for RAW MXFP4 experts. The DeepSeek V4.1 file also needs WNR3-CZ decoding support and its matching GPU helper.In compatible runtimes that expose these settings, set `COLI_WEX_PATH` to the selected file and `COLI_WEX_ROOT` to its verified root. `COLI_WEX_VERIFY=1` enables first-read record hashing where supported. These settings do not add WEX4 support to an incompatible runtime.A WEX4 whole-file verification checks the header, index, exact file layout, padding, every blob, and every record; encoded records are decoded as part of the check. The root is the SHA-256 of the first 4,064 bytes of the header page. The content digest below is SHA-256 over decoded tensor content and tensor metadata in table order.| File | Verified WEX4 root | Content digest | Verification result ||---|---|---|---|| `q38_experts.wex` | `db5389f699abb49a164a9e73d925b5b629b0ce6de430a553388ba3e1cae5c0df` | `0d752bbf2d169b611ac79b005f07d0b9152c0591b23b65cbd12e06ea8300ec77` | 24,576 records decoded; all indexed hashes matched || `v4_flash_experts.nr3.wex` | `f0f78a84d040a3b336f3abef3cf8b0a36c649deb38586c813e94d35dea3beeb1` | `fb085e127ba980214f106313e9af578b18e5ebac4cde7ecb9730b1a0f78ae512` | 7,680 records decoded; all indexed hashes matched |The `.verified.pre-wex4` files are included as supplied provenance notes. The roots and results above apply to the final published WEX4 files.## LicenseNo license has been specified for these model assets. Public availability does not grant permission to use, modify, or redistribute the weights. Confirm the applicable rights before reuse.
README.md+59-25