LLaMA-Factory
hiyouga / LLaMA-Factory
One setup for fine-tuning: LoRA, QLoRA, full-parameter and DPO, with a WebUI and model export.
Why choose it
- Data, training and export live in one configuration, so a first fine-tune does not require stitching several libraries together.
- Supports many open model architectures; switching models does not mean rewriting the training loop.
- Ships a WebUI and ready-made recipes, suitable for getting a run working before moving to scripts.
Not for
For very large pretraining or maximum multi-node throughput, look at Megatron-style stacks and TorchTitan.
Non-standard custom architectures still require changes to data templates and model adapters.
Minimum setup
- Pick an official example in the same model family and confirm the data format and chat template.
- Run LoRA on 100–500 samples while recording peak VRAM and loss; do not start with full-parameter training.
- Export merged weights or an adapter, compare against the base model on the same eval set, then decide whether to add data.
Dependencies and cost
Python + PyTorch/CUDA; VRAM depends on the model, sequence length and quantisation; needs weight download access.
License and usage boundaries
Code is Apache-2.0; model weights, datasets and generated content carry their own terms — check each before commercial use.
Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.
Alternatives and neighbors
- Axolotl — Production,One YAML config for fine-tuning: LoRA, QLoRA, full-parameter, DPO, GRPO and multi-node training.
- Unsloth — Start here,Accelerated QLoRA/LoRA fine-tuning: Triton kernels cut VRAM use and training time for 7B–70B models.
Next steps
- Open GitHub and read the README, LICENSE, latest release and issues first.
- Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
- Run a small sample first, then decide on production; never start with production data.