# LlamaFactory

> An open source framework for fine-tuning 100+ language and vision-language models from a CLI or a web UI

Source: https://talira.ai/catalog/llamafactory-7swv7mxz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [ai / ml / fine tuning](https://talira.ai/categories/ai/ml/fine-tuning), [languages / python](https://talira.ai/categories/languages/python)
- Platforms: linux, windows, docker[^1]
- Licence: Apache-2.0[^1][^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and Apache-2.0.
- API: yes[^1]
- Backed by: [Yaowei Zheng](https://talira.ai/orgs/hiyouga.md)

LlamaFactory (formerly LLaMA-Factory) fine-tunes more than 100 large language and vision-language models, among them Llama, Qwen, Mistral, DeepSeek, Gemma and GLM, without writing training code: you pick a model, dataset and method in its LlamaBoard web UI or a YAML file for its llamafactory-cli. It covers continued pre-training, supervised fine-tuning, reward modelling, PPO, DPO, KTO, ORPO and SimPO, with full, freeze, LoRA and 2- to 8-bit QLoRA tuning, and serves the result through an OpenAI-style API with [vLLM](https://talira.ai/catalog/vllm-f1czevpj.md) or SGLang as the inference backend. It runs on NVIDIA and AMD GPUs and on Huawei Ascend NPUs.

## Links

- Website: https://llamafactory.readthedocs.io/
- GitHub: https://github.com/hiyouga/LlamaFactory
- Docs: https://llamafactory.readthedocs.io/

## Problems it solves

- fine-tune an open model like Qwen or Llama on my own data without writing a training loop
- try LoRA or QLoRA fine-tuning on a single GPU with limited memory
- run DPO or PPO preference tuning on an open LLM from a web UI
- fine-tune a model on Huawei Ascend NPUs

## Features

- Fine-tune 100+ LLMs and vision-language models without writing training code
- LlamaBoard web UI and llamafactory-cli driven by YAML configs
- Pre-training, SFT, reward modelling, PPO, DPO, KTO, ORPO and SimPO
- Full, freeze, LoRA and 2/3/4/5/6/8-bit QLoRA tuning
- GaLore, BAdam, APOLLO, DoRA, LongLoRA, PiSSA and other memory-saving methods
- OpenAI-style API with vLLM or SGLang for inference
- NVIDIA CUDA, AMD ROCm and Ascend NPU support
- Experiment tracking with TensorBoard, Weights & Biases, MLflow and SwanLab

## Limitations

- Needs Python 3.11 or later[^1]
- Fine-tuning needs a GPU or NPU with enough memory: the README estimates 6 GB for 4-bit QLoRA of a 7B model and 120 GB for its full 32-bit fine-tuning[^1]
- Model weights stay under their own licences, which the README asks you to follow[^1]

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known

## Trust

Overall: 0.79 out of 1.
Signals: maintenance 0.90, adoption 0.98, momentum 0.99, community 1.00, backing 0.30, extensibility 0.40.

- last commit 2 days ago
- 45 commits in the last 90 days
- latest release v0.9.5 6 months ago
- 76.3k GitHub stars
- 309 contributors
- backed by Yaowei Zheng

## Alternatives

- [Axolotl](https://talira.ai/catalog/axolotl-9ht2yme4.md): A free and open source framework for fine-tuning and post-training large language models
- [Unsloth](https://talira.ai/catalog/unsloth-sdmq90qx.md): Run and train AI models on your own local hardware via an open-source UI
- [TRL](https://talira.ai/catalog/trl-ryrdxeq8.md): A comprehensive library to post-train foundation models
- [ms-swift](https://talira.ai/catalog/ms-swift-45td67aq.md): Fine-tune, align, evaluate, quantize and deploy 600+ LLMs and 400+ multimodal models
- [Oumi](https://talira.ai/catalog/oumi-wbhhw3jg.md): Fine-tune, evaluate and deploy open LLMs and agents
- [Fireworks AI](https://talira.ai/catalog/fireworks-ai-a7py9e72.md): Run, ensemble and train open models on one platform

## Sources

[^1]: https://github.com/hiyouga/LlamaFactory/blob/main/README.md (checked 25 Nov 2026)
[^2]: https://github.com/hiyouga/LlamaFactory/blob/main/LICENSE (checked 25 Nov 2026)
