Basalt model files of dealignai's abliterated (refusal-direction-removed)
DeepSeek-V4.1-Flash-1017. Each is a drop-in replacement for the official pack of the same name in
jesdga/DeepSeek-V4.1-Flash-1017-Basalt: same format
(.basalt version 2), same sections, same tensor types and sizes, and they run on the unmodified engine (tested with
Basalt 0.3.2).
Based on dealignai/DeepSeek-V4.1-Flash-1017-UNCENSORED-FP8.
Safety alignment has been removed. The model complies with requests the original refuses. It is meant for research (interpretability, refusal mechanisms, red-teaming); you are responsible for how it is used and for adding your own safeguards before anything reaches end users. See dealignai's model card.
| file | replaces | experts | size | sha256 |
|---|---|---|---|---|
DeepSeek-V4.1-Flash-1017-Uncensored-UD-IQ2_XXS.basalt |
DeepSeek-V4.1-Flash-1017-UD-IQ2_XXS.basalt |
UD-IQ2_XXS | 285 GB | 3ffe514d... |
DeepSeek-V4.1-Flash-1017-Uncensored-UD-IQ1_M.basalt |
DeepSeek-V4.1-Flash-1017-UD-IQ1_M.basalt |
UD-IQ1_M | 260 GB | 03c9b223... |
UD-IQ2_XXS is closer to the original model; UD-IQ1_M is 25 GB smaller.
The abliteration edited exactly two kinds of tensor, in layers 10 to 36: the attention output projection
(attn.wo_b, GGUF attn_output_b) and the shared expert's down projection (ffn.shared_experts.w2, GGUF
ffn_down_shexp). Every other tensor of dealignai's checkpoint is identical to DeepSeek's: 21 of its 48 shards are
byte-identical, and in the 27 that differ, every other tensor's bytes match (checked tensor by tensor). The routed
experts, routers, embeddings, head and Engram table were not touched.
So each file is the official pack with those 54 tensors replaced, quantized from dealignai's FP8 weights (e4m3 x e8m0, 32x32 blocks, dequantized exactly) into the type the official pack uses for that tensor:
| tensors | UD-IQ2_XXS pack | UD-IQ1_M pack | rounding |
|---|---|---|---|
attn_output_b, layers 10-26 |
Q8_0 | Q6_K | Q8_0: ggml's round-to-nearest. Q6_K: below |
attn_output_b, layers 27-36 |
Q6_K | Q6_K | ggml's imatrix-weighted search with Unsloth's imatrix_unsloth.gguf_file, then MACaQ-R code refinement (below) |
ffn_down_shexp, layers 10-26 |
Q8_0 | Q8_0 | ggml's round-to-nearest |
ffn_down_shexp, layers 27-36 |
Q5_K | Q5_K | as for Q6_K |
Everything else is the official pack byte for byte: the routed experts, attention, shared gate/up, router, norms, hyper-connections, Engram table, tokenizer, vision projector and DSpark drafter. The official packs' GGUF tensors, experts included, come from Unsloth's current DeepSeek-V4.1-Flash-1017-GGUF files, the Dynamic v3.1 quants (the pack records their fingerprints, and they match the files there).
| file | base pack (sha256) | check |
|---|---|---|
| UD-IQ2_XXS | DeepSeek-V4.1-Flash-1017-UD-IQ2_XXS.basalt (eabdab67...) |
restoring the 54 tensors and the meta gives back the official file bit for bit (sha256) |
| UD-IQ1_M | DeepSeek-V4.1-Flash-1017-UD-IQ1_M.basalt (1cd706a3...) |
every section but gguf and meta keeps the official hash, and every differing byte of gguf lies inside the 54 tensors |
The replaced tensors keep their type, size and offset, so each file has its official pack's layout; the meta section
gets the new name and a modifications record of the above.
As a check of the recipe, the same quantization applied to DeepSeek's original (unedited) tensors gives a lower imatrix-weighted error than the official packs' own bytes for those tensors (for example Q6_K 2.85e-4 vs 3.21e-4, Q8_0 2.55e-5 vs 2.95e-5, Q5_K 7.11e-4 vs 7.40e-4, relative).
MACaQ's full method rotates activations (a Hadamard transform the runtime must apply), which Basalt does not do. Its
MACaQ-R mode keeps the native GGUF format: it changes only the weight codes of Q4_K/Q5_K/Q6_K tensors, never the block
scales, to minimize the output error (W_q - W) H (W_q - W)^T under the input Hessian H = X^T X / n. Here X is the
uncensored model's own inputs to each tensor, collected with llama.cpp on 131,072 tokens (64 x 2,048) of MACaQ's
make_moe_calibration.py --profile diverse text, through each pack's own uncensored weights. The recipe is MACaQ's:
ridge 1.0 x mean(diag H), 64 iterations, decode check. It does not cover the routed experts' IQ2_XXS / IQ1_M, which
are not changed anyway.
| pack | tensors refined | output error (H-weighted, relative) before -> after |
|---|---|---|
| UD-IQ2_XXS | attn_output_b Q6_K, layers 27-36 |
-25% to -33% |
| UD-IQ2_XXS | ffn_down_shexp Q5_K, layers 27-36 |
-18% to -26% |
| UD-IQ1_M | attn_output_b Q6_K, layers 10-36 |
-23% to -33% |
| UD-IQ1_M | ffn_down_shexp Q5_K, layers 27-36 |
-19% to -28% |
Every pack against the original model: KL divergence and top-1 agreement against the
BF16 reference of the unedited DeepSeek-V4.1-Flash-1017 that
Basalt's DeepSeek numbers use (dsv41-bf16-base.kld, wikitext-2, 100 chunks of 512 tokens, reference PPL 2.731).
llama-perplexity --kl-divergence (llama.cpp master, -c 512 -b 2048 --n-cpu-moe 99) on GGUFs that hold exactly each
pack's tensors, so all rows are paired on the same 100 chunks:
| pack | PPL | KLD mean | KLD median | KLD p99 | same top-1 |
|---|---|---|---|---|---|
| official UD-IQ2_XXS | 3.1085 | 0.2408 | 0.0407 | 2.58 | 85.08% |
| Uncensored UD-IQ2_XXS (this repo) | 3.1368 | 0.2637 | 0.0485 | 2.77 | 84.31% |
| Uncensored UD-IQ2_XXS, without MACaQ-R | 3.1381 | 0.2639 | 0.0486 | 2.79 | 84.25% |
| official UD-IQ1_M | 3.0436 | 0.2783 | 0.0548 | 2.89 | 83.92% |
| Uncensored UD-IQ1_M (this repo) | 3.1559 | 0.3124 | 0.0672 | 3.18 | 82.60% |
| Uncensored UD-IQ1_M, without MACaQ-R | 3.1597 | 0.3129 | 0.0672 | 3.19 | 82.71% |
The official rows agree with the official card's Basalt gate (UD-IQ2_XXS: PPL 3.107, KLD 0.241, top-1 85.15%). The reference is the unedited model, so the uncensored rows include the abliteration's intended change to the output distribution as well as quantization: against it, the abliteration costs about 0.02 to 0.03 KLD and about 1 point of top-1 on wikitext. MACaQ-R lowers each refined tensor's error by a quarter, but those tensors are a small part of a model whose error is dominated by the 1- and 2-bit experts: the end-to-end difference is within noise.
Basalt 0.3.2 release build, unmodified: bin/basalt serve loads each file as it loads the official pack, and both
answer correctly (arithmetic, facts) and without refusals.
As for the official files:
hf download klee100/DeepSeek-V4.1-Flash-1017-Uncensored-Basalt DeepSeek-V4.1-Flash-1017-Uncensored-UD-IQ2_XXS.basalt --local-dir models
bin/basalt serve models/DeepSeek-V4.1-Flash-1017-Uncensored-UD-IQ2_XXS.basalt --vision dynamic
For the smaller file, use DeepSeek-V4.1-Flash-1017-Uncensored-UD-IQ1_M.basalt in both commands.
The expert profile in the engine's data/profiles was learned on the original weights. It still applies: the routed
experts and the routers are unchanged.
MIT, the license of DeepSeek-V4.1-Flash-1017 and of dealignai's release (LICENSE). Unsloth publishes its
quantization under MIT. MACaQ is Apache-2.0. The Basalt engine is MIT.