LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw

Model

DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw

14

8 commits

3 linked in READMEs

updated Oct 17, 2026

See the code

README

DeepSeek-V4.1-Flash-1017 EXL3 2.9 bpw: 196 GiB, perplexity +1.8% code / +0.4% prose vs the base model, same per-tensor bitrate as the V4.1 EXL3 kit

DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw

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 modeldeepseek-ai/DeepSeek-V4.1-Flash-1017 (MIT)
FormatEXL3 trellis, mul1 codebook, output channel scales always
Bitrate2.90 bpw over the quantized trunk weights, head 6 bpw
Size210.7 GB (196.3 GiB), 43 safetensors shards
Perplexity vs unquantizedcode 1.9094 vs 1.8749, prose 6.4520 vs 6.4277
Engram tablesnot included; shards 47 + 48 of the base repo
Vision towerincluded, BF16
MTP / DSpark drafterincluded
Other releasesLibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpw · LibertAIDAI/DeepSeek-V4.1-Flash-1017-NVFP4

Tensor groups

GroupTensorsStored asNotes
Routed expertslayers.N.ffn.experts.E.w1/w2/w3, 384 per layerEXL3 3 bpw; layers 18-22: 2 bpwone K per layer for all 1,152 matrices (the kit's MoE loader needs that)
Shared expertlayers.N.ffn.shared_experts.w1/w2/w3EXL3 5 bpw on layers 0-10, 30-39; 4 bpw on 11-28layer 29: w1/w3 4, w2 5
Attentionwq_a, wq_b, wkv, wo_a.slice.0..7, wo_bEXL3 5 bpwlayer 0 wq_a / wkv: 6 bpw; wo_a stored as 8 per-group slices
KV compressorattn.compressor.wkv / wgate (layers 2, 8, 14, 20)EXL3 5 bpwcompressor.norm BF16
Indexerattn.indexer.wq_b (layers 2, 8, 14, 20, 24, 28, 32, 36); indexer.wk (2, 8, 14, 20)EXL3 5 bpw; wk 8 bpwweights_proj FP16, k_norm BF16
Engram projectionlayers.1/14.engram.wkvEXL3 5 bpw (layer 1), 4 bpw (layer 14)q_weight / k_weight FP32
Engram n-gram tableslayers.1/14.engram.embednot in this reporead unquantized from the base checkpoint, see below
Output headheadEXL3 6 bpw
MTP / DSpark drafter, routed expertsmtp.0-2.ffn.experts.*, 128 per blockEXL3 4 bpwmatches the kit's mtp_bits 4
MTP / DSpark drafter, denseattention, shared expert, mtp.0.main_projEXL3 6 bpw4 bpw in the earlier V4.1 release
Token embeddingembedBF16
Routerffn.gate.weight / gate.bias / gate.bias_vlFP16 / FP16 / FP32gate.bias_vl = routing bias for image tokens
mHC streams, attention sinkshc_attn_*, hc_ffn_*, attn.attn_sinkFP32
Normsall RMSNorm weightsBF16
DSpark headsmtp.2.markov_head.*, mtp.2.confidence_head.projBF16 / FP16
Vision tower + alignervision.*, aligner.*, image_start/end/newlineBF16copied from the base checkpoint unchanged

Every EXL3 matrix is stored as trellis (int16) + suh / svh (fp16) + mul1 (int32 codebook marker).

Perplexity

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).

ModelSizecodeprose
Unquantized (base FP8 / MXFP4 weights, dequantized)—1.87496.4277
EXL3 2.9 bpw (this repo)196.3 GiB1.90946.4520
EXL3 3.5 bpw239.9 GiB1.88956.4341
This repo with Engram switched off (sanity check)4.16489.0627

Engram tables (required)

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-1017Bytessha256
model-00047-of-00048.safetensors101,535,150,93676a05106ece259be83d1bfea0dcb54f23377864ee60fd321690f35e6698a2af5
model-00048-of-00048.safetensors101,537,926,6409dc51433e195bc78b5ad846b68643cc0351d3b174e5e4309222d3b7402c83afd
model.safetensors.index.json, config.jsonneeded 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

Serving

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:

