torchtune: PyTorch native post-training library

πŸ“… 2026-05-20
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF

career value

204K/year
πŸ€– AI Summary
This work addresses the lack of transparent, scalable, and deeply PyTorch-integrated open-source tools for post-training large language models, which hinders research iteration and deployment efficiency. We propose a native PyTorch-based, modular post-training framework centered on the principle of β€œhackability,” offering composable model builders, training recipes, and a distributed training stack that support diverse fine-tuning strategies and hardware configurations. While maintaining high performance and memory efficiency, the framework significantly enhances code transparency and research flexibility. Empirical evaluations demonstrate that it matches or even surpasses mainstream tools such as Axolotl and Unsloth across multiple post-training scenarios, thereby facilitating efficient and reproducible scientific exploration.
πŸ“ Abstract
Modern LLMs typically require multistage training pipelines to achieve strong downstream performance, with post-training serving as the main interface for adapting open-weight models. We introduce torchtune, a PyTorch-native library designed to streamline the post-training lifecycle of LLMs, enabling efficient fine-tuning, experimentation, and deployment-oriented workflows. Unlike many existing fine-tuning frameworks, which often optimize for ease of use, specialized recipes, or hardware efficiency at the cost of transparency and extensibility, torchtune emphasizes modularity, hackability, and direct access to the underlying PyTorch components. In this paper, we present the design principles behind torchtune, describe how they are reflected in its model builders, training recipes, and distributed training stack, and evaluate the library across representative post-training settings. We compare against popular fine-tuning frameworks, including Axolotl and Unsloth, and show that torchtune provides strong performance and memory efficiency across many settings while remaining flexible enough for rapid research iteration. These results position torchtune as a practical foundation for reproducible LLMs post-training research.
Problem

Research questions and friction points this paper is trying to address.

post-training
large language models
fine-tuning
modularity
extensibility
Innovation

Methods, ideas, or system contributions that make the work stand out.

modularity
hackability
PyTorch-native
post-training
distributed training
πŸ”Ž Similar Papers
2024-08-10AAAI Conference on Artificial IntelligenceCitations: 30
2024-10-09International Conference on Learning RepresentationsCitations: 14
M
Mark Obozov
Work done at PyTorch, Meta
M
Maxime Griot
Work done at PyTorch, Meta; Stanford
J
Joseph Cummings
Work done at PyTorch, Meta
E
Evan Smothers
Work done at PyTorch, Meta
F
Felipe Mello
Work done at PyTorch, Meta
R
Rafi Ayub
Work done at PyTorch, Meta
P
Philip John Bontrager
Work done at PyTorch, Meta
Salman Mohammadi
Salman Mohammadi
Axolotl AI
representation learningRLHFreinforcement learning
Ariel Kwiatkowski
Ariel Kwiatkowski
Meta AI
reinforcement learningartificial intelligenceAI safetyCrowd Simulation
N
Nathan Azrak
M
Mircea Mironenco