skillfed

llamafactory

Unified Efficient Fine-Tuning of 100+ LLMs

llamafactory v0.9.5 101.6K downloads/30d#12,922 on PyPI74,099
Permissive license Apache-2.0 Active released

What it is and what it does

LLaMA Factory is a unified framework for fine-tuning large language models, designed to reduce the friction of adapting pre-trained models to specific tasks or domains. It abstracts away boilerplate training code and provides both command-line and web UI entry points, letting users configure training runs through YAML or the Gradio interface without writing custom training loops. The package bundles support for multiple training paradigms—supervised fine-tuning, reward modeling, reinforcement learning methods like DPO and PPO, and quantization-aware training—across a broad range of model families.

The package depends on a substantial ecosystem: PyTorch, Hugging Face Transformers, PEFT for parameter-efficient tuning, and supporting libraries for data handling, optimization, and inference. It integrates with experiment tracking tools (Weights & Biases, MLflow, SwanLab), model hubs (Hugging Face, ModelScope), and inference servers (vLLM, SGLang). The framework targets researchers and practitioners who want to customize LLMs without managing low-level training infrastructure, and it is actively maintained with support for newly released model architectures.

Use it for:

  • Fine-tune a Qwen or Llama model on domain-specific instruction data using LoRA to reduce memory footprint
  • Adapt a vision-language model like LLaVA for custom image understanding tasks via the web UI
  • Run reward modeling and DPO training on a base model to align outputs with human preferences
  • Quantize and fine-tune a large model with QLoRA to fit on consumer GPUs
  • Deploy a fine-tuned model with OpenAI-compatible API endpoints using vLLM integration

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

LLaMA Factory provides a unified framework for fine-tuning 100+ large language models through CLI and web UI, supporting multiple training methods and model architectures with minimal setup.

Yes, if you need to fine-tune LLMs without writing training code. The framework is actively maintained, has no known vulnerabilities, and is used by major organizations (Amazon, NVIDIA, Aliyun). The Apache-2.0 license is permissive. Install friction is low, but you must have Python 3.11+, GPU resources (or significant CPU), and be comfortable with the 31-dependency stack. Start with the free Colab notebook or PAI-DSW trial to evaluate before committing to local setup.

Install

llamafactory on PyPI

pip

pip install llamafactory

uv

uv add llamafactory

poetry

poetry add llamafactory

Installing llamafactory

Before you install

Low friction installation with a pure Python wheel. Active maintenance with recent releases; 74099 repository stars and last commit on 2026-08-13 signal sustained development. Requires Python 3.11+ and 31 runtime dependencies including torch, transformers, and peft—a substantial but typical stack for deep learning work.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for both research and production deployments.

Quickstart

pip install llamafactory

from llamafactory.cli import main
main()

Requires Python 3.11 or later; torch and transformers must be installed; GPU or substantial CPU resources needed for actual model training.

Verify before relying

  • Exact model count and which specific models are supported beyond the 100+ claim in the summary
  • Performance benchmarks or training speed comparisons across different quantization methods
  • Memory requirements for fine-tuning models of different sizes
  • Whether the web UI (LLaMA Board) can run on CPU-only systems

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11.0)
Install friction low — pure-Python wheel
Runtime dependencies 31 — accelerate, av, datasets, einops, fastapi, fire, gradio, hf-transfer, matplotlib, modelscope, numpy, omegaconf, packaging, pandas, peft, protobuf, pydantic, pyyaml, safetensors, scipy, sentencepiece, sse-starlette, tiktoken, torch, torchaudio, torchdata, torchvision, transformers, trl, tyro
Maintenance actively maintained — 76 days since the last release
Last repo commit
First released
Downloads 101,638/month — #12,922 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: llamafactory-0.9.5-py3-none-any.whl

Keywords: AI, ChatGPT, DeepSeek, GPT, LLM, Llama, Pytorch, Transformer

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

llm fine-tuning frameworklarge language model trainingzero-code model adaptationmulti-model fine-tuning platformlora and quantization trainingtransformer model customizationllm instruction tuning
llm-trainingmodel-adaptationparameter-efficient-tuning

More Artificial Intelligence packages

Further reading