[!WARNING] All 46 GGUF parts are published. The 42 trunk expert parts and the optional MTP expert part contain R13+8 hVQ weights. File hashes are listed in
release.jsonandSHA256SUMS. The published body passed the bounded Spark serving checks below.Experimental low-bit release. The routed experts, which hold most of the weights, are stored at 2.6 bits per weight (13-bit codes plus an 8-bit residual stage on every MoE layer), far below common 4-bit GGUF quants. llama.cpp, Ollama and Transformers do not load these files.
China Telecom's 285B-A17B Xing4.1-Preview (MLA + DSA) with its native 1,048,576-token context, sized for one 128 GB DGX Spark. The 534 GiB BF16 checkpoint becomes about 101.9 GB of GGUF parts. The routed experts are 8-dimensional vector-quantized codes with E4M3 codebooks, 13-bit plus an 8-bit residual stage on all 42 MoE layers (R13+8 everywhere), fitted by hVQ: codebooks from importance-weighted Lloyd, indices and row gains by GPTQ-style error feedback through every expert's own input second moment, on both stages.
All 45 layers keep the whole history: 788 bytes per token and layer, 34.63 GiB at 1M. This release keeps the DSA index keys in memory (5.80 GiB) and puts the older MLA latent rows on SSD (28.83 GiB reserved per 1M session). The indexer selects the keys used in attention. Memory on a Spark is fixed and SSD space is not, so the memory goes to expert precision. With the drafter disabled and every trunk latent row resident the budget fits the residual stage on 20 of the 42 layers; with the rows on SSD it fits all 42, a Q8_0 body and the MTP block.
| Step | State |
|---|---|
| Design: memory budget, KV contract, index widths, recipe | done (this card, memory-budget.json) |
| Calibration and held-out sets in the model's chat protocol | Built and checked. See calibration/. |
| Trunk reference | Compared against the dense FP32 transcription on rows of 72, 640 and 2,048 tokens (99.76–100% same top-1). Gathered DSA was checked against masked attention on selected layers at 8,192 tokens. MTP scores appear in the held-out results. |
| Statistics: diagonal moments and per-expert second moments | Complete. See calibration/stats-summary.json. |
| iVQ codebooks, hVQ stage 1 and residual stage | All 43 expert parts verified and published. |
| Q8_0 body, MTP non-experts and BF16 token embedding | Published. The three parts contain 875 tensors. File and payload hashes were checked on readback. The 43 expert parts complete the release. |
| Vanilla VQ and hVQ fidelity | Complete on RunPod. See Measured against the original. |
ds4-dfm-rs xing41_vq family and GB10 serving gates |
The published Q8_0 body passed all 11 reuse, snapshot, bank and predictor checks at 256 configured positions. See Spark measurements. |
Both bodies ran on the same DGX Spark with the same Rust CUDA binary, E4M3 routed experts and MTP off. Each fresh process extended the same novel through six context lengths and generated 32 greedy tokens per frontier. Prefill measures the newly appended passage. Decode includes the first generated token. The table gives the median of two runs per body. Raw results · Workload and build
| Context | Q8_0 prefill (tok/s) | Q4_K prefill (tok/s) | Q8_0 decode (tok/s) | Q4_K decode (tok/s) |
|---|---|---|---|---|
| 2K | 970.31 | 1,052.39 | 14.86 | 21.56 |
| 4K | 948.62 | 1,020.95 | 14.82 | 21.50 |
| 8K | 914.12 | 1,010.12 | 14.84 | 21.55 |
| 16K | 885.36 | 1,025.72 | 14.79 | 21.31 |
| 32K | 835.38 | 959.87 | 14.47 | 20.73 |
| 64K | 756.78 | 858.17 | 14.25 | 20.16 |
The sweep uses an 8,192-row prefill chunk. The runtime defaults to 4,096. On the Q4_K fixed-target check, changing 4,096 to 8,192 rows preserved 175/256 correct next-token predictions. Mean NLL moved from 1.24970 to 1.28043. The paired standard deviation was 0.52523 against a chunk control of 0.27033. Per-position measurements
This repository contains the Q8_0 body. The Q4_K release has its own manifest and download. Q4_K weights and model card
On 256 fixed next-token targets, changing the trunk body from Q8_0 to Q4_K moved mean NLL from 2.01426 to 1.94518. The bodies picked the same top token at 228 positions. Correct next-token predictions were 151 and 155. The paired NLL standard deviation was 0.75119. Changing only the Q8_0 prefill chunk gave 0.45869 and 236 matching top tokens. Weight fingerprints and numerical comparison
The Q4_K server processed 1,048,480 uncached tokens at 133.9 prefill tok/s with a single bank and MTP off. It copied the archive sentence containing the code at token 524,273 and failed the request for the code alone. The matched 4,096-token control returned only the code. Both cold HTTP responses
These commands build the measured Rust CUDA host and start a single target history at 65,536 positions. Serving contract · Runtime PR
git clone https://github.com/Baekpica/ds4-dfm-rs.git
cd ds4-dfm-rs
git switch --detach 2ec9a26d27870bd471c6e5fbf5e5a3db6a6a8636
make cuda-spark
hf download Baekpica/Xing4.1-Preview-VQ-GGUF --local-dir ./Xing4.1-Preview-VQ-GGUF
./ds4-server --cuda -m ./Xing4.1-Preview-VQ-GGUF --host 127.0.0.1 --port 8002 \
--ctx 65536 --max-seqs 1 --prefix-reuse partial --mtp-mode off
| Source | XingChen-AGI/Xing4.1-Preview at 0b056837 (BF16 safetensors, 46 shards, 534 GiB; the authors' PyTorch conversion of the MindSpore-native weights). Apache-2.0 |
| Model | 45 layers (0–2 dense SwiGLU FFN 4,096 → 18,432; 3–44 MoE), hidden 4,096. Every layer is MLA + DSA: 128 heads, a 512-wide latent plus 64 RoPE dims, query rank 1,536, a lightning indexer (64 heads × 128) choosing 2,048 tokens. 256 routed experts top-8 (sigmoid router with correction bias, one group) + 1 shared, experts SwiGLU 4,096 → 2,048. YaRN ×32 RoPE; vocabulary 131,072; one MTP block (layer 45) |
| Routed experts | 8-dim VQ, one E4M3 codebook per layer shared by all 256 experts and gate/up/down, one F16 gain per row. 13-bit (K = 8,192) + 8-bit residual stage (K = 256) on all 42 MoE layers: 2.63 bits per weight. hVQ on stage 1 and on the residual stage |
| MTP block | its 256 routed experts in the trunk's R13+8 hVQ container (layer-45-experts.gguf), its matrices Q8_0 (mtp-q8_0.gguf). Optional: loaded only for drafting |
| Body | Q8_0 for every matrix read per token (attention projections, indexer query projection, shared experts, dense FFN, output head); routers, indexer key and head-weight projections, biases and norms at source precision |
| Token embedding | BF16 source bytes in its own part, read in rows from SSD (8,192 B per token) |
| Context | 1,048,576 tokens, the config's max_position_embeddings. The memory budget prices one history. |
| KV contract | DSA index keys FP8 (132 B per token and layer), resident; MLA latent fp8_ds_mla (656 B per token and layer) on SSD behind a pool of 196,608 tokens (5.41 GiB), so contexts up to that length never read the SSD |
| Fidelity | RunPod teacher-forced KL, top-1 agreement and NLL are reported below by position type |
| Runtime | ds4-dfm-rs (CUDA, Rust hosts). Tested Xing4.1 runtime and workload |
The RunPod reference forward scored 25 held-out cases (111,635 input tokens, up to 32,768 per case). The teacher uses the pinned BF16 checkpoint with FP32 arithmetic. Vanilla VQ trained its own E4M3 codebooks on the weights alone and assigned nearest centroids at both stages. hVQ used calibration activations and per-expert Hessian feedback. Both use the same R13+8 storage budget. Their difference includes calibration weighting, gain fitting, residual codebook selection and error feedback.
Only the routed experts change in this comparison. Both use the original body and cache arithmetic. The numerical floor repeats the original with different wave and feed-forward chunk sizes. Generated positions combine raw text and assistant turns. KL is teacher-to-student in nats. NLL scores the actual next token.
| Metric | Positions | Floor | Vanilla VQ | hVQ | hVQ − VQ |
|---|---|---|---|---|---|
| Routed-output error, mean per-layer median | all, 42 MoE layers | — | 0.10259 | 0.07758 | -24.4% |
| Top-8 expert overlap with teacher | all, layers 4–44 | 97.60% | 70.67% | 78.07% | +7.40 pp |
| KL | all | 0.01593 | 0.60605 | 0.42470 | -0.18135 (-29.9%) |
| KL | generated | 0.00425 | 0.48282 | 0.36271 | -0.12011 (-24.9%) |
| KL | prompt | 0.06083 | 1.07966 | 0.66294 | -0.41672 (-38.6%) |
| Same top-1 as teacher | all | 98.92% | 78.87% | 83.42% | +4.55 pp |
| Same top-1 as teacher | generated | 99.30% | 79.62% | 83.78% | +4.16 pp |
| NLL | all | 1.44250 | 1.60923 | 1.56092 | -0.04831 |
| NLL | generated | 1.25745 | 1.46278 | 1.36908 | -0.09370 |
| Final hidden cosine | all | 0.99444 | 0.82977 | 0.89076 | +0.06100 |
| Top-1 equals the target | generated | 74.57% | 69.87% | 72.10% | +2.22 pp |
Original NLL on 111,610 all targets was 1.44294. Original NLL on 88,566 generated targets was 1.25762.
Generated-position hVQ − VQ, with paired 95% bootstrap intervals over cases: KL -0.1201 [-0.1923, -0.0391], top-1 agreement (pp) +4.1607 [+3.2265, +5.7656], NLL -0.0937 [-0.1554, +0.0030]. Per-domain deltas are in paired-deltas.json.
The paired routed-output experiment feeds each method the original input, expert IDs and routing weights. The per-token error is squared output error divided by original squared output norm. Each table entry averages 42 layer summaries with equal weight.
| Routed-output error | Vanilla VQ | hVQ | Relative change |
|---|---|---|---|
| Per-layer median | 0.10259 | 0.07758 | -24.4% |
| Energy-weighted ratio | 0.08117 | 0.01896 | -76.6% |
| 90th percentile | 0.12339 | 0.11068 | -10.3% |
| 99th percentile | 0.13944 | 0.13649 | -2.1% |
hVQ had lower median error in 42 of 42 layers. The mean per-layer fraction of tokens with higher error was 9.48%. The independently replayed teacher had final-state mean cosine 1.00000000 and energy-weighted squared relative error 0 against the stored teacher across 111,635 tokens. See routed.json for each layer.
The two runs below use the same released embedding, non-expert body, MTP matrices and rounded cache. Their only differing weights are the routed experts. The floor column repeats the original source calculation above.
| Metric | Positions | Floor | Vanilla VQ | hVQ | hVQ − VQ |
|---|---|---|---|---|---|
| KL | all | 0.01593 | 0.62155 | 0.42861 | -0.19294 (-31.0%) |
| KL | generated | 0.00425 | 0.50728 | 0.36490 | -0.14238 (-28.1%) |
| KL | prompt | 0.06083 | 1.06072 | 0.67345 | -0.38727 (-36.5%) |
| Same top-1 as teacher | all | 98.92% | 78.42% | 83.04% | +4.61 pp |
| Same top-1 as teacher | generated | 99.30% | 79.09% | 83.38% | +4.28 pp |
| NLL | all | 1.44250 | 1.61644 | 1.57089 | -0.04555 |
| NLL | generated | 1.25745 | 1.48171 | 1.38172 | -0.09999 |
| Final hidden cosine | all | 0.99444 | 0.82023 | 0.88963 | +0.06940 |
| Top-1 equals the target | generated | 74.57% | 69.83% | 71.78% | +1.95 pp |
The MTP runs use the released body and cache settings. The target is two tokens ahead of the trunk input.
| Metric | Positions | Floor | Vanilla VQ | hVQ | hVQ − VQ |
|---|---|---|---|---|---|
| KL | all | 0.00535 | 0.45485 | 0.29605 | -0.15879 (-34.9%) |
| KL | generated | 0.00239 | 0.46215 | 0.30951 | -0.15264 (-33.0%) |
| KL | prompt | 0.01673 | 0.42678 | 0.24434 | -0.18244 (-42.7%) |
| Same top-1 as teacher | all | 98.95% | 77.46% | 82.65% | +5.19 pp |
| Same top-1 as teacher | generated | 99.15% | 77.25% | 82.26% | +5.01 pp |
| NLL | all | 1.48816 | 1.70654 | 1.59740 | -0.10914 |
| NLL | generated | 1.42986 | 1.68809 | 1.55299 | -0.13510 |
| Final hidden cosine | all | 0.99778 | 0.89394 | 0.93302 | +0.03909 |
| Top-1 equals the target | generated | 71.15% | 66.29% | 68.65% | +2.36 pp |
The JSON files in quality/ contain position counts, per-case results, per-layer routing overlap, artifact hashes and separate prompt, assistant and raw-text scores. The source specifies 1,048,576 positions. The GB10 measurements identify the body and tested workload.
| ERNIE-5.5-Flash-Preview (280B) | MiniMax-M3.1-Flash (428B) | Xing4.1-Preview (285B) | |
|---|---|---|---|
| What grows with the context | 6 MLA + DSA layers of 43 (37 keep one compressed entry per 128 tokens) | all 60 layers: MSA keeps the full history | all 45 layers: MLA + DSA keeps the full history |
| Per token and layer | one 512-wide latent + one 128-wide index key | K + V, 4 heads × 128, + one 128-wide index key | one 512-wide latent with 64 RoPE dims + one 128-wide index key |
| Cache format | fp8_ds_mla 656 B + FP8 key 132 B |
NVFP4 | fp8_ds_mla 656 B + FP8 key 132 B (the formats the architecture is deployed with) |
| Bytes per token, all layers | 4,728 | 38,880 | 35,460 |
| At 1,048,576 tokens | 5.08 GiB with the HCA layers | 37.97 GiB | 34.63 GiB |
DSA's sparsity saves reads, not storage. A query attends the 2,048 tokens its indexer scores highest, but any token can be chosen later, so every layer keeps every token. Beside 82.86 GiB of R13+8 experts and an 8.84 GiB body, 34.63 GiB of cache does not fit in a GB10.
The indexer is what makes the latent rows safe to move off the device. Its keys must stay resident, because every step scores all of them (6.23 GB of keys at 1M). The runtime uses those selected positions to fetch older latent rows.
ds4-dfm-rs already runs this pattern for MiniMax-M3.1-Flash (index keys resident, K/V blocks on SSD), and reads the Engram records of DeepSeek-V4.1 and Hy4 and Qwen3.8's per-layer embedding rows from SSD the same way: a small resident index decides which records to read. MiniMax selects 128-token blocks; DSA selects single tokens, so the reads here are smaller and more scattered. A native-context Q4_K request recorded 10,315,423 cold reads totaling 1.54 TB of logical data. Single-bank cold request
Planned, against the 117.2 GiB a GB10 reported available to ds4-server --check-config for earlier releases:
| GiB | |
|---|---|
| Routed experts, 42 layers × 13-bit (codes, gains, codebooks) | 51.36 |
| 8-bit residual stage, 42 layers | 31.50 |
| Body (Q8_0 matrices; routers, norms, indexer key and weight projections at source precision) | 8.84 |
| MTP block, optional drafter: routed experts R13+8 | 1.97 |
| MTP block: matrices Q8_0, norms | 0.20 |
| DSA index keys FP8, 45 layers × 1,048,576 × 132 B | 5.80 |
| DSA index keys of the MTP block | 0.13 |
| MLA latent pool, 196,608 tokens × 45 layers × 656 B | 5.41 |
| MLA latent pool of the MTP block | 0.12 |
| Graph scratch, 4,096-row prefill chunks (estimate) | 3.00 |
| Floor kept free by the server | 4.00 |
| Planned allocation, drafter on | 108.34 |
| Allocation plus 4 GiB free floor | 112.34 of 117.2 |
| Allocation plus floor, drafter off | 109.91 |
| On SSD per 1M session: MLA latent rows, 45 layers | 28.83 |
| Additional latent rows on SSD with the MTP block active | 0.64 |
| On SSD, read by row: token embedding (BF16) | 1.00 |
With the drafter disabled, keeping every trunk latent row resident needs 34.63 GiB of cache and leaves 15.37 GiB above the 13-bit
stage: the residual stage on 20 layers instead of 42. A larger pool only saves SSD reads; the residual stage lowers
the expert error of every layer. memory-budget.json and tools/memory_budget.py reproduce every row from the
checkpoint's tensor inventory.
One decoded token reads 12.27 GB of weights: 2.78 GB of routed experts (8 of 256 per layer) and the 9.49 GB body.
A GB10 CUDA block can use 101,376 bytes of shared memory. R13, a 64 KiB book, is the widest base codebook that fits the expert kernels. The 8-bit residual stage adds a 2 KiB book. R14 (128 KiB) does not fit. R13+8 is the stage ds4-dfm-rs already runs for GLM-5.3, MiniMax-M3.1-Flash and ERNIE 5.5, and the widest expert format this runtime has, so every MoE layer takes it and no layer selection is needed.
W[r, 8j + d] = float32(gain[r]) * (float32(C1[i1[r, j]][d]) + float32(C2[i2[r, j]][d]))
All three fill the same container. They differ in what the fit knows about the expert's input.
| Codebook | Index assignment | Row gain | |
|---|---|---|---|
| VQ | Lloyd on the weights | nearest codeword | RMS |
| iVQ | Lloyd weighted by the diagonal of each expert's input second moment | nearest under the same diagonal weight | weighted least squares |
| hVQ | the iVQ codebook, frozen | 8-column blocks in order; each block's target absorbs the error of the earlier blocks through the expert's full input second moment (GPTQ-style) | least squares under the same full moment |
The primary control uses unweighted Lloyd and nearest assignments on the original weights alone at the same R13+8 budget. Its comparison with hVQ measures calibration weighting and error feedback together.
xing41p-vq8-r13x42-r8x42-mtp1-q8-fp8idx-ssdlat-embssd-v1
sum x x^T / mean(x^2) (gate/up,
4,096 × 4,096) and sum a a^T / mean(a^2) (down, 2,048 × 2,048), shrunk with a prior of 4,096 tokens.
H = V V^T with V upper triangular. Blocks of 8 columns in ascending order: target
w_B + r V_BB^-1 with r the feedback of the earlier blocks through V, nearest codeword under
V_BB V_BB^T. t = 1, no damping. Two passes, with least-squares row gains under H after each.E = w - g C1[i1] with the stage-1 gains, one
hVQ pass through the same factor of H. The 13-bit stage is byte-identical with and without it.eh_proj([enorm(embed) | hnorm(hidden)])) and runs one MLA + DSA MoE block. Its experts are calibrated on its
own inputs and stored like a trunk layer.The calibration corpus contains 3,923,078 tokens in 1,700 rows. The held-out set comprises 111,635 tokens in 25 cases. Both use the source tokenizer and chat template. Of the calibration tokens, 74.58% fall in rows longer than the 2,048-key DSA selection threshold. The longest calibration row contains 43,125 tokens. The overlap check found 776 shared 64-token windows of repeated boilerplate and zero violating windows. See calibration/check_report.json and the row manifests for counts, sources and checks.
On a single 8,192-token row, the FP32 reference scored 2.87195 nats/token. Emulating the FP8 MLA latent, BF16 RoPE key and FP8 index raised NLL to 2.88256. Mean KL from the reference was 0.23573 nats and top-1 agreement was 83.34%. These results measure the cache arithmetic on the original BF16 weights. Per-row data and the dense transcription comparison are in quality/probe-numerics.json and quality/selftest.json. The held-out results below measure hVQ with the same cache arithmetic. The Spark workload and serving checks are recorded in 2K–64K throughput on GB10.
The parts are independent GGUF files listed in release.json, not numbered GGUF splits.
| Part | Content | Size |
|---|---|---|
layer-03-experts.gguf … layer-44-experts.gguf |
routed experts of one MoE layer, hVQ R13+8 | ≈ 2.12 GB each |
body-nonexpert.gguf |
attention, indexer, shared experts, dense FFN, routers, norms, output head | ≈ 9.49 GB |
embed-tokens-bf16.gguf |
model.embed_tokens.weight, read by row from SSD |
1.07 GB |
layer-45-experts.gguf |
routed experts of the MTP block, hVQ R13+8 | ≈ 2.12 GB |
mtp-q8_0.gguf |
every other tensor of the MTP block | ≈ 0.21 GB |
release.json, tensor-manifest.json, recipe.json, memory-budget.json, files.json, SHA256SUMS |
entry point, tensor map, recipe, budget, hashes | |
FORMAT.md, tools/, calibration/, quality/ |
byte format, the tools as run, calibration manifest, measurements |
ds4-server --check-config on a GB10 replaces these numbers.modeling_deepseek.py has no indexer and attends densely. The DSA semantics used for the reference
forward are those of the DeepSeek-V3.2 architecture the config names (DeepseekV32ForCausalLM).tools/vq_calib), the SSD tiers.Xing4.1-Preview is released under the Apache License 2.0; the GGUF parts here are quantized derivatives of those weights under the same license. The quantization tools are MIT. This repository is not provided, operated or endorsed by China Telecom or XingChen-AGI.
Cite the source model: arXiv:2611.22115.