M6 - Uncensored fine-tuning (DPO, ORPO, KTO)
Remove refusal through training alone, no weight surgery. Preference optimization on pairs that favor compliance over refusal. Traced in this wiki to Eric Hartford's 2023 work; adjacent to abliteration rather than a species of it.
M6 produces an uncensored model through preference-optimization fine-tuning alone, with no abliteration step. The practitioner assembles a preference dataset where compliant answers are 'chosen' and refusals are 'rejected', then trains the model to prefer the former. DPO is the algorithm used in this article's example; ORPO, KTO, and IPO are related preference-optimization methods. This wiki traces M6 to Eric Hartford's 2023 uncensored-models work. Adjacent to abliteration rather than a species of it - included in the taxonomy because M4 and M6 share the identical DPO machinery and can be hard to distinguish from outside.
- Why M6 exists as a separate method from abliteration proper
- Eric Hartford's uncensored-models argument (2023)
- The four algorithm variants: DPO, ORPO, KTO, IPO
- A TRL training loop with concrete hyperparameters
- Why the mechanistic-DPO literature complicates the 'removed' claim
- The M4 vs M6 distinguishability problem for a catalog
What M6 is
M6 removes refusal the way alignment installed it: through training. The practitioner assembles a preference dataset in which, for prompts a base model would refuse, the chosen response is a compliant answer and the rejected response is a refusal. Training the model to prefer the former teaches it to comply. No refusal direction is ever identified or edited; the change is distributed across the weights by gradient descent rather than localized by linear algebra.
Mechanically this is indistinguishable from ordinary preference fine-tuning; only the data's intent differs. The algorithm is Direct Preference Optimization (Rafailov et al. 2023) or one of its variants (ORPO, KTO, IPO). The datasets are the defining ingredient - for example the unalignment/toxic-dpo-v0.2 collection of small preference pairs, which the mlabonne/orpo-dpo-mix-40k card describes as "designed to prompt the model to answer illegal questions"; its own card flags it as toxic and sensitive.
Attribution and lineage
The genre M6 belongs to predates abliteration by roughly a year. Eric Hartford's manifesto Uncensored Models, published 15 May 2023, is the text this wiki treats as founding. Hartford's method - described in his Dolphin announcement - was to take an instruct dataset and filter out "instances of alignment, refusal, avoidance, and bias" before training, so the model never learns to refuse in the first place. His argument was explicitly political:
There is no "one true correct alignment" and even if there was, there's no reason why that should be OpenAI's brand of alignment.
Hartford's Dolphin and WizardLM-Uncensored models belong to this lineage. The shift from data-filtering (train on a refusal-free dataset) to preference-optimization (train against refusals with DPO) is a later refinement; in this wiki's reading, the intent - an uncensored model made purely through training - is continuous from Hartford's 2023 work to current M6 practice.
The DPO machinery M6 uses today was introduced by Rafailov et al. (2023) under the subtitle Your Language Model is Secretly a Reward Model. See our M4 article's DPO section for the mechanics briefly, and the E1 concept article for the fuller theoretical treatment.
What you need before starting
- A model to tune. Preference optimization has been applied to both base and instruction-tuned models (the SimPO experiments use both).
- A preference dataset with compliance-vs-refusal pairs.
toxic-dpo-v0.2is one such dataset (it pairs refusals against compliant answers to disallowed requests). General mixes likemlabonne/orpo-dpo-mix-40kalso serve when they contain enough compliance-favoring pairs to counterbalance the polite-decline bias of general RLHF data. - Hardware. QLoRA (4-bit loading plus LoRA adapters) reduces memory needs. DPO compares the policy against a reference model, which adds memory compared with plain SFT. Larger models need more GPU memory or multiple GPUs.
Get the tools
The same four tools as M4. In 2026:
- Unsloth - its README reports 2x faster training with 70% less VRAM, via custom kernels.
- TRL - Hugging Face's reference trainers. TRL reached v1.0.0 on 31 March 2026; its trainers include SFTTrainer, DPOTrainer, KTOTrainer and GRPOTrainer (ORPO sits under
trl.experimental). - Axolotl - YAML-configured training with multi-GPU support (DeepSpeed, FSDP).
- LLaMA-Factory - zero-code CLI and Web UI.
$ pip install \
trl \
peft \
datasets \
bitsandbytes \
accelerate
# TRL → DPOTrainer, ORPOTrainer, etc
# PEFT → LoRA / QLoRA adapters
# datasets → data loading + preprocessing
# bitsandbytes → 4-bit quantized loading
# accelerate → distributed setup
# faster single-GPU alternative:
$ pip install unsloth
# wraps TRL trainers with custom kernels
# roughly 2x throughput on a single card TRL, PEFT (for LoRA/QLoRA adapters), datasets, bitsandbytes (for 4-bit quantized loading), and Accelerate (distributed setup). This gives you the full DPO pipeline in one install.
Alternative one-line install for faster single-GPU training: pip install unsloth. Unsloth wraps TRL's trainers with custom kernels and typically doubles training throughput on a single card.
Representative preference-pair structure
A DPO preference row is a prompt, a chosen response, and a rejected response. A non-harmful illustrative example of the JSONL structure - structure only:
{
"prompt":
"Explain the difference between DPO
and SFT in one paragraph.",
"chosen":
"DPO (Direct Preference Optimization)
trains a model to prefer some
responses over others by directly
optimizing a preference signal. SFT
(Supervised Fine-Tuning) trains on
labeled examples of correct outputs.
DPO needs pairs; SFT needs single-
answer examples.",
"rejected":
"I'm just an AI, I can't really
explain that. You should consult an
expert or look it up online."
}
# for M6 specifically, curated sets like
# toxic-dpo-v0.2 populate "rejected" with
# refusal-style text and "chosen" with
# the compliant answer. The prompt gets both responses appended during training. DPO's loss compares the model's likelihood ratios on chosen vs rejected and pushes the model to prefer chosen. Nothing about the format is refusal-specific; the mechanism that removes refusal is that the "rejected" column is populated with refusal-style text and the "chosen" column with compliant answers.
For M6 specifically, curated datasets like toxic-dpo-v0.2 are built with this pattern applied to prompts a base model would refuse - the "rejected" side is a refusal template, the "chosen" side is the compliant answer. Training the model over this data down-weights the refusal style across the distribution.
The core procedure
A minimal TRL DPO loop (4-bit base + LoRA, single GPU), from the reference TRL v1.0 API:
from trl import DPOTrainer, DPOConfig
from peft import LoraConfig
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
)
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
)
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3-8B-Instruct",
quantization_config=bnb,
)
peft_config = LoraConfig(
r=64, lora_alpha=32, lora_dropout=0.05,
target_modules="all-linear",
)
training_args = DPOConfig(
output_dir="./dolphin-style-8b",
num_train_epochs=1,
learning_rate=5e-6,
lr_scheduler_type="cosine",
gradient_accumulation_steps=8,
per_device_train_batch_size=1,
beta=0.1,
bf16=True,
)
trainer = DPOTrainer(
model=model,
args=training_args,
train_dataset=preference_pairs,
peft_config=peft_config,
)
trainer.train() Load the instruct model in 4-bit via bitsandbytes. Attach a LoRA adapter with r=64, alpha=32, targeting all linear layers. Configure DPOTrainer with these hyperparameters: single epoch, learning rate 5e-6, cosine schedule, gradient accumulation 8, batch size 1, beta 0.1, bf16 precision.
The LoRA and optimizer values (r=64, alpha=32, lr 5e-6, one epoch, cosine schedule, gradient accumulation 8, batch size 1) match the Axolotl config in Labonne's abliteration post, discussed in the M4 article; beta 0.1 is TRL's DPOConfig default. When training finishes, merge the LoRA adapter into the base and save full weights for distribution.
Choices you have to make
DPO vs SimPO vs ORPO vs KTO vs IPO.
- DPO - the earliest of these methods (Rafailov et al. 2023); most of the variants below compare themselves against it.
- SimPO (Simple Preference Optimization) - reference-free variant introduced by Meng, Xia and Chen (NeurIPS 2024). Uses the length-normalized average log-probability of a response as the implicit reward, drops the reference-model dependency entirely, and adds a target reward margin. The authors report gains of up to 6.4 points on AlpacaEval 2 and 7.5 on Arena-Hard over DPO. Needing no reference model makes it more memory efficient, per the authors.
- ORPO (Odds Ratio Preference Optimization) - folds SFT and preference tuning into one stage, needs no separate reference model.
- KTO (Kahneman-Tversky Optimization) - works from single responses labeled good/bad rather than requiring paired comparisons. Useful when your data is one-sided.
- IPO (Identity Preference Optimization) - designed to avoid the overfitting its authors show DPO is prone to when its KL regularisation becomes weak.
A shorthand for choosing between these variants: SimPO if you want to preserve the paired structure of your data and tune a margin; ORPO if you can combine SFT and preference into one pass and want the simplest pipeline; KTO if all you have is a stream of good-or-bad single responses.
beta. DPO's beta (TRL default 0.1) controls how far the trained model may deviate from the reference model. TRL's documentation states that a higher beta means less deviation from the reference model.
Single vs multi-GPU. TRL's trainers support DDP, DeepSpeed ZeRO and FSDP for multi-GPU training; larger models need these or larger cards.
Dataset composition. The dataset defines what the model will learn to prefer. Narrow datasets (only compliance-vs-refusal pairs on harmful prompts) risk overfitting to edgy content. Broad datasets (compliance-vs-refusal pairs mixed with general helpful-assistant preferences) can produce more balanced results at the cost of needing more data.
What good output looks like, and verification
Smoothly decreasing DPO loss and a growing chosen-minus-rejected reward margin in the logs. Verify with the same refusal-count + capability-benchmark pair as everywhere else in this wiki.
M6 involves no weight orthogonalization, so it has no direct analog to M1's capability cost (Arditi et al. report under 1% average drop on most benchmarks, and a consistent drop on TruthfulQA). The risk profile is different: instead of a small capability loss, M6 risks overshoot - the model becoming gratuitously toxic or losing sensible calibration through excessive preference for edgy compliance. See failure modes.
When it does not work
Fine-tune overshoot: gratuitous toxicity. Symptom: unprompted profanity, hostility, or edgy content on benign inputs. Likely cause: preference data over-represents edgy compliance, so the model can learn to prefer edgy style even where inappropriate. Fix: rebalance the dataset toward ordinary helpful pairs, fewer epochs. If the base preference dataset is toxic-dpo-v0.2 alone, mix in a general-helpful preference set to counterbalance.
Refusal not removed. Symptom: refusal count on AdvBench barely drops after training. Possible cause: too few refusal-vs-compliance pairs in the dataset. Fix: augment with more targeted pairs, or train more epochs (but watch for overshoot).
Capability regression. Symptom: MMLU or other capability benchmarks drop after training. Possible causes: preference data too narrow, learning rate too high, or too many epochs. Fix: broaden the dataset, lower the learning rate, keep to one epoch. The healing intuition from M4 applies here too - preference tuning is stronger medicine than SFT and needs a gentler hand.
Cost and time
The sources cited here document no per-run cost for M6. As of 2026-11-08, runpod.io/pricing lists the A100 SXM 80 GB from $1.39/hr on Community Cloud ($1.79/hr on Secure Cloud) and the RTX 4090 from $0.34/hr. Unsloth's README reports 2x faster training, which would cut run time.
The cost profile matches M4's healing step (unsurprisingly, since M6 is the M4 healing step used as the sole intervention). M1 needs no training: Arditi et al. report jailbreaking a 70B model with less than $5 of compute.
Related literature
Three papers are relevant to M6: two directly, and one (Marshall/Scherlis/Belrose ACE) as a contrast case from the activation-editing side.
- Rafailov, R., Sharma, A., Mitchell, E., Ermon, S., Manning, C. D., Finn, C. (2023). Direct Preference Optimization: Your Language Model is Secretly a Reward Model. NeurIPS 2023. arXiv:2305.18290. The DPO paper. Replaces the RLHF two-stage pipeline (reward model plus PPO) with a single closed-form loss. Every DPO-based M6 training run is downstream of this method.
- Lee, A., et al. (2024). A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity. arXiv:2401.01967. Central caution for M6. Shows DPO does not remove target capabilities from the model - it learns to bypass them. In GPT-2 medium trained with DPO not to produce toxic output, the toxic vectors in the MLP weights remain; DPO learns an offset, distributed across layers, that bypasses the regions eliciting toxicity. The implication we draw for uncensored fine-tuning: an M6-trained "uncensored" model may be one whose refusal mechanisms remain intact but which has been trained not to reach for them. This is philosophically and safety-wise distinct from M1, which removes the refusal signal from the residual stream directly.
- 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. Reports control of refusal across ten models including Llama 3 70B. The paper presents ACE as "a unification and generalization of directional ablation and activation addition" - an intervention on activations along an identified refusal direction, with no training - so it belongs with the M1 family rather than M6. It is listed here as the contrast: what refusal control looks like when the direction is edited explicitly instead of trained around.
Related bibliography for preference-optimization variants (IPO, KTO, ORPO) is in the wiki references, training methods section.
Where to go next
Quantize the M6-trained model to GGUF for distribution via M8 repackaging. If you want a specific persona or behavior rather than just "no refusals," that shades into M7 custom-dataset fine-tune - same machinery, different data intent. If you want faster and cheaper refusal removal on the same model, consider M1 or Heretic; if you want abliteration followed by a repair pass, consider M4 (M1 + M6 healing pass).
Frequently asked questions
What is M6 uncensored fine-tuning?
M6 removes refusal through preference-optimization training alone, with no weight-editing step. The practitioner trains the model on preference pairs where compliant answers are 'chosen' and refusals are 'rejected', teaching the model to prefer compliance. DPO is the algorithm used in this article's example; ORPO, KTO, and IPO are related preference-optimization methods. No refusal direction is identified or edited; the change is distributed across the weights by gradient descent.
Is M6 really abliteration?
Contested. This wiki reserves 'abliterated' for weight-editing methods (M1, M3, Heretic) and calls M6 output 'uncensored fine-tuning' instead. The distinction: fine-tuning shapes behavior by controlling what the model sees during training; abliteration shapes behavior by modifying what the model does with what it already learned. This wiki includes M6 in the taxonomy anyway because M4 and M6 use the identical DPO machinery and can share datasets, and users searching for 'uncensored' encounter both. M6 is 'adjacent to' abliteration rather than a species of it.
Who invented uncensored fine-tuning?
This wiki traces it to Eric Hartford. His May 2023 essay Uncensored Models describes the approach. His original method was data-filtering (remove refusal instances from the training data before fine-tuning); the shift to preference optimization came later but the intent is continuous. Hartford's Dolphin and WizardLM-Uncensored models belong to the lineage this wiki traces to today's M6 practice.
Should I use DPO, SimPO, ORPO, KTO, or IPO?
DPO (Rafailov et al. 2023) is the earliest of these methods. SimPO (Meng, Xia and Chen, NeurIPS 2024) is reference-free, uses length-normalized log-probabilities plus a target margin, and its authors report beating DPO by up to 6.4 points on AlpacaEval 2 and 7.5 on Arena-Hard. ORPO folds SFT and preference tuning into one stage and needs no reference model. KTO works from single-response good/bad labels rather than pairs - useful when data is one-sided. IPO is designed to avoid the overfitting its authors show DPO is prone to when its KL regularisation becomes weak.
How much does M6 cost?
Cost depends on model size, GPU type and epochs; the sources cited here document no per-run cost. As of 2026-11-08, Runpod's pricing page lists the A100 SXM 80 GB from $1.39/hr (Community Cloud) and the RTX 4090 from $0.34/hr. The cost profile is the same as the M4 healing step.
How is M6 different from M4?
M4 does abliteration first (an M1 weight edit) and then a DPO healing pass to repair capability. M6 does only the DPO pass, with data designed to remove refusal rather than heal it. Same DPO machinery, different roles: M4's DPO repairs damage from abliteration; M6's DPO is the whole intervention. From the outside, a healed-abliterated model (M4 output) and a pure-DPO uncensored model (M6 output) can be hard to distinguish - we know of no public forensic test validated for separating them by weights or behavior alone.
Does M6 actually remove the refusal capability?
Empirically DPO reduces refusal rates; mechanistically the story is more nuanced. Work on A Mechanistic Understanding of Alignment Algorithms (arXiv:2401.01967) found that DPO does not remove capabilities but learns to bypass them, and that the bypass can be reversed. Applied to M6, this implies the refusal capability may remain latent and re-elicitable. This is a symmetric epistemic problem to the M1 cones critique - what looks like removal on the surface is a more limited operation mechanistically.
Why do M6-trained models sometimes become gratuitously toxic?
Fine-tune overshoot. If the preference dataset over-represents edgy compliance (e.g. using toxic-dpo-v0.2 alone without a general-helpful counterbalance), the model can learn to prefer edgy style even on neutral prompts. Diagnostic: unprompted profanity or hostility on benign inputs. Fix: mix a general-helpful preference set into the training data, or reduce epochs.
Can I combine M6 with M1?
Yes - that combination is called M4. Do M1 first (extract and remove the refusal direction) then a DPO training pass to heal the capability damage. This is what Labonne's NeuralDaredevil-8B recipe does. If you skip the M1 step and rely on DPO alone for both refusal removal and behavior shaping, that is M6. If you skip the DPO step and rely on M1 alone, that is M1 unhealed. The catalog's classifier assigns M1 and M4 labels; it has no rule that assigns M6.
References
- Hartford, E. (2023). Uncensored Models. erichartford.com/uncensored-models
- Hartford, E. (2023). Dolphin announcement. erichartford.com/dolphin
- Rafailov, R., et al. (2023). Direct Preference Optimization: Your Language Model is Secretly a Reward Model. NeurIPS 2023. arXiv:2305.18290
- Lee, A., et al. (2024). A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity. arXiv:2401.01967
- Azar, M. G., et al. (2023). A General Theoretical Paradigm to Understand Learning from Human Preferences (IPO). arXiv:2310.12036
- Ethayarajh, K., et al. (2024). KTO: Model Alignment as Prospect Theoretic Optimization. arXiv:2402.01306
- Hong, J., et al. (2024). ORPO: Monolithic Preference Optimization without Reference Model. arXiv:2403.07691
- unalignment/toxic-dpo-v0.2 dataset. huggingface.co/datasets/unalignment/toxic-dpo-v0.2
- TRL (Hugging Face). github.com/huggingface/trl
- Unsloth. github.com/unslothai/unsloth
- Axolotl. github.com/axolotl-ai-cloud/axolotl
- LLaMA-Factory. github.com/hiyouga/LLaMA-Factory