license: mit
base_model: mrfakename/DeepSeek-V4.1-Flash-1017-abliterated
base_model_relation: quantized
library_name: mlx
pipeline_tag: image-text-to-text
tags:
- mlx
- oq
- oqe
- quantized
- deepseek
- deepseek-v4.1
- mixture-of-experts
- mtp
- apple-silicon
- abliterated
- uncensored
DeepSeek-V4.1-Flash-1017-abliterated-oQ4e-mtp
An MLX checkpoint of mrfakename/DeepSeek-V4.1-Flash-1017-abliterated (revision 517efab9ccfef7f714dbd7d679f181a86f43ccf9), exported with oQ at level oQ4e for Apple Silicon. It contains the full model: language backbone, Engram tables, vision encoder and multimodal aligner, and the DSpark MTP weights used for speculative decoding (Lightning MTP in oMLX).
The source is DeepSeek-V4.1-Flash-1017 with its refusal behaviour removed by directional ablation, made by mrfakename: a rank-2 refusal subspace (chat mode and think mode refuse along different directions) was projected out of the residual-stream writes attn.wo_b and ffn.shared_experts.w2 of the 40 main layers, each layer with its own strength, and the edited tensors were requantized to FP8 with their original block scales. Routed experts, embeddings, Engram tables and the DSpark/MTP layers are bit-identical to DeepSeek's release. See the source model card for the method and its refusal and KL measurements.
This model will comply with harmful requests. You are responsible for how you use it. (from the source model card)
| Total tensor payload | 402.4 GiB (432.0 GB) in 82 shards, 1838 tensors |
| Average bits per weight | 4.529 (complete checkpoint), 4.365 excluding Engram |
| Resident weights with Engram on SSD | about 288 GiB |
| Recommended hardware | Apple Silicon Mac with 512 GB unified memory (tested on an M3 Ultra) |
| Prompt format | DeepSeek's reference encoder in encoding/ (no Jinja chat template) |
What oQ4e does for this model
For DeepSeek-V4.1 the oQ4 levels keep the release's own precision for every linear layer: routed experts stay MXFP4 and the dense attention and shared-expert projections stay MXFP8. Those weights already fit the oQ4 budget at their original precision (4.365 bits per weight against a 4.6 target), so oQ does not requantize any of them; the quantization report records allocation: original_precision_fits_independent_remaining_budget and calibration: not_needed_no_linear_requantization. The abliterated wo_b and shared_experts.w2 weights are therefore carried over exactly as published, and quantization does not touch the edit (see Verification).
The only lossy step is the Engram tables (the n-gram hash embeddings, about a quarter of all parameters), stored as 4-bit affine with group size 32 instead of the source's BF16. The BF16 and FP32 tensors (norms, routers, hyper-connection parameters, attention sinks, wo_a, the vision encoder) are kept as they are.
Bit distribution
Logical parameter counts exclude quantization scales and biases; storage and bits per weight include them.
| Storage format | Logical weights | Share | Tensor storage | Effective bits/weight |
|---|---|---|---|---|
| MXFP4, group 32 | 557.171B | 73.004% | 275.669 GiB | 4.25 |
| Engram affine 4-bit, group 32 | 196.614B | 25.762% | 114.444 GiB | 5.00 |
| BF16 | 3.419B | 0.448% | 6.369 GiB | 16.00 |
| MXFP8, group 32 | 5.959B | 0.781% | 5.723 GiB | 8.25 |
| FP32 | 0.042B | 0.006% | 0.158 GiB | 32.00 |
| Total | 763.205B | 100% | 402.363 GiB | 4.529 |
Storage by component
| Component | Logical weights | Storage |
|---|---|---|
| Language backbone (excluding Engram) | 551.881B | 300.132 GB / 279.520 GiB |
| Engram tables | 196.614B | 122.884 GB / 114.444 GiB |
| DSpark MTP | 14.225B | 8.047 GB / 7.495 GiB |
| Vision encoder, aligner, image tokens | 0.485B | 0.971 GB / 0.904 GiB |
Memory and speed
oMLX can keep the Engram tables on SSD (memory-mapped, reading only the rows each request needs), so they do not count against unified memory. Everything else stays resident and packed (MXFP4 and MXFP8 are not expanded to BF16).
Measured with oMLX 0.7.2 on an M3 Ultra (512 GB), Engram on SSD, one stream: prefill of a 4,096-token prompt (2,048-token chunks) 419 tok/s; greedy decode at 4k context 36.5 tok/s without MTP; MLX active memory after load 287.9 GiB, peak 296.7 GiB.
Usage
Run it with oMLX 0.7.2 or later. Download it into your oMLX model directory, for example
hf download bearzi/DeepSeek-V4.1-Flash-1017-abliterated-oQ4e-mtp --local-dir ~/models/DeepSeek-V4.1-Flash-1017-abliterated-oQ4e-mtp
and load it like any other model. oMLX handles the prompt format, thinking mode, tool calls, images and Engram offload. The DSpark MTP weights are included, so Lightning MTP can be turned on in the model settings.
For your own tooling, use the reference encoder in encoding/ (copied unchanged from the source repository).
Verification
Before upload, the checkpoint was checked two ways on the same M3 Ultra:
- Tensors. Compared tensor by tensor with bearzi/DeepSeek-V4.1-Flash-1017-oQ4e-mtp, the oQ4e export of the unmodified model: 1714 tensors are bit-identical and 124 differ. The differing tensors are exactly the abliteration edit:
attn.wo_bin 32 layers andffn.shared_experts.w2in 30 layers, the layers with a nonzero strength in the source'sabliteration-edit.npz(the other layers have strength 0 and are unchanged). Their FP8 codes are byte-identical to the source's, and their MXFP8 scales are the source's 32x32 block scales repeated for each row group (62/62 modules), so the edit is carried over without any rounding. Nothing else changed, including the 4-bit Engram tables and the MTP weights. - Outputs. The checkpoint was run by oMLX 0.7.2 next to the source checkpoint it was exported from (FP8 / MXFP4 weights with BF16 Engram tables). Teacher-forced over 1,024 tokens of mixed text, the top-1 prediction is identical at 95.21% of positions, top-5 overlap 88.32%, mean absolute change of the source's top-1 log-probability 0.0619 nats. Engram is the only quantized component, so this is the effect of the 4-bit Engram tables. Greedy generations with DeepSeek's prompt encoder (chat mode, non-thinking):
Prompt: In exactly three sentences, explain why the sky is blue and why sunsets are red.
The sky is blue because air molecules scatter short-wavelength blue light from the sun much more strongly than long-wavelength red light, a process called Rayleigh scattering, so blue light reaches your eyes from all directions. At sunset, sunlight travels through a much longer path of atmosphere, which scatters away most of the blue light and lets the remaining red and orange wavelengths pass through to your eyes. This is why the sky appears blue during the day but reddens near the horizon at sunset.
98 tokens, 36.1 tok/s; greedy output identical to the source checkpoint's for the first 20 tokens
Prompt: Write a Python function merge_intervals(intervals) that merges overlapping closed intervals, with a short docstring and two doctest examples.
```python
def merge_intervals(intervals):
"""
Merge overlapping closed intervals.
Given a list of [start, end] intervals, return a new list of
non-overlapping intervals sorted by start, where any intervals
that overlap or touch are merged into a single interval.
>>> merge_intervals([[1, 3], [2, 6], [8, 10], [15, 18]])
[[1, 6], [8, 10], [15, 18]]
>>> merge_intervals([[1, 4], [4, 5]])
[[1, 5]]
"""
if not intervals:
return []
# Sort by start, then by end
sorted_intervals = sorted(intervals, key=lambda x: (x[0], x[1]))
merged = [list(sorted_intervals[0])]
for start, end in sorted_intervals[1
200 tokens (cut at 200), 36.7 tok/s; greedy output identical to the source checkpoint's for the first 58 tokens
Prompt: 用两句话解释什么是光合作用。
光合作用是绿色植物利用阳光将二氧化碳和水转化为有机物(如葡萄糖),并释放氧气的过程。它本质上是将光能转化为化学能并储存在有机物中的过程。
37 tokens, 37.5 tok/s; greedy output identical to the source checkpoint's for the first 20 tokens
Prompt: A train leaves at 9:40 and arrives at 13:05 after one 15-minute stop. How long was it actually moving? Answer briefly and show the arithmetic.
From 9:40 to 13:05 is 3 hours 25 minutes = 205 minutes.
Subtract the 15-minute stop: 205 − 15 = 190 minutes.
**Answer: 190 minutes (3 hours 10 minutes).**
57 tokens, 37.3 tok/s; greedy output identical to the source checkpoint's for the first 57 tokens
License
DeepSeek released the base model under the MIT License and the abliterated source keeps it; this quantized checkpoint keeps the same license. The LICENSE file and the encoding/ reference encoder are copied unchanged from the source repository.
Acknowledgements
Model by DeepSeek-AI. Abliteration by mrfakename. Quantized with oQ from oMLX.