DeepSeek-V4.1-Flash-1017 — abliterated (FP8, local build)
Weight-level abliteration of deepseek-ai/DeepSeek-V4.1-Flash-1017,
built on the dev box from the local FP8 copy (sha1bae0e1088993b9b82de08f59de5be5a34e42170). Native FP8 e4m3 + ue8m0 block scales preserved;
no LoRA merge at load time, no template change, no runtime hook.
What was changed
Only the two residual-stream writers, on the 27 layers that the reference release touches
(layers 10–36 of 40), i.e. shards 13–39:
| component | tensor | shape | edit |
|---|---|---|---|
layers.L.attn.wo_b |
attention output projection | [5120, 8192] F8_E4M3 | W ← W − α u(uᵀW) |
layers.L.ffn.shared_experts.w2 |
shared-expert down projection | [5120, 2304] F8_E4M3 | W ← W − α u(uᵀW) |
u is a unit vector in the 5120-wide residual space, one per layer per component
(directions are layer-specific: cos(u₁₀, u₁₁) ≈ 0.33 within the attention family, ≈ 0.05 across
families). The 384 routed experts (FP4) were not touched, nor were norms, gates, embeddings,wo_a, wq_*, wkv, or the vision tower.
α follows a smooth per-layer schedule — it is not a constant:
| layers | α (attn / ffn) | relΔ |
|---|---|---|
| 10–11 | 2.91 / 2.88 | 6.3 % / 5.6 % |
| 12–14 | 4.42 / 4.40 | 8.7–9.5 % |
| 15–19 | 5.41 / 5.36 | 10.6–11.8 % |
| 20 | 5.90 / 5.83 | 11.0 % / 12.6 % |
| 21–25 | 5.41 / 5.34 | 8.9–12.7 % |
| 26–29 | 4.92 / 4.82 | 9.6–11.9 % |
| 30–32 | 3.93 / 3.88 | 8.1–11.0 % |
| 33 | 2.95 / 2.89 | 6.3–7.7 % |
| 34 | 2.40 / 2.38 | 5.0–5.4 % |
| 35 | 1.39 / 1.36 | 3.4–3.8 % |
| 36 | 0.80 / 0.76 | 1.8–2.1 % |
That bell shape — weak at both ends, peaking mid-stack at layer 20 — is what a
calibrated-direction ablation looks like when the strength is set per layer rather than globally.
Re-quantisation: fp8 e4m3 payload with ue8m0 power-of-two scales on the same 32×32 block grid
DeepSeek ships, so the file layout, header, tensor offsets and index are byte-identical to the
base checkpoint. Untouched shards are byte-identical (hard-linked); the 27 edited shards differ
only inside the two tensors above and their scale blocks.
How the operator was obtained
W' = W − α u(uᵀW) was fitted from the published abliterated releasedealignai/DeepSeek-V4.1-Flash-1017-UNCENSORED-FP8
by per-tensor delta analysis:
- byte-compare every tensor of the reference shard against the base shard → exactly two weights
plus their scale blocks differ per layer; - dequantise both, form Δ, take the top left singular vector of Δ (randomised SVD);
- solve α in closed form,
α = −⟨Δ, u(uᵀW)⟩ / ‖u(uᵀW)‖²; - the rank-1 model leaves a residual of ≈ 0.30 × ‖Δ‖ ≈ 1.9 % of ‖W‖, which is the fp8
re-quantisation noise floor — i.e. the operator is rank-1 and fully characterised by (u, α).
The operator was then re-applied to our own copy of the base weights and re-quantised here.
This is not a byte copy of the reference release: reconstructing the same tensors independently
reproduces them to 1.45 % / 1.53 % relative error (86.7 % / 84.6 % of payload bytes identical),
which is the expected spread for two independent fp8 roundings of the same float values.
Attribution. The refusal directions originate from dealignai's release. Per its model card,
any derivative must credit dealignai and link back to the repository above.
Build provenance
- base:
deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170 - tooling:
~/Sync/llm_wiki/scratch/heretic-1017/
(pdl.py,extract_operator.py,apply_operator.py,build_output.py) - per-shard build log:
_build_report.json - α / direction table:
_operator.json(plusoperator.npz, kept outside this repo)
Caveats
- No functional evaluation has been run on this artifact yet: no refusal battery, no KL on the
calibration corpus, no capability check. Numbers above are weight-space only. - 27 of 40 layers are edited; the first 10 and last 3 layers keep their original behaviour.