# torchtune

> PyTorch’s official open-source library for authoring, fine-tuning, and experimenting with LLMs.

- Website: https://github.com/pytorch/torchtune
- Category: AI Models & APIs
- Source page: https://opendirs.com/en/tools/torchtune
- Pricing: Open source
- Starting price: $0
- Public API: Yes
- Open source: Yes
- Chinese language: No
- Accessible from mainland China: Unknown
- Platforms: Unknown
- Country: United States
- Last verified: Nov 28, 2026

## Overview

torchtune is PyTorch’s official library for large language model fine-tuning and experimentation. It emphasizes native PyTorch code you can read and modify, with recipes for popular models and training methods. Teams that want to stay close to PyTorch, rather than a more opaque trainer wrapper, often choose it for serious customization.

**Best for:** PyTorch users who want a first-party, readable library for LLM fine-tuning.

## Key features

- Official PyTorch library for LLM fine-tuning and experiments
- Readable, native PyTorch recipes rather than a black-box trainer
- Support for popular models and training methods
- Open source and maintained in the PyTorch ecosystem

## Use cases

- Fine-tuning a model with a recipe you can actually inspect and change
- Adapting an official PyTorch training recipe to an internal dataset
- Teaching or documenting a fine-tune in idiomatic PyTorch

## Pros

- First-party PyTorch support is a strong signal of longevity
- Code is meant to be readable and hackable
- Good fit for teams already standardized on PyTorch

## Cons

- It may feel lower-level than a UI-centric fine-tuning platform
- You still need solid PyTorch and GPU skills

## Alternatives

- [Hugging Face](https://opendirs.com/en/tools/hugging-face.md)
- [LocalAI](https://opendirs.com/en/tools/localai.md)
- [Mistral](https://opendirs.com/en/tools/mistral.md)
- [Together AI](https://opendirs.com/en/tools/together-ai.md)
- [Fireworks](https://opendirs.com/en/tools/fireworks.md)

## FAQ

### What is torchtune?

torchtune is PyTorch’s official library for large language model fine-tuning and experimentation. It emphasizes native PyTorch code you can read and modify, with recipes for popular models and training methods. Teams that want to stay close to PyTorch, rather than a more opaque trainer wrapper, often choose it for serious customization.

### Is torchtune free?

torchtune uses a Open source pricing model (verified Nov 28, 2026).

### Does torchtune have an API?

Yes. torchtune offers an API for developers.

### Does torchtune support Chinese, and is it available in China?

torchtune does not support Chinese, and it has unverified availability in mainland China.

### What are the best alternatives to torchtune?

Popular alternatives to torchtune include Hugging Face, LocalAI, Mistral, Together AI.

_Last verified: Nov 28, 2026_