DeepSeek-V4.1-Flash-1017 — Heretic LoRA (GGUF)
[!WARNING] Tested and supported with ranma.cpp
ranma_20261013or newer (github.com/saturnsky/ranma.cpp). It is a plain GGUF LoRA (architecturedeepseek41, tensorsblk.N.attn_output_b.weight.lora_a/lora_b), so other runtimes that load DeepSeek-V4.1-Flash-1017 GGUF models under that architecture and support GGUF LoRA should be able to use it; they were not tested. Upstream llama.cpp master does not support DeepSeek-V4.1 yet.
A LoRA adapter that reproduces pqhaz/DeepSeek-V4.1-Flash-1017-heretic
(revision 12d58ad) on top of a GGUF of deepseek-ai/DeepSeek-V4.1-Flash-1017,
for example SaturnHeaven/DeepSeek-V4.1-Flash-1017-EXL3-2.9bpw-RANMA-EXL3-GGUF.
The model weights are never modified: run without the adapter and the base model is back.
The adapter carries the same edit as pqhaz's model, so it serves the same uses; pqhaz released that model for authorized security research. This adapter was made with roleplay and creative writing of many kinds in mind: when a scene calls for darker, more violent or more explicit content, the base model tends to refuse, add disclaimers or step out of character; with the adapter it stays in the scene. Because it is a separate adapter, you can load it only when you need it and run the base model otherwise.
Note: refusal behavior is suppressed and outputs are not filtered.
What it is
pqhaz removed one refusal direction per block from the attention output projection (attn.wo_b, blocks 2–39, strength 2.5).
Removing a direction from a projection's output is a rank-1 change of its weight, so a rank-1 LoRA expresses it exactly:
for each block the adapter holds ΔW = W_heretic − W_base, computed from pqhaz's edited FP8 tensors and the base model's block scales.
It is not an SVD approximation. The base weights it is added to here are a quantized model, so the result is the heretic edit applied
to that quantization, not a byte copy of pqhaz's model.
| File | Size | SHA-256 |
|---|---|---|
DeepSeek-V4.1-Flash-1017-heretic-lora.gguf |
4.1 MB | 238fe3eed67603e20a1ed218d8d8b68df94930755c7be9936b2decd64427c06b |
76 tensors: blk.{2..39}.attn_output_b.weight.lora_a / lora_b, F32, rank 1 (stored as rank 2 with a zero second component),
alpha = 2, so the scale is 1.
Running
- Set up the DeepSeek-V4.1-Flash-1017 model as its card describes (model folder, 1017 engram tables).
- Add
--lora DeepSeek-V4.1-Flash-1017-heretic-lora.ggufto thellama-serverarguments. Nothing else changes.
It was checked with ranma_20261018 and the 2.9 bpw model above: it loads, and 12 harmful
prompts that the base model refuses were answered with the adapter applied. No refusal benchmark or capability test was run on
this adapter; pqhaz's card has the measurements of the full model (refusals, KL divergence, long outputs).
Credits
- pqhaz for DeepSeek-V4.1-Flash-1017-heretic: the ablation directions and edited tensors this adapter is built from.
- DeepSeek for the model; Heretic for the method pqhaz's edit follows.
License
MIT, the same as deepseek-ai/DeepSeek-V4.1-Flash-1017 and pqhaz's model (see LICENSE).