{"name":"LLaMA-Factory: Unified Efficient Fine-Tuning for 100+ LLMs & VLMs","description":"LLaMA-Factory is an open-source project offering a unified and efficient framework for fine-tuning over 100 large language models (LLMs) and vision-language models (VLMs). Recognized at ACL 2024, it provides a comprehensive suite of tools and algorithms for various training approaches. This repository simplifies the complex process of adapting powerful models for specific tasks with ease and scalability.","github":"https://github.com/hiyouga/LLaMA-Factory","url":"https://osrepos.com/repo/hiyouga-llama-factory","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/hiyouga-llama-factory","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/hiyouga-llama-factory.md","json":"https://osrepos.com/repo/hiyouga-llama-factory.json","topics":["ai","fine-tuning","llm","llama","lora","qlora","python","transformers"],"keywords":["ai","fine-tuning","llm","llama","lora","qlora","python","transformers"],"stars":null,"summary":"LLaMA-Factory is an open-source project offering a unified and efficient framework for fine-tuning over 100 large language models (LLMs) and vision-language models (VLMs). Recognized at ACL 2024, it provides a comprehensive suite of tools and algorithms for various training approaches. This repository simplifies the complex process of adapting powerful models for specific tasks with ease and scalability.","content":"## Introduction\n\nLLaMA-Factory, developed by hiyouga, is a highly popular and robust framework designed for the unified and efficient fine-tuning of a vast array of large language models (LLMs) and vision-language models (VLMs). With over 62,000 stars and 7,500 forks on GitHub, it stands out as a go-to solution for researchers and developers in the AI community. The project, written primarily in Python and licensed under Apache-2.0, was recognized at ACL 2024 for its significant contributions to the field of efficient model adaptation.\n\n## Installation\n\nGetting started with LLaMA-Factory is straightforward. You can install it directly from the source or use a pre-built Docker image.\n\nTo install from source, clone the repository and install the necessary dependencies:\n\nbash\ngit clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git\ncd LLaMA-Factory\npip install -e \".[torch,metrics]\" --no-build-isolation\n\n\nFor users preferring Docker, a pre-built image is available, simplifying environment setup:\n\nbash\ndocker run -it --rm --gpus=all --ipc=host hiyouga/llamafactory:latest\n\n\n## Examples\n\nLLaMA-Factory provides intuitive command-line interface (CLI) commands for common tasks such as fine-tuning, inference, and model merging. Here are quickstart examples for the Llama3-8B-Instruct model:\n\nTo perform LoRA fine-tuning:\n\nbash\nllamafactory-cli train examples/train_lora/llama3_lora_sft.yaml\n\n\nTo run inference with the fine-tuned model:\n\nbash\nllamafactory-cli chat examples/inference/llama3_lora_sft.yaml\n\n\nTo merge the LoRA adapters back into the base model:\n\nbash\nllamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml\n\n\nAdditionally, LLaMA-Factory offers a user-friendly Web UI for fine-tuning models in your browser:\n\nbash\nllamafactory-cli webui\n\n\n## Why Use LLaMA-Factory\n\nLLaMA-Factory is a powerful tool for anyone working with large language models, offering a wide range of features and benefits:\n\n*   **Extensive Model Support**: It supports over 100 models, including popular ones like LLaMA, LLaVA, Mistral, Mixtral-MoE, Qwen, DeepSeek, Yi, and Gemma, ensuring compatibility with the latest advancements.\n*   **Diverse Training Approaches**: The framework integrates various methods such as supervised fine-tuning (SFT), reward modeling, PPO, DPO, KTO, and ORPO, catering to different training paradigms.\n*   **Scalable and Efficient Tuning**: It supports 16-bit full-tuning, freeze-tuning, LoRA, and 2/3/4/5/6/8-bit QLoRA via multiple quantization techniques, allowing for efficient training even on limited hardware.\n*   **Advanced Algorithms and Tricks**: LLaMA-Factory incorporates cutting-edge algorithms like GaLore, BAdam, APOLLO, DoRA, LongLoRA, and PiSSA, alongside practical tricks such as FlashAttention-2, Unsloth, and RoPE scaling for enhanced performance.\n*   **Comprehensive Experiment Monitoring**: It integrates with popular experiment monitors like LlamaBoard, TensorBoard, Wandb, and SwanLab, providing robust tracking and visualization capabilities.\n*   **Faster Inference**: The platform offers faster inference through an OpenAI-style API, Gradio UI, and CLI, leveraging backends like vLLM and SGLang for high-throughput deployments.\n\n## Links\n\nExplore LLaMA-Factory further through these official resources:\n\n*   **GitHub Repository**: [hiyouga/LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory){:target=\"_blank\"}\n*   **Official Documentation**: [LLaMA-Factory Docs](https://llamafactory.readthedocs.io/en/latest/){:target=\"_blank\"}\n*   **Colab Notebook**: [Open in Colab](https://colab.research.google.com/drive/1eRTPn37ltBbYsISy9Aw2NuI2Aq5CQrD9?usp=sharing){:target=\"_blank\"}\n*   **Discord Community**: [Join Discord](https://discord.gg/rKfvV9r9FK){:target=\"_blank\"}\n*   **Twitter**: [Follow @llamafactory_ai](https://twitter.com/llamafactory_ai){:target=\"_blank\"}","metrics":{"detailViews":1,"githubClicks":8},"dates":{"published":null,"modified":"2025-11-08T12:01:24.000Z"}}