Skip to content

Migrate from Axolotl to Soup CLI

Axolotl is a popular fine-tuning framework. Soup CLI can import Axolotl configs directly with soup migrate.

One-line migration

bash
soup migrate --from axolotl path/to/axolotl_config.yml

Field mapping

AxolotlSoup CLI
base_modelbase (a root-level string, not base.model)
datasets[0].pathdata.train
datasets[0].typedata.format
sequence_lendata.max_length (sequence length lives under data, not training)
val_set_sizedata.val_split, and 0 when the key is absent, because axolotl trains on every row by default (since v0.77.0; through v0.76.1 the split was dropped and Soup's default of 0.1 applied)
micro_batch_sizetraining.batch_size
gradient_accumulation_stepstraining.gradient_accumulation_steps
num_epochstraining.epochs
adapter: lora / qloratraining.lora.r (+ training.quantization: 4bit for qlora)
no adaptertraining.lora.r: 0 and training.quantization: none, a full fine-tune, with a warning. Only sft and embedding runs can do this: any other task exits 1
lora_r / lora_alphatraining.lora.r / training.lora.alpha
lora_target_linear: truetraining.lora.target_modules: all-linear (since v0.77.0; through v0.76.1 it gave auto, which adapts two of the seven projections on Llama). lora_target_modules is copied as written
load_in_4bit: truetraining.quantization: 4bit (the key is quantization, not quant)
load_in_8bit: truetraining.quantization: 8bit
neither load_in_4bit nor load_in_8bit, and adapter: loratraining.quantization: none, written explicitly
rl:task: dpo, ipo, kto, orpo and simpo give the task of the same name, grpo and gdpo give grpo. Any other value exits 1
flash_attention: truetraining.use_flash_attn: true for sft and tts only. For any other task the importer drops it with a warning, because Soup refuses use_flash_attn there. On task: sft it loads with the default backend: transformers; backend: unsloth, a vision or audio modality also refuse it at load since v0.77.2

Example conversion

Axolotl:

yaml
base_model: mistralai/Mistral-7B-v0.3
load_in_4bit: true
adapter: qlora
datasets:
  - path: tatsu-lab/alpaca
    type: alpaca
sequence_len: 2048
micro_batch_size: 2
gradient_accumulation_steps: 8
num_epochs: 3
learning_rate: 0.0002
lora_r: 16
lora_alpha: 32
flash_attention: true

Soup CLI (equivalent config; soup migrate leaves backend at its default and writes use_flash_attn: true and, since v0.77.0, val_split: 0.0. This version adds backend: unsloth by hand and therefore drops use_flash_attn, which backend: unsloth refuses at load since v0.77.2; see the note under it):

yaml
base: mistralai/Mistral-7B-v0.3
task: sft
backend: unsloth            # root-level, NOT under training

data:
  train: tatsu-lab/alpaca
  format: alpaca
  max_length: 2048          # sequence length lives under data
  val_split: 0.0            # the source has no val_set_size: axolotl trains on every row

training:
  quantization: 4bit        # the key is quantization, not quant
  epochs: 3
  lr: 2.0e-4                # the key is lr, not learning_rate
  batch_size: 2
  gradient_accumulation_steps: 8
  lora:
    r: 16                   # LoRA turns on when r > 0; there is no enabled flag
    alpha: 32

Do not add use_flash_attn: true to this config. soup migrate writes it for flash_attention: true, and it loads as written because the importer leaves backend at its default, transformers. But backend: unsloth loads its own model with no attn_implementation and no Liger patch, so on a task: sft config Soup 0.77.2 refuses use_flash_attn and use_liger there at load (exit 1 from soup train, exit 2 from soup doctor --config), naming the field and the setting that selects the path: training.use_flash_attn is not applied by task='sft' with backend='unsloth' ... Use backend: transformers, or remove the key. A value of false loads. Through v0.77.1 the same config loaded and trained without FlashAttention, so a soup.yaml that carries both backend: unsloth and a migrated use_flash_attn: true stops loading on 0.77.2 until you remove one of the two (#2278, by @abdulwaarith0). Pick one: keep backend: unsloth and delete use_flash_attn, or delete the backend line and keep use_flash_attn: true on the transformers backend.

With backend: unsloth, add training.gradient_checkpointing: true if you want Unsloth's checkpointing (the importer writes none: an axolotl gradient_checkpointing key is not mapped and is named in the not-migrated warning): since v0.77.0 the Unsloth backend honours the key, and the default false turns checkpointing off (#1981).

Since v0.77.0 every source key the importer does not map is listed in one N axolotl key(s) not migrated warning (#1807, #1901). If the source sets sample_packing, the importer warns and does not map it; set training.packing (or training.multipack) by hand. An adapter other than lora or qlora has no Soup equivalent: the importer warns and writes LoRA.

If you migrated before v0.77.0

Regenerate and diff (#1807, #1901): through v0.76.1 the importer dropped val_set_size, so Soup's val_split: 0.1 held out a tenth of the rows where axolotl trains on every row by default, and it turned lora_target_linear: true into target_modules: auto, two of the seven projections on Llama.

If you migrated before v0.76.0

Check the soup.yaml you generated, because the importer changed what it writes. Upstream's changelog lists what was wrong or has changed:

  • An unquantized source wrote no quantization line, so Soup loaded it as 4-bit QLoRA, and a source with no adapter got LoRA r=64 instead of a full fine-tune (#1215, #1302). An Axolotl config that sets load_in_4bit or adapter: qlora was not affected.
  • rl: orpo, ipo and simpo became task: sft with no warning. They now map to their own tasks, and an rl: value with no Soup task exits 1 naming it (#1254).
  • flash_attention: true was mapped to use_flash_attn for every task. Only sft and tts read it, and since v0.76.0 the loader refuses it on any other task, so a non-SFT soup.yaml from an older importer that carries it no longer loads; the importer now drops it with a warning there (#806, #983).

If your source was bf16 or a full fine-tune, or used one of those rl: values, the run you got may not have been the run you meant. Regenerate and diff. Details for all three importers are on Migration.

What you gain

  • One CLI for train / chat / eval / serve / export instead of separate tools
  • An optional Unsloth backend (backend: unsloth, pip install "soup-cli[fast]")
  • GGUF / Ollama / vLLM / SGLang export and serving built-in
  • Loss watchdog, curriculum learning, sample packing, freeze training

Dry-run

bash
soup migrate --from axolotl axolotl.yml --dry-run

The importer checks its result with Soup's own config loader before it writes anything, so the file it hands back loads. Run soup doctor --config soup.yaml on it before you train: it shows the loader's errors and warnings, and a clean report is not a guarantee that every key takes effect.

Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.