WhatWhyDo
MODEL_HOSTweights are only downloaded when fewer than EXPECTED_SHARDS shards are present, so an old 39-shard tree is served as-ispoint it at a new directory (as above)
ENGRAM_DIRthe Engram fetch only fills missing files, so old shards 47 / 48 would staynew directory (as above); check the sha256
Packed Engram (./start.sh pack, ~/dsv41-engram on both nodes)used automatically whenever engram-l1-r*of2.bin existsdelete it or set HEAD_PACKED_DIR / WORKER_PACKED_DIR to new paths, then re-run ./start.sh pack
WEIGHT_SYNC=rsync worker copiesskipped when the .dsv41-exl3-synced / .dsv41-engram-synced markers existnew WORKER_MODEL_DIR / WORKER_ENGRAM_DIR

How it was made

StepDetails
Quantizerexllamav3 dev branch (ba2feb2, 1.6.2), its own convert.py pipeline: per-module Hessian capture, LDLQ + trellis encoding
Architecturea 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 checkthe same forward on the unquantized weights gives the perplexity in the table above (code 1.8749 / prose 6.4277)
Calibrationexllamav3 default mix (C4, code, multilingual, technical, Wikipedia, TinyStories, random-token rows), 250 rows x 2048 tokens
MoE captureevery routed expert sees every calibration token (exllamav3's default for MoE models)
MTP / DSparkquantized without calibration data
Bitrate planexplicit per-tensor recipe, integer bitrates only, one K per routed-expert layer
Validationheld-out perplexity, Engram on / off, chat smoke test with the base repo's encoding/encoding.py (below)
Smoke test outputs (greedy decoding)

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|>

Files

FileContent
model-000NN-of-00043.safetensors, model.safetensors.index.jsonweights
config.jsonbase config plus quantization_config (same keys as the earlier V4.1 EXL3 release) and engram_table_dir: null
exl3_k_map.jsonper-tensor K in the kit's files/exl3_k_map.json schema, generated from these shards
quantization_config.jsonper-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)

Credits

License

MIT, same as the base model.

deepseek
deepseek_v41
exl3
exllamav3
quantized
safetensors
text-generation

LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw

Model

DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw

14

8 commits

3 linked in READMEs

updated Oct 17, 2026

See the code

README

DeepSeek-V4.1-Flash-1017 EXL3 2.9 bpw: 196 GiB, perplexity +1.8% code / +0.4% prose vs the base model, same per-tensor bitrate as the V4.1 EXL3 kit

DeepSeek-V4.1-Flash-1017 · EXL3 2.9 bpw

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 modeldeepseek-ai/DeepSeek-V4.1-Flash-1017 (MIT)
FormatEXL3 trellis, mul1 codebook, output channel scales always
Bitrate2.90 bpw over the quantized trunk weights, head 6 bpw
Size210.7 GB (196.3 GiB), 43 safetensors shards
Perplexity vs unquantizedcode 1.9094 vs 1.8749, prose 6.4520 vs 6.4277
Engram tablesnot included; shards 47 + 48 of the base repo
Vision towerincluded, BF16
MTP / DSpark drafterincluded
Other releasesLibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpw · LibertAIDAI/DeepSeek-V4.1-Flash-1017-NVFP4

Tensor groups

