Skip to content

LlamaFactory

Fine-tuning framework for 100+ LLMs and vision-language models, with a web UI as well as a command line.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

4.3/5

LlamaFactory turns fine-tuning into a web form across 100+ open models, which suits experiments better than a pinned production pipeline.

What it is

LlamaFactory is a fine-tuning framework that supports more than 100 language and vision-language models. You can configure and launch training from a web interface (LlamaBoard, built on Gradio) or from the command line with YAML files.

It supports LoRA, QLoRA from 2 to 8 bits, freeze and full fine-tuning, and preference methods such as DPO, KTO, ORPO and PPO, and runs on NVIDIA GPUs, Huawei Ascend NPUs and, in recent commits, Intel XPU and Biren accelerators. It was published as a paper at ACL 2024.

The last tagged release, v0.9.5, came out on 30 May 2026 and is still the version on PyPI; the main branch is active, with commits as recent as 21 October 2026.

Our review

LlamaFactory is the most approachable way to fine-tune a wide range of open models without writing training code. LlamaBoard lets you pick a model, dataset and method, watch the loss curve and chat with the result, and the same runs exist as YAML files for llamafactory-cli. With about 75,700 GitHub stars it sits near Unsloth in popularity.

Its estimated VRAM table is the most useful planning page in the README. LoRA on a 7B model needs about 16 GB and 4-bit QLoRA about 6 GB, while 4-bit QLoRA on a 70B model needs about 48 GB and full 16-bit fine-tuning of 7B starts at 60 GB. FSDP with QLoRA fits a 70B model across two 24 GB GPUs, and the project blog describes KTransformers fine-tuning of 1,000-billion-parameter models on two RTX 4090s plus CPU memory. Support for Ascend NPUs, with ready Docker images, is a real reason to choose it over CUDA-only tools.

The release story is weaker. v0.9.5 from May is still the latest tag and the latest PyPI version, so anyone wanting recent model support installs from main, and some models need transformers from its main branch too. The English README's changelog stops at October 2025, so documentation and code can disagree.

The serving side needs care. Four GitHub security advisories have been published, three rated high, including remote code execution in June 2025 and SSRF with local file read in the chat API in October 2025. The web UI and OpenAI-style API belong on a trusted machine, not the open internet. Against its neighbours, Unsloth chases single-GPU speed and memory and Axolotl is the usual pick for reproducible multi-node runs; LlamaFactory's bet is breadth behind one interface, which is also why its option panel overwhelms first-time users.

Where it earns its place

  • An ML engineer with one 24 GB RTX 4090

    Fine-tune a 7B to 14B model on internal support transcripts

    Use LoRA (about 16 GB for 7B) or 4-bit QLoRA (about 12 GB for 14B) from LlamaBoard or a YAML file, then serve the adapter through the built-in OpenAI-style API with vLLM. No licence fee; the cost is your own GPU time.

  • A university lab running on Huawei Ascend 910B hardware

    Fine-tune Qwen or GLM models without CUDA

    Pull the Ascend Docker images (Ubuntu or openEuler builds) and follow the NPU install guide. Few fine-tuning tools document NPU support this thoroughly, which spares the lab from porting training code.

  • A product manager at a bank testing whether fine-tuning beats prompting

    Compare several open models quickly without an ML team writing code

    LlamaBoard lets an analyst swap models and methods from a form, with DPO and KTO for preference tuning. Model weights keep their own licences, such as Llama's or Gemma's terms, which legal must clear before production.

Before you commit

Setup
Clone and pip install -e . (Python 3.11 or later, PyTorch 2.x, CUDA 11.6 or later), or docker run --gpus=all hiyouga/llamafactory:latest; llamafactory-cli webui then opens LlamaBoard on port 7860.
Integrations
Hugging Face and ModelScope models and datasets; DeepSpeed, FSDP and Megatron-core; FlashAttention-2, Unsloth and Liger kernels; TensorBoard, Weights & Biases, MLflow and SwanLab logging; vLLM or SGLang inference behind an OpenAI-style API.
Data and privacy
Runs locally; data leaves only if you turn on a cloud logger such as Weights & Biases or SwanLab or pull gated Hugging Face datasets. The code is Apache-2.0, but each model's weights carry their own licence. Four security advisories to date, including RCE.
Cost at scale
Free software, so hardware is the bill. Per the README's estimates, 4-bit QLoRA on a 70B model needs about 48 GB (one 80 GB GPU) and 16-bit LoRA about 160 GB (at least two), while full pure-bf16 training of 70B needs around 600 GB.
Limits
Tagged releases trail main by months; new models often need transformers from main; 1,202 open issues and pull requests; the breadth of options makes misconfiguration easy.

What's good

  • Gradio web UI and YAML CLI for the same runs
  • 100+ text and vision-language models
  • Published VRAM estimates per method and model size
  • NVIDIA, Ascend NPU and Intel XPU support

What's not

  • Last tagged release May 2026
  • Past RCE and SSRF advisories in the serving code
  • English docs lag the code
  • Many options to navigate

Best for

People who want to fine-tune many different open models through a graphical interface.

Alternatives

LlamaFactory: common questions

Is LlamaFactory worth it?
LlamaFactory turns fine-tuning into a web form across 100+ open models, which suits experiments better than a pinned production pipeline. We rate it 4.3 out of 5.
How much does LlamaFactory cost?
Free and open source under the Apache 2.0 license.
What are the downsides of LlamaFactory?
Last tagged release May 2026; past RCE and SSRF advisories in the serving code; english docs lag the code; many options to navigate.
Who is LlamaFactory best for?
People who want to fine-tune many different open models through a graphical interface.
How much does LlamaFactory cost for a team or in production?
Free software, so hardware is the bill. Per the README's estimates, 4-bit QLoRA on a 70B model needs about 48 GB (one 80 GB GPU) and 16-bit LoRA about 160 GB (at least two), while full pure-bf16 training of 70B needs around 600 GB.
Is LlamaFactory safe for company data?
Runs locally; data leaves only if you turn on a cloud logger such as Weights & Biases or SwanLab or pull gated Hugging Face datasets. The code is Apache-2.0, but each model's weights carry their own licence. Four security advisories to date, including RCE.
What are the best LlamaFactory alternatives?
The closest alternatives we have reviewed are Unsloth, Axolotl and TRL.

Answers checked Oct 23, 2026.

Make LlamaFactory? Show this rating on your siteLlamaFactory rated 4.3 out of 5 on ReviewRamble