Two enhancements to vanilla LoRA
LoRA gets you most of the way there for most tasks. Two named refinements extend its reach in specific directions — QLoRA for fitting bigger base models in less memory, DoRA for closing the quality gap to full fine-tuning. mlx-lm supports both with minimal extra ceremony.
QLoRA — train an adapter on top of a quantized base
QLoRA is the technique of quantizing the base model to 4-bit during training, then training the (full-precision) LoRA adapter on top of it. The base model takes ~25% of the memory it would in fp16; the adapter is small either way. Result: you can fine-tune a 70B model on hardware that couldn't fit a 70B in fp16 even at inference.
In mlx-lm, QLoRA is the implicit name for what happens when you point --model at an already-quantized base (e.g. mlx-community/Mistral-7B-Instruct-v0.3-4bit). There's no --qlora flag — quantization-aware training is automatic when the base model is quantized. The training math is the same as vanilla LoRA; the memory savings come from the base model's quantization, which mlx-lm handles transparently.
DoRA — better quality at the same parameter count
DoRA (Weight-Decomposed Low-Rank Adaptation) decomposes the weight update into two parts: a magnitude vector and a direction matrix. Train both. Empirically, DoRA closes most of the remaining quality gap between LoRA and full fine-tuning at the same parameter budget — the cost is a small increase in compute and memory per step.
In mlx-lm, you switch on DoRA with --fine-tune-type dora. Same data format, same other flags, drop-in replacement.
When to reach for each
- Default — vanilla LoRA on a quantized base (effectively QLoRA). Covers 90% of cases.
- Going bigger than your machine should allow — quantize the base more aggressively (Q4 with mixed-precision). Pure QLoRA territory.
- LoRA quality is plateauing and you've already raised rank — try DoRA. Same training command with one flag changed.
- You're considering full fine-tuning — try DoRA at higher rank first; the math usually argues against full.
What you don't need to think about
You don't pick "LoRA" vs "QLoRA" explicitly — the latter is just LoRA on top of a quantized base, which mlx-lm handles automatically. You only explicitly switch fine-tune type when going to DoRA or (rarely) full.