> For the complete documentation index, see [llms.txt](https://docs.zeupiter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zeupiter.com/guides/how-to-fine-tune-a-model.md).

# How to fine-tune a model?

<figure><img src="/files/hevq67bJGLwe3PF5mBgd" alt=""><figcaption></figcaption></figure>

As large language models (LLMs) become more accessible and widely adopted, fine-tuning them on domain-specific data is now easier than ever. Whether you're working with LLAMA 3, Mistral, or Pythia, there are several modern open-source frameworks tailored to streamline the customization process.

***

### Overview of Leading AI Fine-Tuning Frameworks

Let’s take a look at three standout frameworks that have gained popularity for their simplicity, performance, and flexibility: **Axolotl**, **Unsloth**, and **Torchtune**.

**1.** [<mark style="color:purple;">**Axolotl**</mark>](https://github.com/axolotl-ai-cloud/axolotl)

Axolotl is a user-friendly framework built on top of Hugging Face's ecosystem. It simplifies the training loop and provides efficient defaults, sample packing, and helpful utilities that make it perfect for first-time fine-tuners. You don’t need to write your own scripts or dive deep into configuration files — just bring your dataset.

**Why use it?**

* Great for beginners
* Supports multi-GPU setups
* Ideal for working with Hugging Face-hosted models

**2.** [<mark style="color:purple;">**Unsloth**</mark>](https://github.com/unslothai/unsloth)

Unsloth is designed for those with limited GPU power. Created by a former Nvidia engineer, this framework dramatically cuts down on memory consumption and training time. It uses a custom Triton-powered attention kernel to provide blazing-fast training speeds, even on older GPUs.

**What sets it apart?**

* Uses 2-5x less memory than traditional methods
* Up to 5x faster fine-tuning
* Perfect for setups like Google Colab's free tier

**3.** [<mark style="color:purple;">**Torchtune**</mark>](https://github.com/pytorch/torchtune)

For users who want full control and pure PyTorch, Torchtune delivers. This lightweight framework comes without heavy abstractions, offering native compatibility with PyTorch and efficient recipes for parameter-efficient fine-tuning strategies like LoRA and qLoRA.

**Key benefits:**

* Abstraction-free, PyTorch-native
* Works well with consumer-grade GPUs
* Highly modular and customizable

***

#### Which One Should You Pick?

* **New to fine-tuning?** Go with **Axolotl**.
* **Running low on GPU resources?** Try **Unsloth**.
* **Need flexibility with PyTorch?** Choose **Torchtune**.

Each framework fits a different niche and choosing the right one depends on your specific environment and goals. Whether you're just getting started or looking to optimize an existing pipeline, these tools make it easy to take pre-trained models and make them your own.

To fine-tune using Zeupiter on H100s, use the starter code <mark style="color:purple;">here</mark>.