GroupTensorsStored asNotes
Routed expertslayers.N.ffn.experts.E.w1/w2/w3, 384 per layerEXL3 3 bpw; layers 18-22: 2 bpwone K per layer for all 1,152 matrices (the kit's MoE loader needs that)
Shared expertlayers.N.ffn.shared_experts.w1/w2/w3EXL3 5 bpw on layers 0-10, 30-39; 4 bpw on 11-28layer 29: w1/w3 4, w2 5
Attentionwq_a, wq_b, wkv, wo_a.slice.0..7, wo_bEXL3 5 bpwlayer 0 wq_a / wkv: 6 bpw; wo_a stored as 8 per-group slices
KV compressorattn.compressor.wkv / wgate (layers 2, 8, 14, 20)EXL3 5 bpwcompressor.norm BF16
Indexerattn.indexer.wq_b (layers 2, 8, 14, 20, 24, 28, 32, 36); indexer.wk (2, 8, 14, 20)EXL3 5 bpw; wk 8 bpwweights_proj FP16, k_norm BF16
Engram projectionlayers.1/14.engram.wkvEXL3 5 bpw (layer 1), 4 bpw (layer 14)q_weight / k_weight FP32
Engram n-gram tableslayers.1/14.engram.embednot in this reporead unquantized from the base checkpoint, see below
Output headheadEXL3 6 bpw
MTP / DSpark drafter, routed expertsmtp.0-2.ffn.experts.*, 128 per blockEXL3 4 bpwmatches the kit's mtp_bits 4
MTP / DSpark drafter, denseattention, shared expert, mtp.0.main_projEXL3 6 bpw4 bpw in the earlier V4.1 release
Token embeddingembedBF16
Routerffn.gate.weight / gate.bias / gate.bias_vlFP16 / FP16 / FP32gate.bias_vl = routing bias for image tokens
mHC streams, attention sinkshc_attn_*, hc_ffn_*, attn.attn_sinkFP32
Normsall RMSNorm weightsBF16
DSpark headsmtp.2.markov_head.*, mtp.2.confidence_head.projBF16 / FP16
Vision tower + alignervision.*, aligner.*, image_start/end/newlineBF16copied from the base checkpoint unchanged

Every EXL3 matrix is stored as trellis (int16) + suh / svh (fp16) + mul1 (int32 codebook marker).

Perplexity

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).

ModelSizecodeprose
Unquantized (base FP8 / MXFP4 weights, dequantized)—1.87496.4277
EXL3 2.9 bpw (this repo)196.3 GiB1.90946.4520
EXL3 3.5 bpw239.9 GiB1.88956.4341
This repo with Engram switched off (sanity check)4.16489.0627

Engram tables (required)

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-1017Bytessha256
model-00047-of-00048.safetensors101,535,150,93676a05106ece259be83d1bfea0dcb54f23377864ee60fd321690f35e6698a2af5
model-00048-of-00048.safetensors101,537,926,6409dc51433e195bc78b5ad846b68643cc0351d3b174e5e4309222d3b7402c83afd
model.safetensors.index.json, config.jsonneeded 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

Serving

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:

WhatWhyDo
MODEL_HOSTweights are only downloaded when fewer than EXPECTED_SHARDS shards are present, so an old 39-shard tree is served as-ispoint it at a new directory (as above)
ENGRAM_DIRthe Engram fetch only fills missing files, so old shards 47 / 48 would staynew directory (as above); check the sha256
Packed Engram (./start.sh pack, ~/dsv41-engram on both nodes)used automatically whenever engram-l1-r*of2.bin existsdelete it or set HEAD_PACKED_DIR / WORKER_PACKED_DIR to new paths, then re-run ./start.sh pack
WEIGHT_SYNC=rsync worker copiesskipped when the .dsv41-exl3-synced / .dsv41-engram-synced markers existnew WORKER_MODEL_DIR / WORKER_ENGRAM_DIR

How it was made

StepDetails
Quantizerexllamav3 dev branch (ba2feb2, 1.6.2), its own convert.py pipeline: per-module Hessian capture, LDLQ + trellis encoding
Architecturea 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 checkthe same forward on the unquantized weights gives the perplexity in the table above (code 1.8749 / prose 6.4277)
Calibrationexllamav3 default mix (C4, code, multilingual, technical, Wikipedia, TinyStories, random-token rows), 250 rows x 2048 tokens
MoE captureevery routed expert sees every calibration token (exllamav3's default for MoE models)
MTP / DSparkquantized without calibration data
Bitrate planexplicit per-tensor recipe, integer bitrates only, one K per routed-expert layer
Validationheld-out perplexity, Engram on / off, chat smoke test with the base repo's encoding/encoding.py (below)
Smoke test outputs (greedy decoding)

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|>

Files

FileContent
model-000NN-of-00043.safetensors, model.safetensors.index.jsonweights
config.jsonbase config plus quantization_config (same keys as the earlier V4.1 EXL3 release) and engram_table_dir: null
exl3_k_map.jsonper-tensor K in the kit's files/exl3_k_map.json schema, generated from these shards
quantization_config.jsonper-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)

Credits

License

MIT, same as the base model.

deepseek
deepseek_v41
exl3
exllamav3
quantized
safetensors
text-generation