LlamaFactory bundles CLI and web workflows to fine-tune numerous LLMs and multimodal models with methods from pre-training and SFT through RLHF-style preference optimization and quantized adapters.
Overview
LlamaFactory is a training framework that aims to fine-tune more than a hundred large language and vision-language models through a shared configuration surface. Supported families named in the project include LLaMA, Qwen, Mistral, Mixtral, DeepSeek, Gemma, GLM, Phi, and multimodal variants such as LLaVA and Qwen-VL lines.
Integrated training modes cover continuous pre-training, supervised fine-tuning, reward modeling, and algorithms such as PPO, DPO, KTO, and ORPO. Efficiency options span full-precision tuning, partial freezing, LoRA, and multi-bit QLoRA with several quantization backends, plus integrations noted in the changelog for vLLM, SGLang, Megatron-core, and Ascend NPU usage.
You can start local training from documented quickstart flows, use the LLaMA Board GUI or trainweb.py browser UI for training and evaluation, and build Docker images for deployment scenarios described in the docs, including OpenAI-style API serving with vLLM. Datasets and models can be pulled from hubs such as ModelScope and Modelers, with optional Weights & Biases or SwanLab logging.
Task coverage mentioned spans multi-turn chat, tool use, and multimodal understanding across image, video, and audio inputs. The project publishes ongoing compatibility notes for newly released model families and documents hardware-oriented examples such as QLoRA on limited GPU memory.
Key features
- 100+ LLM and VLM model support
- SFT, DPO, PPO, and related trainers
- LoRA and multi-bit QLoRA tuning
- LLaMA Board and browser training UI
- Docker build and API deployment docs
- vLLM and SGLang inference backends
- ModelScope and Modelers hub downloads
- Multimodal and tool-use fine-tuning
Use cases
- Instruction-tuning open models locally
- Preference alignment with DPO or KTO
- Low-GPU QLoRA experiments
- Multimodal model adaptation
- Serving fine-tuned models via documented APIs