pytorch
Gives you a Python library for building and training deep learning models, with tensor math that runs on GPUs and a flexible autograd system for computing gradients. Work in familiar Python and reuse libraries such as NumPy and SciPy.
Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)
$ docker run -it --rm --gpus=all --ipc=host hiyouga/llamafactory:latest
Installation
Installation is mandatory.
Install from Source
git clone --depth 1 https://github.com/hiyouga/LlamaFactory.git
cd LlamaFactory
pip install -e .
pip install -r requirements/metrics.txtOptional dependencies available: metrics, deepspeed. Install with: pip install -e . && pip install -r requirements/metrics.txt -r requirements/deepspeed.txt
Additional dependencies for specific features are available in requirements/.
Install from Docker Image
This image is built on Ubuntu 22.04 (x86\64), CUDA 12.4, Python 3.11, PyTorch 2.6.0, and Flash-attn 2.7.4.
Find the pre-built images: https://hub.docker.com/r/hiyouga/llamafactory/tags
Please refer to build docker to build the image yourself.
Create an isolated Python environment with uv:
Install PyTorch
You need to manually install the GPU version of PyTorch on the Windows platform. Please refer to the official website and the following command to install PyTorch with CUDA support:
pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
python -c "import torch; print(torch.cuda.is_available())"
Follow us and give us a star β: https://github.com/Prism-Shadow/penguin-harness
https://github.com/user-attachments/assets/9b7033e8-f08a-4c3f-bd33-547896664e6e
Warp, the agentic terminal for developersAvailable for MacOS, Linux, & Windows |
|---|
π Join our WeChat and NPU user groups.
[ English | δΈζ ]
Fine-tuning a large language model can be easy as...
https://github.com/user-attachments/assets/3991a3a8-4276-4d30-9cab-4cb0c4b9b99e
Start local training:
Start cloud training:
Read technical notes:
Note Except for the above links, all other websites are unauthorized third-party websites. Please carefully use them.
| Support Date | Model Name |
|---|---|
| Day 0 | Qwen3 / Qwen2.5-VL / Gemma 3 / GLM-4.1V / InternLM 3 / MiniCPM-o-2.6 |
| Day 1 | Llama 3 / GLM-4 / Mistral Small / PaliGemma2 / Llama 4 |
Tip Now we have a dedicated blog for LlamaFactory!
Website: https://blog.llamafactory.net/en/
All Blogs
[25/10/26] We support Megatron-core training backend with mcore_adapter. See PR #9237 to get started.
[25/08/22] We supported OFT and OFTv2. See examples for usage.
[25/08/20] We supported fine-tuning the Intern-S1-mini models. See PR #8976 to get started.
[25/08/06] We supported fine-tuning the GPT-OSS models. See PR #8826 to get started.
Full Changelog
[25/07/02] We supported fine-tuning the GLM-4.1V-9B-Thinking model.
[25/04/28] We supported fine-tuning the Qwen3 model family.
[25/04/21] We supported the Muon optimizer. See examples for usage. Thank @tianshijing's PR.
[25/04/16] We supported fine-tuning the InternVL3 model. See PR #7258 to get started.
[25/04/14] We supported fine-tuning the GLM-Z1 and Kimi-VL models.
Gives you a Python library for building and training deep learning models, with tensor math that runs on GPUs and a flexible autograd system for computing gradients. Work in familiar Python and reuse libraries such as NumPy and SciPy.
Skills for the MLflow repository that analyze failed GitHub Actions jobs, review pull requests, triage issues, and enforce Python and workflow coding conventions.
Skills and an MCP server that let Claude Code work with the Hugging Face Hub, covering model training, dataset creation, the hf CLI, and deploying models to Amazon SageMaker.
Gives a machine learning team one place to define features and serve them consistently, so training data and live predictions use the same values. Covers the offline store, online store and feature server.
Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024) Install it with the command on its page. Free and open source.
Is this tool yours?
Claim it with GitHubSubmit a pluginPromote it