Migrate from LLaMA-Factory to Soup CLI
Switching from LLaMA-Factory to Soup CLI takes one command. Soup CLI offers a simpler YAML schema, 2–5× faster training via Unsloth, and a unified CLI for training, serving, and export.
One-line migration
bash
soup migrate --from llamafactory path/to/your/llamafactory_config.yamlThis produces a soup.yaml file equivalent to your LLaMA-Factory config, mapping:
| LLaMA-Factory | Soup CLI |
|---|---|
model_name_or_path | base.model |
stage: sft | task: sft |
finetuning_type: lora | training.lora.enabled: true |
lora_rank | training.lora.r |
lora_alpha | training.lora.alpha |
per_device_train_batch_size | training.batch_size |
template | data.template |
Side-by-side example
LLaMA-Factory config:
yaml
model_name_or_path: meta-llama/Llama-3.1-8B-Instruct
stage: sft
do_train: true
finetuning_type: lora
lora_rank: 16
lora_alpha: 32
dataset: alpaca_en
template: llama3
cutoff_len: 2048
per_device_train_batch_size: 2
gradient_accumulation_steps: 8
learning_rate: 2.0e-4
num_train_epochs: 3Soup CLI equivalent:
yaml
base:
model: meta-llama/Llama-3.1-8B-Instruct
task: sft
data:
train: alpaca_en
format: alpaca
training:
backend: unsloth
epochs: 3
learning_rate: 2.0e-4
batch_size: 2
gradient_accumulation_steps: 8
max_seq_length: 2048
lora:
enabled: true
r: 16
alpha: 32Why migrate?
- Faster training —
backend: unslothgives 2–5× speedup on Llama/Qwen/Gemma/Mistral - Single YAML schema validated by Pydantic v2 (no silent typos)
- Unified CLI —
soup train,soup chat,soup eval,soup serve,soup exportall in one tool - 30 ready-made recipes —
soup recipes list - Built-in GGUF/Ollama export
- Dry-run migration — preview the config with
--dry-runbefore writing
Dry-run preview
bash
soup migrate --from llamafactory config.yaml --dry-runPrints the converted config to stdout without writing.
Related
- [Migrate from Axolotl](/docs/migrate-from-axolotl)
- [Configuration reference](/docs/configuration)