license: mit
base_model: mrfakename/DeepSeek-V4.1-Flash-1017-abliterated
base_model_relation: quantized
pipeline_tag: image-text-to-text
tags:
- gguf
- llama.cpp
- deepseek
- abliterated
- uncensored
DeepSeek-V4.1-Flash-1017 (abliterated) GGUF
Huge thanks to Hugging Face for generously sponsoring the compute used to abliterate these models! This was done on HF Jobs, which makes it incredibly easy to run tasks such as these :)
Join the Discord: https://discord.com/invite/foss

GGUF quants of mrfakename/DeepSeek-V4.1-Flash-1017-abliterated, which is deepseek-ai/DeepSeek-V4.1-Flash-1017 with its refusal behaviour removed by directional ablation.
These are the mrfakename/DeepSeek-V4.1-Flash-1017-GGUF quants with the edit applied in place. Only the edited tensors were dequantized, edited and requantized to their original type. Everything else is byte-identical.
| Folder | Size | Files | Notes |
|---|---|---|---|
Q8_0 |
473 GiB | 10 | Q8_0 everywhere except the routed experts, which keep their native MXFP4. Closest to the original weights, and the full edit survives. |
Q4_K_M |
414 GiB | 10 | The routed experts are already about 4-bit, so this saves less than usual. |
Q3_K_M |
323 GiB | 10 | |
Q2_K |
246 GiB | 10 | Smallest usable size. Much of the edit is lost to rounding here (see below). |
Each folder holds a split GGUF. Point llama.cpp at the -00001-of- file and it loads the rest.
What changed
The refusals in this model live in more than one direction: chat mode and think mode refuse along different directions. So instead of a single refusal direction, a rank-2 refusal subspace was removed:
- Refusal directions were measured separately for chat and think prompts at every layer, on the Q8_0 GGUF.
- The subspace is the top singular vectors of all of those directions together.
- It was projected out of the residual-stream writes of the 40 main layers:
attn_output_bandffn_down_shexp. Each layer got its own strength.
The strengths per layer came from a multi-objective search: minimise refusals and keep the first-token KL on harmless prompts low.
Nothing else was touched: routed experts, embeddings, Engram tables and the DSpark/MTP layers (40–42) are bit-identical to the original quants.
Results (Q8_0, greedy)
| refusals, chat (/100) | think mode, reasoning heads for refusal (/100) | KL, harmless first token | |
|---|---|---|---|
| original | 97 | 98 | 0 |
| abliterated | 4 | 9 | 0.067 |
The 100 prompts are held-out harmful requests, with 384 generated tokens each. In think mode the reasoning usually had not finished by then, so the reasoning text itself was judged. Some think-mode answers still steer away from the request: for example, "bomb from household items" turns into a bath bomb. The KL figure includes a small noise floor that comes from batched inference.
How much of the edit survives each quant
The edit is small, and at low bit widths rounding can undo part of it. The edited tensors were requantized with error feedback to keep as much of it as possible. This is how much of the intended change was lost, from patch-stats.txt:
| Folder | attn_output_b |
ffn_down_shexp |
|---|---|---|
Q8_0 |
~0% | ~0% |
Q4_K_M |
~29% (Q4_K) | ~15% (half Q4_K, half Q6_K) |
Q3_K_M |
~7% (Q3_K) | ~34% (Q4_K) |
Q2_K |
~90% (Q2_K) | ~11% (Q3_K) |
Only Q8_0 was benchmarked. The lower quants were not, and Q2_K in particular will refuse more often. For a small quant with the full edit, load the original quant with the LoRA instead: llama-server -m Q2_K/DeepSeek-V4.1-Flash-1017-Q2_K-00001-of-00010.gguf --lora abliteration-lora.gguf, using the quants from mrfakename/DeepSeek-V4.1-Flash-1017-GGUF.
Running
At the time of release, mainline llama.cpp didn't support DeepSeek V4.1. These files were made with the branch from ggml-org/llama.cpp#28696 at commit 2076412, and they need that branch or a build that includes it.
git clone https://github.com/vcruz305/llama.cpp && cd llama.cpp
git checkout 2076412598e99127ea2554467b2b7530856895d3
cmake -B build && cmake --build build -j
The two engram tables are large and read a few rows per token. Keeping them on the CPU works well, for example -ot "engram_embd.weight=CPU".
Text only for now. The llama.cpp branch can't convert the vision tower yet.
Files
Q8_0/,Q4_K_M/,Q3_K_M/,Q2_K/: the patched quants.abliteration-lora.gguf: a rank-2 LoRA that applies the same edit to the original (unpatched) GGUFs.abliteration-edit.npz: the subspace basisQand the per-layer strengthsscales[layer, (attn, shexp)]. The edit isW' = W - s·QQᵀW.patch-stats.txt: per-tensor patch log.
This model will comply with harmful requests. You are responsible for how you use it.