One interface for supervised, RLHF, and parameter-efficient training
LLaMA Factory is an open-source framework that simplifies training and fine-tuning large language models. It offers a unified interface for methods such as supervised fine-tuning (SFT), RLHF, and QLoRA, and supports a wide range of LLM architectures including LLaMA, Mistral, and Qwen.
You'll set up LLaMA Factory on your hardware platform to fine-tune large language models with LoRA, QLoRA, and full fine-tuning methods, using the CLI and example configs from the upstream repository.
Required:
Optional:
Use the matrix below to confirm your hardware platform, recommended default local settings, and whether multi-node applies.
| Hardware platform | OS | Memory | Recommended default local settings | Multi-node capable hardware |
|---|---|---|---|---|
| DGX Spark | DGX OS (Linux) | 64GB or 128GB Unified Memory | Python venv + PyTorch CUDA 13.0 (cu130) | — |
Hardware requirements
df -hSoftware requirements
nvcc --versiongit --versionpython3 --version && pip3 --versionpython3-dev): sudo apt install -y python3-devAll required assets are in the LLaMA Factory repository.
examples/train_lora/qwen3_lora_sft.yaml — example LoRA SFT training configurationexamples/inference/qwen3_lora_sft.yaml — example chat/inference configuration for the fine-tuned adapterexamples/merge_lora/qwen3_lora_sft.yaml — example export/merge configuration for production usefactoryEnv and LLaMA-Factory directories. Delete local training checkpoints to reclaim storage.python3-dev prerequisite so training no longer fails with Python.h: No such file or directory on a fresh system