Sage-S2.1-Flash · exlr8 (K2/K3/K4, pmcgx)
A multi-width quantization of Sage S2.1 Flash (Shanghai Artificial Intelligence Laboratory) in the exlr8 v2 format using the pmcgx (V2 L20) trellis codebook across every MoE layer, built for NVIDIA GB10-class unified-memory devices (DGX Spark, ASUS GX10) served on one to four boxes. Every routed expert is stored at three trellis widths (K2, K3, and K4) and every shared expert at K3 and K4, with serving width chosen at load time.
Requires a pmcgx + E4M3-rounding loader. Every MoE layer (layers 3–45) uses the
pmcgxV2 L20 codebook (exlr8 FORMAT.md), and every codebook value must be rounded to FP8 E4M3 (round to nearest even, saturating) before applying the side vectors. Current kindlingai/gr8 decodespmcgxnatively. A stock EXL3 decoder, or any loader that only supportsmcgor skips E4M3 rounding, will not decode these bytes accurately.
Sage S2.1 Flash uses the GLM-5.3-Flash architecture: 45 layers (0–2 dense, 3–44 MoE), 288 routed experts with top-8
routing plus one shared expert per MoE layer, hidden size 4096, expert intermediate size 2048, an MTP layer 45, and a
vision tower. This repository quantizes the routed and shared experts of layers 3–45 (pmcgx V2 L20) and the dense
weights of every layer, and carries the vision tower unchanged in BF16.
Engine support
- kindlingai/gr8 serves this release with
./gr8 glm53fat TP=1–4 and fetches only each box's rank slice from this repository (--variant k4,k3, ork2). See How to run with gr8. - The container and byte layout match kindlingai/glm-5.3-flash-exlr8-k2-k3-k4 and kindlingai/sage-s2.1-flash-exlr8-k4.
Widths and sizes
| width | routed + shared experts (incl. index) | model size | serves at | note |
|---|---|---|---|---|
| K2 | 78.6 GB (2.0 bpw routed) | 86.7 GB | TP=1 | fits one 128 GB box |
| K3 | 117.9 GB (3.0 bpw routed + shared) | 126.0 GB | TP=2 | high KV headroom on 2 boxes |
| K4 | 157.0 GB (4.0 bpw routed + shared) | 165.1 GB | TP=2, TP=3, TP=4 | validated default |
- Model size is everything one copy loads at that width: the experts of layers 3–45 plus the 8.1 GB of dense, vocabulary, and BF16 vision files.
- Exact per-layer expert file sizes: K4
3,636,527,104bytes, K32,727,411,712bytes, K21,812,004,864bytes. - Total repository size across all three widths, index files, TP=1–4 index slices, dense weights, and vision tower: 362.4 GB (337.5 GiB).
- Each width is an independent, Hessian-aware (LDLQ)
pmcgxencode with refinement; codes do not nest between widths.
Quality
All numbers compare this pmcgx K4 release with the BF16 base model (internlm/Sage-S2.1-Flash) on the exact same
token sequences, alongside the prior K4-only mcg release
(kindlingai/sage-s2.1-flash-exlr8-k4).
Full-vocabulary KL, top-1, and NLL (offline forward, fp64 log-softmax)
Evaluated across the 41 held-out rows of 2,048 tokens (83,968 positions) and the full 44-row evaluation suite
(41 held-out + 3 fixed texts = 90,112 positions, 90,068 next-token NLL positions):
| metric | pmcgx K4 (this release) | prior mcg K4 | change |
|---|---|---|---|
| mean KL (41 held-out rows) | 0.0889 | 0.0985 | -9.8% |
| top-1 agreement (41 held-out rows) | 91.5% | 91.0% | +0.5 pp |
| mean KL (all 44 rows, 90,112 pos) | 0.08554 | 0.09453 | -9.51% |
| median KL (all 44 rows) | 0.00996 | 0.01085 | -8.22% |
| p90 KL (all 44 rows) | 0.10350 | 0.11267 | -8.14% |
| p99 KL (all 44 rows) | 1.08530 | 1.23840 | -12.36% |
| top-1 agreement (all 44 rows) | 91.51% | 91.06% | +0.45 pp |
| NLL / PPL (BF16 ref: 1.8145 / 6.138) | 1.8127 / 6.127 (dNLL -0.0017) | 1.8112 / 6.118 (dNLL -0.0032) | better than BF16 |
Across the 44 evaluation sequences, pmcgx K4 achieves lower full-vocabulary KL on 40 of 44 sequences and higher
top-1 agreement on 33 of 44 sequences, with zero non-finite values.
NLL change on three fixed texts
Mean next-token NLL over the first 2,048 tokens of three fixed texts (prose, CUDA source, Python source), K4 minus BF16 (lower is better):
| text | offline forward | served by gr8, TP=2 |
|---|---|---|
| prose | +0.0037 | +0.0076 |
| CUDA | -0.0009 | -0.0021 |
| Python | +0.0039 | +0.0124 |
Live served by gr8 (TP=2, int4 KV, MTP=2)
Teacher-forced top-20 lumped KL and top-1 agreement of the live TP=2 gr8 glm53f server against BF16:
| slice | metric | pmcgx K4 (live) | prior mcg K4 (live) | change |
|---|---|---|---|---|
first 10 held-out rows (20,470 pos) | top-20 KL | 0.0449 | 0.0485 | -7.4% |
first 10 held-out rows (20,470 pos) | top-1 agreement | 91.4% | 90.8% | +0.5 pp |
13-row priority set (26,611 pos) | top-20 KL | 0.0424 | 0.0451 | -6.1% (wins 11/13) |
13-row priority set (26,611 pos) | top-1 agreement | 91.5% | 91.0% | +0.4 pp (wins 10/13) |
13-row priority set (26,611 pos) | served dNLL vs BF16 | -0.0030 (PPL 6.024 vs 6.042) | -0.0017 | better than BF16 |
Live greedy generation was verified across 6 domains (Python coding, multi-step arithmetic, logic deduction, strict JSON output, bilingual Chinese/English technical explanation, and multi-node RDMA systems) with fluent, accurate outputs at 40.6–51.0 tok/s single-stream on 2× GB10.
What is in this repository
| content | notes |
|---|---|
experts/exlr8-layer-LLL.k{2,3,4}.safetensors | pmcgx V2 L20 routed (K2/K3/K4) and shared (K3/K4) expert trellis halves for layers 003–045 |
experts/exlr8-layer-LLL.index.safetensors | index, side vectors, and xxhash64 checksums for layer LLL |
dense/exlr8-dense-LLL.safetensors | non-expert weights for layers 000–045 (plus .sha256 sidecars) |
dense/exlr8-vocab.safetensors | token embedding, language-model head, and final norm |
dense/vision-bf16.safetensors | vision tower, unquantized BF16 (347 tensors) |
config.json, generation_config.json, tokenizer.json, tokenizer_config.json, chat_template.jinja, processor_config.json | base model configuration and tokenizer files |
tokenization_glm5.py, processing_glm5.py | base model custom tokenizer and processor code |
manifests/exlr8-manifest-k{2,3,4}.json | uniform K2, K3, and K4 manifests (each carries set_id) |
index-slices/tp<N>/k<K>/rank<r>.safetensors | per-rank index slices for TP=1–4 across K2, K3, and K4 |
hashes/SHA256SUMS | SHA-256 checksums of the release files |
Main dense matrices by encoding:
| matrices | encoding |
|---|---|
attention output (o_proj), q_b_proj, dense MLP (layers 0–2) | trellis K4 |
MLA q_a_proj, kv_a_proj_with_mqa, indexer wq_b and wk, MTP eh_proj | MXFP8 |
kv_b_proj | FP8, block scales |
router (mlp.gate), indexer weights_proj, norms, biases | BF16, as shipped |
Identifying the weights
The weight set ID is the SHA-256 of the sorted <path> <size> <sha256> lines over all weight files
(experts/*.safetensors and dense/*.safetensors). This release's weight set ID is:
228ce709da52f9a22cd06a539f5ed181783be68525105845e0348d9975f8f12e
Every manifest (manifests/exlr8-manifest-k{2,3,4}.json) and every index slice carries this set_id.
How to run with gr8 (TP=2)
Two GB10 boxes on a RoCE fabric. From a kindlingai/gr8 checkout on each box:
./gr8 glm53f up --tp 2 \
--model https://huggingface.co/kindlingai/sage-s2.1-flash-exlr8-k2-k3-k4 \
--model-cache /path/to/model-cache \
--variant k4 \
--kv-format int4 \
--peers <head-ip>,<peer-ip> \
--ips <head-rail1-ip>,<peer-rail1-ip> \
--ips2 <head-rail2-ip>,<peer-rail2-ip>
- Pass
--variant k3for higher KV headroom at TP=2, or--variant k2 --tp 1for single-box serving. - Pass
--ipsand--ips2when a box has more than two RoCE v2 addresses. gr8encodes message content as literal text and only the chat template's markers as control tokens, matching Sage's tokenizer requirements (tokenization_glm5.py).
Provenance and validation
Built from internlm/Sage-S2.1-Flash. The configuration, tokenizer, chat template, processor, custom tokenizer code, and BF16 vision tower are preserved from the upstream checkpoint.
All 12,427 experts (111,714 projections across all 43 MoE layers, L003–L045) were independently decoded with a
bit-exact pmcgx V2 L20 verifier and audited against BF16 weights and Hessians before packing:
- 0 hard failures, 0 NaN/Inf values, and 100% strict
K4 < K3 < K2monotonicity across every expert projection. - Every packed shard and TP=2 rank slice passed
g6load verifywith 0 bad chunks across K2 (297,216chunks), K3 (298,248chunks), and K4 (298,248chunks per rank).
Calibration and community quantization
Encoded with Hessian-aware (LDLQ) rounding and refinement against a fixed calibration set of 617 rows of 2,048 tokens
(1,263,616 tokens), with 41 held-out rows reserved for evaluation.
Layers 26–45 (5,780 expert pieces) were quantized through distributed community compute on KindlingAI Campfire.
Special thanks to the Campfire contributors for this release:
adapt-ai-systems(3,676 pieces)y0r-agent(1,514 pieces)coffee-the-dev(590 pieces)
The format's trellis primitives (128×128 Hadamard transform and tile packing order) derive from exllamav3 (MIT).
Intended use and limitations
- Serving Sage S2.1 Flash on GB10-class devices at TP=1–4.
- Tested with text input only. The BF16 vision tower is included unmodified but has not been separately benchmarked in this release.
- Not for training. The router, norms, and small projections keep their shipped precision.
Licence
Sage S2.1 Flash is released by Shanghai Artificial Intelligence Laboratory under the MIT License. This quantization stays under the MIT License: see LICENSE.
Acknowledgements
Built on Sage S2.1 Flash by Shanghai Artificial Intelligence Laboratory (internlm/Sage-S2.1-Flash).
exllamav3 made this possible through their original research on the EXL3 trellis format.