DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw
14
8 commits
3 linked in READMEs
updated Oct 17, 2026

TL;DR — EXL3 quantization of deepseek-ai/DeepSeek-V4.1-Flash-1017 at 2.90 bpw (196.3 GiB). On held-out text its perplexity is +1.8% (code) / +0.4% (prose) above the unquantized model. Tensor names, dtypes and per-tensor bitrates match Mia-AiLab/DeepSeek-V4.1-Flash-EXL3-2.9bpw tensor for tensor, so the MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks serving kit's bundled K map describes it unchanged. The two Engram tables are not in this repo: take them from the 1017 base repo, because they changed in this release.
| Base model | deepseek-ai/DeepSeek-V4.1-Flash-1017 (MIT) |
| Format | EXL3 trellis, mul1 codebook, output channel scales always |
| Bitrate | 2.90 bpw over the quantized trunk weights, head 6 bpw |
| Size | 210.7 GB (196.3 GiB), 43 safetensors shards |
| Perplexity vs unquantized | code 1.9094 vs 1.8749, prose 6.4520 vs 6.4277 |
| Engram tables | not included; shards 47 + 48 of the base repo |
| Vision tower | included, BF16 |
| MTP / DSpark drafter | included |
| Other releases | LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpw · LibertAIDAI/DeepSeek-V4.1-Flash-1017-NVFP4 |
| Group | Tensors | Stored as | Notes |
|---|---|---|---|
| Routed experts | layers.N.ffn.experts.E.w1/w2/w3, 384 per layer | EXL3 3 bpw; layers 18-22: 2 bpw | one K per layer for all 1,152 matrices (the kit's MoE loader needs that) |
| Shared expert | layers.N.ffn.shared_experts.w1/w2/w3 | EXL3 5 bpw on layers 0-10, 30-39; 4 bpw on 11-28 | layer 29: w1/w3 4, w2 5 |
| Attention | wq_a, wq_b, wkv, wo_a.slice.0..7, wo_b | EXL3 5 bpw | layer 0 wq_a / wkv: 6 bpw; wo_a stored as 8 per-group slices |
| KV compressor | attn.compressor.wkv / wgate (layers 2, 8, 14, 20) | EXL3 5 bpw | compressor.norm BF16 |
| Indexer | attn.indexer.wq_b (layers 2, 8, 14, 20, 24, 28, 32, 36); indexer.wk (2, 8, 14, 20) | EXL3 5 bpw; wk 8 bpw | weights_proj FP16, k_norm BF16 |
| Engram projection | layers.1/14.engram.wkv | EXL3 5 bpw (layer 1), 4 bpw (layer 14) | q_weight / k_weight FP32 |
| Engram n-gram tables | layers.1/14.engram.embed | not in this repo | read unquantized from the base checkpoint, see below |
| Output head | head | EXL3 6 bpw | |
| MTP / DSpark drafter, routed experts | mtp.0-2.ffn.experts.*, 128 per block | EXL3 4 bpw | matches the kit's mtp_bits 4 |
| MTP / DSpark drafter, dense | attention, shared expert, mtp.0.main_proj | EXL3 6 bpw | 4 bpw in the earlier V4.1 release |
| Token embedding | embed | BF16 | |
| Router | ffn.gate.weight / gate.bias / gate.bias_vl | FP16 / FP16 / FP32 | gate.bias_vl = routing bias for image tokens |
| mHC streams, attention sinks | hc_attn_*, hc_ffn_*, attn.attn_sink | FP32 | |
| Norms | all RMSNorm weights | BF16 | |
| DSpark heads | mtp.2.markov_head.*, mtp.2.confidence_head.proj | BF16 / FP16 | |
| Vision tower + aligner | vision.*, aligner.*, image_start/end/newline | BF16 | copied from the base checkpoint unchanged |
Every EXL3 matrix is stored as trellis (int16) + suh / svh (fp16) + mul1 (int32 codebook marker).
Two held-out sets of unpublished text, 32 sequences x 2048 tokens each, tokens 2-2048 of every sequence scored (65,504 tokens per set). Every row uses the same full-sequence forward (see How it was made).
| Model | Size | code | prose |
|---|---|---|---|
| Unquantized (base FP8 / MXFP4 weights, dequantized) | — | 1.8749 | 6.4277 |
| EXL3 2.9 bpw (this repo) | 196.3 GiB | 1.9094 | 6.4520 |
| EXL3 3.5 bpw | 239.9 GiB | 1.8895 | 6.4341 |
| This repo with Engram switched off (sanity check) | 4.1648 | 9.0627 |
DeepSeek-V4.1 adds two Engram n-gram lookup tables (layers.1.engram.embed, layers.14.engram.embed: FP8 with E8M0 block scales, ~95 GiB each). They are used unquantized and come from the base checkpoint, like in the existing V4.1 EXL3 serving stacks. The 1017 tables are new: the shards from the older deepseek-ai/DeepSeek-V4.1-Flash must not be reused.
| File from deepseek-ai/DeepSeek-V4.1-Flash-1017 | Bytes | sha256 |
|---|---|---|
model-00047-of-00048.safetensors | 101,535,150,936 | 76a05106ece259be83d1bfea0dcb54f23377864ee60fd321690f35e6698a2af5 |
model-00048-of-00048.safetensors | 101,537,926,640 | 9dc51433e195bc78b5ad846b68643cc0351d3b174e5e4309222d3b7402c83afd |
model.safetensors.index.json, config.json | needed for engram_layer_ids / engram_num_embeddings |
hf download deepseek-ai/DeepSeek-V4.1-Flash-1017 \
--include model-00047-of-00048.safetensors model-00048-of-00048.safetensors model.safetensors.index.json config.json \
--local-dir ./engram-src-1017
sha256sum engram-src-1017/model-0004[78]-of-00048.safetensors
The checkpoint follows the layout of Mia-AiLab/DeepSeek-V4.1-Flash-EXL3-2.9bpw, so it targets the vLLM-based MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks kit (2x DGX Spark, TP=2). The settings below come from the kit's start.sh / download.sh (commit 6f7d159). Upstream exllamav3 has no DeepseekV41 model class yet, so it cannot load this checkpoint directly.
Fresh install (on the head node, from the kit checkout):
git clone https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks
cd DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks
cp .env.example .env
cat >> .env <<'EOF'
HF_MODEL_REPO=LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw
MODEL_HOST=$PWD/model-1017-2.9bpw
EXPECTED_SHARDS=43
HF_ENGRAM_REPO=deepseek-ai/DeepSeek-V4.1-Flash-1017
ENGRAM_DIR=./engram-src-1017
EOF
./download.sh # optional: stage both downloads first
./start.sh
.env is sourced by bash, so $PWD expands to the kit directory when the scripts are run from it.
The kit's bundled files/exl3_k_map.json already matches this checkpoint (this repo's exl3_k_map.json has the same values for every key), so KMAP_HOST can stay at its default.
Switching an existing V4.1 install — the kit reuses anything already on disk, so make sure nothing old gets picked up:
| What | Why | Do |
|---|---|---|
MODEL_HOST | weights are only downloaded when fewer than EXPECTED_SHARDS shards are present, so an old 39-shard tree is served as-is | point it at a new directory (as above) |
ENGRAM_DIR | the Engram fetch only fills missing files, so old shards 47 / 48 would stay | new directory (as above); check the sha256 |
Packed Engram (./start.sh pack, ~/dsv41-engram on both nodes) | used automatically whenever engram-l1-r*of2.bin exists | delete it or set HEAD_PACKED_DIR / WORKER_PACKED_DIR to new paths, then re-run ./start.sh pack |
WEIGHT_SYNC=rsync worker copies | skipped when the .dsv41-exl3-synced / .dsv41-engram-synced markers exist | new WORKER_MODEL_DIR / WORKER_ENGRAM_DIR |
| Step | Details |
|---|---|
| Quantizer | exllamav3 dev branch (ba2feb2, 1.6.2), its own convert.py pipeline: per-module Hessian capture, LDLQ + trellis encoding |
| Architecture | a DeepseekV41 model definition written for this release against DeepSeek's reference inference/model.py / inference/engram.py: lagged-pre mHC residual streams, compress ratios 0 / 2 / 1 with cross-layer KV / indexer / candidate sharing, Engram lookups, sqrt-softplus routing, the reference FP8 / FP4 activation quantization inside attention |
| Forward check | the same forward on the unquantized weights gives the perplexity in the table above (code 1.8749 / prose 6.4277) |
| Calibration | exllamav3 default mix (C4, code, multilingual, technical, Wikipedia, TinyStories, random-token rows), 250 rows x 2048 tokens |
| MoE capture | every routed expert sees every calibration token (exllamav3's default for MoE models) |
| MTP / DSpark | quantized without calibration data |
| Bitrate plan | explicit per-tensor recipe, integer bitrates only, one K per routed-expert layer |
| Validation | held-out perplexity, Engram on / off, chat smoke test with the base repo's encoding/encoding.py (below) |
chat: What is 17*19? Reply with the integer only.
323<|end▁of▁sentence|>
chat: Explain in three sentences why the sky is blue.
Sunlight contains all colors, but air molecules scatter short blue wavelengths much more than longer red ones—a process called Rayleigh scattering. This scattered blue light reaches your eyes from all directions, making the sky appear blue. At sunrise and sunset, light travels through more atmosphere, so blue is scattered away and reds and oranges dominate.<|end▁of▁sentence|>
thinking: A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?
We need answer classic. Need be careful: ball 0.05, bat 1.05. Explain concise.</think>The ball costs **$0.05** (5 cents).
The bat costs $1.05, so together they total $1.10.<|end▁of▁sentence|>
| File | Content |
|---|---|
model-000NN-of-00043.safetensors, model.safetensors.index.json | weights |
config.json | base config plus quantization_config (same keys as the earlier V4.1 EXL3 release) and engram_table_dir: null |
exl3_k_map.json | per-tensor K in the kit's files/exl3_k_map.json schema, generated from these shards |
quantization_config.json | per-tensor storage map written by exllamav3 |
tokenizer.json, tokenizer_config.json, LICENSE, encoding/ | copied from the base repo (encoding/ is DeepSeek's prompt-format reference) |
MIT, same as the base model.
DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw
14
8 commits
3 linked in READMEs
updated Oct 17, 2026

TL;DR — EXL3 quantization of deepseek-ai/DeepSeek-V4.1-Flash-1017 at 2.90 bpw (196.3 GiB). On held-out text its perplexity is +1.8% (code) / +0.4% (prose) above the unquantized model. Tensor names, dtypes and per-tensor bitrates match Mia-AiLab/DeepSeek-V4.1-Flash-EXL3-2.9bpw tensor for tensor, so the MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks serving kit's bundled K map describes it unchanged. The two Engram tables are not in this repo: take them from the 1017 base repo, because they changed in this release.
| Base model | deepseek-ai/DeepSeek-V4.1-Flash-1017 (MIT) |
| Format | EXL3 trellis, mul1 codebook, output channel scales always |
| Bitrate | 2.90 bpw over the quantized trunk weights, head 6 bpw |
| Size | 210.7 GB (196.3 GiB), 43 safetensors shards |
| Perplexity vs unquantized | code 1.9094 vs 1.8749, prose 6.4520 vs 6.4277 |
| Engram tables | not included; shards 47 + 48 of the base repo |
| Vision tower | included, BF16 |
| MTP / DSpark drafter | included |
| Other releases | LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpw · LibertAIDAI/DeepSeek-V4.1-Flash-1017-NVFP4 |
| Group | Tensors | Stored as | Notes |
|---|---|---|---|
| Routed experts | layers.N.ffn.experts.E.w1/w2/w3, 384 per layer | EXL3 3 bpw; layers 18-22: 2 bpw | one K per layer for all 1,152 matrices (the kit's MoE loader needs that) |
| Shared expert | layers.N.ffn.shared_experts.w1/w2/w3 | EXL3 5 bpw on layers 0-10, 30-39; 4 bpw on 11-28 | layer 29: w1/w3 4, w2 5 |
| Attention | wq_a, wq_b, wkv, wo_a.slice.0..7, wo_b | EXL3 5 bpw | layer 0 wq_a / wkv: 6 bpw; wo_a stored as 8 per-group slices |
| KV compressor | attn.compressor.wkv / wgate (layers 2, 8, 14, 20) | EXL3 5 bpw | compressor.norm BF16 |
| Indexer | attn.indexer.wq_b (layers 2, 8, 14, 20, 24, 28, 32, 36); indexer.wk (2, 8, 14, 20) | EXL3 5 bpw; wk 8 bpw | weights_proj FP16, k_norm BF16 |
| Engram projection | layers.1/14.engram.wkv | EXL3 5 bpw (layer 1), 4 bpw (layer 14) | q_weight / k_weight FP32 |
| Engram n-gram tables | layers.1/14.engram.embed | not in this repo | read unquantized from the base checkpoint, see below |
| Output head | head | EXL3 6 bpw | |
| MTP / DSpark drafter, routed experts | mtp.0-2.ffn.experts.*, 128 per block | EXL3 4 bpw | matches the kit's mtp_bits 4 |
| MTP / DSpark drafter, dense | attention, shared expert, mtp.0.main_proj | EXL3 6 bpw | 4 bpw in the earlier V4.1 release |
| Token embedding | embed | BF16 | |
| Router | ffn.gate.weight / gate.bias / gate.bias_vl | FP16 / FP16 / FP32 | gate.bias_vl = routing bias for image tokens |
| mHC streams, attention sinks | hc_attn_*, hc_ffn_*, attn.attn_sink | FP32 | |
| Norms | all RMSNorm weights | BF16 | |
| DSpark heads | mtp.2.markov_head.*, mtp.2.confidence_head.proj | BF16 / FP16 | |
| Vision tower + aligner | vision.*, aligner.*, image_start/end/newline | BF16 | copied from the base checkpoint unchanged |
Every EXL3 matrix is stored as trellis (int16) + suh / svh (fp16) + mul1 (int32 codebook marker).
Two held-out sets of unpublished text, 32 sequences x 2048 tokens each, tokens 2-2048 of every sequence scored (65,504 tokens per set). Every row uses the same full-sequence forward (see How it was made).
| Model | Size | code | prose |
|---|---|---|---|
| Unquantized (base FP8 / MXFP4 weights, dequantized) | — | 1.8749 | 6.4277 |
| EXL3 2.9 bpw (this repo) | 196.3 GiB | 1.9094 | 6.4520 |
| EXL3 3.5 bpw | 239.9 GiB | 1.8895 | 6.4341 |
| This repo with Engram switched off (sanity check) | 4.1648 | 9.0627 |
DeepSeek-V4.1 adds two Engram n-gram lookup tables (layers.1.engram.embed, layers.14.engram.embed: FP8 with E8M0 block scales, ~95 GiB each). They are used unquantized and come from the base checkpoint, like in the existing V4.1 EXL3 serving stacks. The 1017 tables are new: the shards from the older deepseek-ai/DeepSeek-V4.1-Flash must not be reused.
| File from deepseek-ai/DeepSeek-V4.1-Flash-1017 | Bytes | sha256 |
|---|---|---|
model-00047-of-00048.safetensors | 101,535,150,936 | 76a05106ece259be83d1bfea0dcb54f23377864ee60fd321690f35e6698a2af5 |
model-00048-of-00048.safetensors | 101,537,926,640 | 9dc51433e195bc78b5ad846b68643cc0351d3b174e5e4309222d3b7402c83afd |
model.safetensors.index.json, config.json | needed for engram_layer_ids / engram_num_embeddings |
hf download deepseek-ai/DeepSeek-V4.1-Flash-1017 \
--include model-00047-of-00048.safetensors model-00048-of-00048.safetensors model.safetensors.index.json config.json \
--local-dir ./engram-src-1017
sha256sum engram-src-1017/model-0004[78]-of-00048.safetensors
The checkpoint follows the layout of Mia-AiLab/DeepSeek-V4.1-Flash-EXL3-2.9bpw, so it targets the vLLM-based MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks kit (2x DGX Spark, TP=2). The settings below come from the kit's start.sh / download.sh (commit 6f7d159). Upstream exllamav3 has no DeepseekV41 model class yet, so it cannot load this checkpoint directly.
Fresh install (on the head node, from the kit checkout):
git clone https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks
cd DeepSeek-v4.1-Flash-EXL3-2x-DGX-Sparks
cp .env.example .env
cat >> .env <<'EOF'
HF_MODEL_REPO=LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw
MODEL_HOST=$PWD/model-1017-2.9bpw
EXPECTED_SHARDS=43
HF_ENGRAM_REPO=deepseek-ai/DeepSeek-V4.1-Flash-1017
ENGRAM_DIR=./engram-src-1017
EOF
./download.sh # optional: stage both downloads first
./start.sh
.env is sourced by bash, so $PWD expands to the kit directory when the scripts are run from it.
The kit's bundled files/exl3_k_map.json already matches this checkpoint (this repo's exl3_k_map.json has the same values for every key), so KMAP_HOST can stay at its default.
Switching an existing V4.1 install — the kit reuses anything already on disk, so make sure nothing old gets picked up:
| What | Why | Do |
|---|---|---|
MODEL_HOST | weights are only downloaded when fewer than EXPECTED_SHARDS shards are present, so an old 39-shard tree is served as-is | point it at a new directory (as above) |
ENGRAM_DIR | the Engram fetch only fills missing files, so old shards 47 / 48 would stay | new directory (as above); check the sha256 |
Packed Engram (./start.sh pack, ~/dsv41-engram on both nodes) | used automatically whenever engram-l1-r*of2.bin exists | delete it or set HEAD_PACKED_DIR / WORKER_PACKED_DIR to new paths, then re-run ./start.sh pack |
WEIGHT_SYNC=rsync worker copies | skipped when the .dsv41-exl3-synced / .dsv41-engram-synced markers exist | new WORKER_MODEL_DIR / WORKER_ENGRAM_DIR |
| Step | Details |
|---|---|
| Quantizer | exllamav3 dev branch (ba2feb2, 1.6.2), its own convert.py pipeline: per-module Hessian capture, LDLQ + trellis encoding |
| Architecture | a DeepseekV41 model definition written for this release against DeepSeek's reference inference/model.py / inference/engram.py: lagged-pre mHC residual streams, compress ratios 0 / 2 / 1 with cross-layer KV / indexer / candidate sharing, Engram lookups, sqrt-softplus routing, the reference FP8 / FP4 activation quantization inside attention |
| Forward check | the same forward on the unquantized weights gives the perplexity in the table above (code 1.8749 / prose 6.4277) |
| Calibration | exllamav3 default mix (C4, code, multilingual, technical, Wikipedia, TinyStories, random-token rows), 250 rows x 2048 tokens |
| MoE capture | every routed expert sees every calibration token (exllamav3's default for MoE models) |
| MTP / DSpark | quantized without calibration data |
| Bitrate plan | explicit per-tensor recipe, integer bitrates only, one K per routed-expert layer |
| Validation | held-out perplexity, Engram on / off, chat smoke test with the base repo's encoding/encoding.py (below) |
chat: What is 17*19? Reply with the integer only.
323<|end▁of▁sentence|>
chat: Explain in three sentences why the sky is blue.
Sunlight contains all colors, but air molecules scatter short blue wavelengths much more than longer red ones—a process called Rayleigh scattering. This scattered blue light reaches your eyes from all directions, making the sky appear blue. At sunrise and sunset, light travels through more atmosphere, so blue is scattered away and reds and oranges dominate.<|end▁of▁sentence|>
thinking: A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?
We need answer classic. Need be careful: ball 0.05, bat 1.05. Explain concise.</think>The ball costs **$0.05** (5 cents).
The bat costs $1.05, so together they total $1.10.<|end▁of▁sentence|>
| File | Content |
|---|---|
model-000NN-of-00043.safetensors, model.safetensors.index.json | weights |
config.json | base config plus quantization_config (same keys as the earlier V4.1 EXL3 release) and engram_table_dir: null |
exl3_k_map.json | per-tensor K in the kit's files/exl3_k_map.json schema, generated from these shards |
quantization_config.json | per-tensor storage map written by exllamav3 |
tokenizer.json, tokenizer_config.json, LICENSE, encoding/ | copied from the base repo (encoding/ is DeepSeek's prompt-format reference) |
MIT, same as the base model.