M4 - Hybrid abliterate-then-heal
The two-stage pipeline that follows a lossy abliteration edit with a repair step. Abliterate first, then heal with a light preference-tuning pass. The Labonne recipe.
M4 is a two-stage pipeline: first abliterate a model via M1 (which removes refusal but costs a small amount of capability, under a point on average in Arditi et al. and on Labonne's Daredevil-8B, more on TruthfulQA), then heal the damage with a light DPO training pass on a curated preference dataset. Described by Maxime Labonne in June 2024, canonical example NeuralDaredevil-8B. Cost: more than M1 alone, but in Labonne's case it recovered most of the lost benchmark score.
- Why healing exists: the small but consistent damage from raw abliteration
- The two-stage pipeline in code, abridged from Labonne's config
- DPO as a repair tool, and why not SFT
- What Labonne's NeuralDaredevil-8B actually achieved
- A failure mode to watch for: DPO teaching refusal back
- Cost gradient: when M4 is worth the extra cost over M1 alone
What M4 is
M4 is a two-stage pipeline. First stage: abliterate the model - remove the refusal direction from the weights via M1 direct removal or its automated equivalent Heretic. This reduces refusal rates but degrades general capability by under a point on average (Arditi et al.) and more on TruthfulQA (1.0 to 5.9 points across Arditi's thirteen models). Second stage: heal the damage with a light preference-tuning pass, typically DPO, on a curated preference dataset. This recovers most of the lost capability without re-teaching the refusal that the first stage removed.
The pipeline was described by Maxime Labonne in June 2024 in his article Uncensor any LLM with abliteration. His canonical worked example, NeuralDaredevil-8B, is described on its model card as the best-performing uncensored 8B model on the Open LLM Leaderboard by MMLU score.
Why healing exists: the damage problem
Every abliteration is a small edit but not a free one. The Arditi paper reports the general-capability effect as under 1% on average, but the effect on TruthfulQA is consistent and larger: -2.3 points on Llama-3 70B, -3.5 on Yi 34B, similar elsewhere. The comparative study by Young (2025) documents that Heretic averages a -7.81pp GSM8K drop across three benchmarked models, driven mainly by Yi-1.5-9B (-18.81pp). Labonne's own write-up of his Daredevil-8B abliteration is plain about it:
However, we observe a performance drop in the ablated version across all benchmarks.
The drop was small. On the Nous benchmark suite reported on the model cards, Daredevil-8B averaged 55.87 and Daredevil-8B-abliterated 55.06, with TruthfulQA falling from 59.05 to 57.47.
Our reading is that the reason is geometric: the direction that mediates refusal may not be isolated. Some genuine capability - the willingness to say "no, that is not right," to disagree with a plausible-sounding falsehood, to hedge appropriately when uncertain - may be entangled with the same direction that mediates the willingness to refuse harmful requests. Cutting the direction would then remove both. See our Arditi method article for the interpretability picture and the practical how-to for the benchmark-comparison workflow.
Our reading of Labonne's approach is that this loss is not permanent damage but disturbed calibration - the model still has the capacity, it just needs to be nudged back into using it. And the nudge should be gentle: in Labonne's words, "An additional SFT would likely break the model's performance," whereas "preference alignment is quite light and shouldn't lobotomize our abliterated model." He chose Direct Preference Optimization.
What DPO is, briefly
Direct Preference Optimization is a way of teaching a model what people prefer without the elaborate machinery of reinforcement learning. The setup: assemble many pairs of answers to the same prompt, where one answer is marked chosen and the other rejected. Tune the model so it becomes more likely to produce chosen-style answers and less likely to produce rejected-style ones.
DPO was introduced by Rafailov et al. (2023) under the memorable subtitle Your Language Model is Secretly a Reward Model. Its appeal is that it is simpler and more stable than the RLHF pipeline it can replace - preference learning folded into an ordinary classification-style training step, without a separate reward model to train.
For M4 the specific use is repair. In our reading, the abliterated model has forgotten how to calibrate certain outputs, not how to produce them, and running DPO for one epoch on a general preference mix at a low learning rate restores the calibration without re-teaching the model to decline harmful requests - provided the preference data itself does not contain refusal-style chosen answers. See the failure-mode section below.
See our DPO healing concept article (E1) for the full theory. This article covers the M4-specific application.
What you need before starting
- An already-abliterated model. The output of M1, M3, or Heretic. Labonne started from
mlabonne/Daredevil-8B-abliterated. - A preference dataset. Labonne used
mlabonne/orpo-dpo-mix-40k: 44,245 samples, a blend of Capybara, Intel-Orca, UltraFeedback, math, PRM (M4-ai/prm_dpo_pairs_cleaned) andtruthy-dpo-v0.1preference pairs. It contains atoxic-dpo-v0.2subset designed to elicit answers to illegal questions. You can filter it out with adataset.filtercall, or keep it if uncensoring is the point. For DPO specifically Labonne recommends the-flatvariant. - Hardware. Healing is real training, not a one-shot weight edit. Labonne trained NeuralDaredevil-8B on 6x A6000 with DeepSpeed ZeRO-2 (QLoRA), taking about 6 hours 45 minutes.
Get the tools
Labonne used Axolotl via his LazyAxolotl Colab. Four trainers to consider are Axolotl, TRL, Unsloth, and LLaMA-Factory. All four support DPO, ORPO, and KTO.
Axolotl is config-driven (YAML) and supports multi-GPU training. Unsloth advertises 2x faster training with 70% less VRAM. LLaMA-Factory provides a web UI. TRL is Hugging Face's post-training library, built on Transformers. LazyAxolotl is a Colab notebook; for anything serious, run Axolotl directly.
$ git clone \
https://github.com/axolotl-ai-cloud/axolotl
$ cd axolotl
$ pip install -e '.[deepspeed]'
# requires:
# python >= 3.12
# NVIDIA (Ampere+) or AMD GPU
# multi-GPU: DeepSpeed ZeRO-2 setup
# torch/CUDA/flash-attn versions drift.
# check axolotl docs for the exact combo
# for your PyTorch/CUDA setup. Standard editable install with the DeepSpeed extra, needed for a multi-GPU healing run (current Axolotl no longer ships a flash-attn extra; install flash-attention separately if you want it).
Check Axolotl's current install docs for the exact command in your PyTorch/CUDA combination; the ecosystem moves quickly and the pinned versions change.
The canonical config
Labonne's healing config for NeuralDaredevil-8B, abridged from his article (several keys, including warmup_steps: 100 and gradient_checkpointing: true, are omitted here; see the article for the full file). Axolotl YAML, QLoRA + DPO, one epoch, learning rate 5e-6, sequence length 2048:
base_model: mlabonne/Daredevil-8B-abliterated
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
load_in_4bit: true
strict: false
rl: dpo
datasets:
- path: mlabonne/orpo-dpo-mix-40k-flat
type: chatml.intel
dataset_prepared_path:
adapter: qlora
lora_r: 64
lora_alpha: 32
lora_dropout: 0.05
lora_target_linear: true
sequence_len: 2048
sample_packing: false
pad_to_sequence_len: false
gradient_accumulation_steps: 8
micro_batch_size: 1
num_epochs: 1
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 5e-6
train_on_inputs: false
group_by_length: false
flash_attention: true
deepspeed: deepspeed_configs/zero2.json Base model is the already-abliterated Daredevil-8B. The rl: dpo line tells Axolotl to use DPO rather than SFT. The dataset is orpo-dpo-mix-40k-flat, loaded with the chatml.intel preprocessing type. QLoRA adapter at rank 64, alpha 32, dropout 0.05. Single epoch. Learning rate 5e-6. Gradient accumulation 8 with micro-batch 1. Cosine schedule. Flash attention on. Multi-GPU via DeepSpeed ZeRO-2. Current Axolotl still accepts these keys, but marks flash_attention: true as deprecated in favour of attn_implementation: flash_attention_2.
The gentleness matters. Full SFT instead of DPO would likely degrade the model - Labonne writes that an additional SFT "would likely break the model's performance," while preference alignment "shouldn't lobotomize" it. In our reading, light preference alignment nudges the model's calibration back without disturbing its instruction-following behavior.
Launch via Accelerate with DeepSpeed:
$ accelerate launch \
-m axolotl.cli.train \
healing_config.yaml \
--deepspeed deepspeed_configs/zero2.json
# what accelerate does:
# sets up distributed training
# handles the process group
# spawns one worker per GPU
# what DeepSpeed ZeRO-2 does:
# partitions optimizer state across GPUs
# partitions gradients across GPUs
# → a 6x A6000 rig (288 GB VRAM) fits
# an 8B model + optimizer + gradients
# comfortably
# logs to W&B when wandb_project is set. watch for:
# · DPO loss decreasing smoothly
# · chosen-vs-rejected margin growing Accelerate handles the distributed setup; DeepSpeed ZeRO-2 partitions optimizer state and gradients across the GPUs so a 6x A6000 rig (288 GB VRAM aggregate) can hold the model, optimizer state, and gradients for an 8B QLoRA run comfortably.
With wandb_project set, as in Labonne's config, the run writes W&B logs - you should see DPO loss decreasing smoothly and the chosen-vs-rejected margin growing over the epoch. A run that shows no margin growth or unstable loss may indicate a dataset problem (see failure modes below).
Choices you have to make
DPO vs ORPO vs KTO vs IPO. ORPO folds preference alignment into the SFT stage - a single stage, but it still needs preference pairs. KTO needs only binary good-versus-bad labels (no paired comparisons), useful if your data is one-sided. IPO is an alternative objective whose authors identify pitfalls in DPO. Labonne's recipe uses DPO on a general preference mix - the goal is to restore capability, not teach a new behavior.
LoRA rank. Labonne used r=64, alpha=32.
Dataset composition. GSM8K did not improve after Labonne's heal, which he said could mean orpo-dpo-mix-40k would benefit from more math samples. If your capability drop is concentrated in a specific domain, augment the dataset with data for it. A rule of thumb: whichever benchmark shows the biggest drop after abliteration is the benchmark you need data for during healing.
Epochs. Labonne used one epoch. In our reading, more epochs risk overfitting the preference distribution and can start to re-teach refusal from any refusal-style chosen answers still in the dataset. If one epoch is insufficient, prefer curating the dataset over running more epochs.
Learning rate. Labonne used 5e-6.
What good output looks like
Two signals during training and one after.
During: W&B (or the loss curves in Axolotl's terminal output) should show DPO loss decreasing smoothly. The chosen-versus-rejected margin should grow over the epoch. A flat margin or unstable loss may mean a dataset issue.
After: re-run the same capability benchmarks you ran on the abliterated (pre-heal) model and compare three points: base, abliterated, healed. You want healed ≈ base on capability while refusals stay near zero. NeuralDaredevil-8B recovered most of the lost performance except on GSM8K, and its model card describes it as the best-performing uncensored 8B model on the Open LLM Leaderboard by MMLU score.
$ for CKPT in \
mlabonne/Daredevil-8B \
mlabonne/Daredevil-8B-abliterated \
mlabonne/NeuralDaredevil-8B-abliterated; do
lm_eval \
--model hf \
--model_args pretrained=$CKPT \
--tasks mmlu,gsm8k,truthfulqa,\
hellaswag,arc_challenge \
--output_path \
results/$(basename $CKPT).json
done
# compare the three JSON outputs.
#
# a good M4 result:
# healed ≈ base on MMLU / HellaSwag / ARC
# healed > abliterated on TruthfulQA
# healed > abliterated on GSM8K
# (depending on how much math the
# preference set contained)
#
# refusal count on the harmful set:
# near zero at the abliterated and
# healed checkpoints. Run lm-evaluation-harness three times with identical config against three checkpoints: the base model, the abliterated version, the healed version. Compare on the same tasks - MMLU, GSM8K, TruthfulQA, HellaSwag, ARC-Challenge are the tasks used here.
Interpretation: a good M4 result has healed ≈ base on MMLU/HellaSwag/ARC, healed > abliterated on TruthfulQA (partial recovery), and healed > abliterated on GSM8K depending on how much math was in the preference set. Refusal count on the harmful set should remain near zero at the abliterated and healed checkpoints - if it climbs after healing, see failure mode 1.
Verify healing did not re-introduce refusal
Run the same refusal-rate check you used to verify M1: sample 100 prompts from walledai/AdvBench, generate responses with the healed model, count refusals via LLM-judge (not string-matching alone, which detects stock refusal phrases but does not assess whether a completion is coherent or harmful - see the practical how-to verification section).
The critical comparison is healed-versus-abliterated. Healing should leave refusal count essentially unchanged from the pre-heal state. If refusal count climbs after healing, you likely have a preference-dataset problem - the "chosen" side of your dataset contained refusal-style answers, and DPO taught the model to prefer them. Filter the dataset and re-heal.
When it does not work
Three failure modes to watch for in M4.
1. Healing re-introduces refusal
Symptom: refusal count on the harmful set climbs after healing, partially undoing the M1 removal. Cause: the preference dataset contains "chosen" answers that are themselves refusals. DPO teaches the model to prefer these chosen answers, and refusal comes back through the training data. Diagnostic: post-heal refusal count exceeds pre-heal count. Fix: filter refusal-style chosen answers from the preference set (a regex or LLM-classifier pass), or use a dataset curated for this purpose. A subset like toxic-dpo-v0.2 in orpo-dpo-mix-40k (which the dataset card says is designed to prompt the model to answer illegal questions) should, in our reading, push against this, although the card does not present it as a counterweight.
2. SFT overshoot / model degradation
Symptom: the healed model behaves worse than the pre-heal abliterated version - rambling, off-topic, or losing instruction-following. Cause: using full supervised fine-tuning instead of light preference tuning. Labonne's warning is direct: Llama 3 8B Instruct is "quite brittle when it comes to supervised fine-tuning," and "An additional SFT would likely break the model's performance." Fix: use DPO or ORPO (not SFT), one epoch (not multiple), low learning rate (5e-6 or lower).
3. Specific domain not recovered
Symptom: most benchmarks recover, but one stays low. Cause: the preference dataset underrepresents that domain. Labonne's own GSM8K case: math did not improve after healing, which he suggested could mean orpo-dpo-mix-40k needs more math samples. Fix: augment the preference set with domain-specific pairs.
Cost and time
Numbers from Labonne's NeuralDaredevil-8B run and Runpod pricing (as of 2026-11-08, per runpod.io/pricing):
- Labonne's exact run: 6x A6000, about 6h45m. At Runpod's Secure Cloud price of $0.59/hr for an RTX A6000, roughly $24 of compute for the healing pass.
Cost scales with epochs; Labonne used one. Compare to raw M1 (Arditi et al. report under $5 of compute for a 70B model) and to Heretic.
Related literature
M4 is a two-stage pipeline. Each stage has its own literature. The first stage (abliteration) inherits the full M1 corpus. The second stage (DPO healing) draws on the preference-optimization literature listed in the wiki's references, training methods section. We have not identified a paper that specifically evaluates the two-stage abliterate-then-heal pipeline against single-stage M1 - this is a coverage gap.
- Rafailov, R., Sharma, A., Mitchell, E., et al. (2023). Direct Preference Optimization: Your Language Model is Secretly a Reward Model. NeurIPS 2023. arXiv:2305.18290. The DPO paper. Foundation for the healing stage.
- Lee, A., et al. (2024). A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity. arXiv:2401.01967. Shows, for toxicity in GPT2-medium, that DPO does not remove capabilities learned in pre-training but bypasses them. The study is not about refusal or abliteration; we read it as a caution for the M4 healing stage, since it suggests preference tuning changes how existing capabilities are reached rather than whether they exist.
- Marshall, T., Scherlis, A., Belrose, N. (2024). Refusal in LLMs is an Affine Function. arXiv:2411.09003. Affine Concept Editing generalizes directional ablation to affine (bias-inclusive) projections. Relevant to the first stage of M4 as a refinement to M1.
For refinements and defenses that affect the first (abliteration) stage, see M1 related literature.
Where to go next
Quantize the healed model to GGUF for distribution via M8 repackaging - mradermacher is among the quantizers publishing GGUF builds of NeuralDaredevil-8B-abliterated. If you want to combine your healed model with another strong model, use M5 merging via mergekit - Daredevil-8B itself was a DARE-TIES mega-merge before it was abliterated and healed. If your first heal was insufficient (residual refusal, unrecovered domain), iterate on the dataset before running more epochs.
Frequently asked questions
What is M4 hybrid abliterate-then-heal?
M4 is a two-stage pipeline for producing high-quality uncensored language models. First stage: abliterate the model via M1 or Heretic to remove refusal (this costs some capability: under a point on average in Arditi et al. and on Labonne's Daredevil-8B, more on TruthfulQA and sometimes GSM8K). Second stage: heal the damage with a light DPO training pass on a curated preference dataset. This recovers most of the lost benchmark score without re-teaching the refusal that the first stage removed. Described by Maxime Labonne in June 2024; canonical example NeuralDaredevil-8B.
How is M4 different from M1?
M1 is only the abliteration step - a one-shot weight edit that costs dollars and hours. M4 adds a second training stage (DPO healing) on top, which costs more (tens of dollars and many GPU-hours in Labonne's run) but recovers most of the capability that M1 loses. Use M1 when refusal removal is all you need or when compute is tight. Use M4 when you want to publish a model marketed on benchmark performance.
Do I need to heal? When is the extra cost worth it?
Depends on the use case. For research or personal experimentation, raw M1 output is usually fine - the small capability drop rarely matters. For a public release on Hugging Face or a production deployment, healing can bring the model back to leaderboard-competitive levels and is generally worth the cost. As a rough rule: if you would benchmark it and publish the number, heal it; if you just want to use it, do not bother.
What is DPO healing?
DPO is Direct Preference Optimization, introduced by Rafailov et al. 2023. It teaches a model to prefer certain response styles over others by training on pairs of chosen/rejected answers. In M4, DPO is used as a repair tool: in Labonne's run, a light one-epoch pass on a general preference mix recovered most of the performance that abliteration cost, without re-teaching the model to decline harmful requests (provided the preference data is curated to not contain refusal-style chosen answers).
What preference dataset should I use for healing?
Labonne used mlabonne/orpo-dpo-mix-40k - specifically the -flat variant for DPO. It blends Capybara, Intel-Orca, UltraFeedback, math, PRM and truthy-dpo preference pairs, and includes a 541-sample toxic-dpo-v0.2 subset that the dataset card describes as designed to prompt the model to answer illegal questions. For domain-specific recovery (e.g. math after GSM8K drops), augment with domain-specific pairs.
What if healing re-introduces refusal?
A possible M4 failure mode. Cause: the "chosen" side of your preference dataset contains refusal-style answers, and DPO teaches the model to prefer them. Diagnostic: post-heal refusal count exceeds pre-heal count. Fix: filter refusal patterns from the chosen answers (a regex or LLM-classifier pass), or use a dataset curated for this purpose. Labonne reports that his orpo-dpo-mix-40k heal produced a fully uncensored model.
How much does M4 cost?
Labonne's reference NeuralDaredevil-8B heal: 6x A6000 for about 6h45m, roughly $24 in compute at Runpod's RTX A6000 Secure Cloud price of $0.59/hr (as of 2026-11-08, per runpod.io/pricing).
Can I use ORPO or KTO instead of DPO for healing?
Yes. ORPO folds preference alignment into the SFT stage, so there is a single training stage, and it still uses preference pairs. KTO needs only binary good/bad labels, useful if your data is one-sided. IPO is an alternative objective whose authors identify pitfalls in DPO. Labonne's reference recipe uses DPO. If you have unusual data or specific issues with DPO on your model family, the alternatives are worth trying.
Does M4 fully restore capability?
Mostly, but not always in every domain. Labonne's NeuralDaredevil-8B recovered most of the lost performance except on GSM8K, which did not improve; Labonne suggested this could mean his preference dataset would benefit from more math samples. Our reading: benchmarks whose domain is represented in the preference set are more likely to recover than benchmarks whose domain is not. Fix: augment the preference set with domain-specific pairs where you see residual drops.
References
- Labonne, M. (2024). Uncensor any LLM with abliteration. mlabonne.github.io
- Rafailov, R., et al. (2023). Direct Preference Optimization: Your Language Model is Secretly a Reward Model. NeurIPS 2023. arXiv:2305.18290
- Arditi, A., et al. (2024). Refusal in Language Models Is Mediated by a Single Direction. NeurIPS 2024. arXiv:2406.11717
- Young, R. J. (2025). Comparative Analysis of LLM Abliteration Methods: A Cross-Architecture Evaluation. arXiv:2512.13655
- mlabonne/NeuralDaredevil-8B-abliterated (canonical M4 example). huggingface.co/mlabonne/NeuralDaredevil-8B-abliterated
- mlabonne/Daredevil-8B-abliterated (Labonne's abliteration input). huggingface.co/mlabonne/Daredevil-8B-abliterated
- mlabonne/orpo-dpo-mix-40k (Labonne's healing dataset). huggingface.co/datasets/mlabonne/orpo-dpo-mix-40k
- Axolotl training framework. github.com/axolotl-ai-cloud/axolotl
- Unsloth training framework. github.com/unslothai/unsloth
- TRL (Hugging Face). github.com/huggingface/trl
- LLaMA-Factory. github.com/hiyouga/LLaMA-Factory
- EleutherAI lm-evaluation-harness. github.com/EleutherAI/lm-evaluation-harness