Papers › torchtune: PyTorch native post-training library

torchtune: PyTorch native post-training library

20 May 2026arXiv:2605.21442added by Syntology

Mark Obozov, Maxime Griot, Joseph Cummings, Evan Smothers, Felipe Mello, Rafi Ayub, Philip John Bontrager, Salman Mohammadi, Ariel Kwiatkowski, Nathan Azrak, Mircea Mironenco

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

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.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.21442")

Code

Syntology Ran 9 of 10 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 9 ran with no contract checked.

By repository: found in paper text by Syntology: 10 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

pytorch/torchtune found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 9 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

9ran
1unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from pytorch/torchtune. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_block_causal_mask pytorch/torchtune/torchtune/modules/attention_utils.py found in paper text by Syntology ran BSD-3-Clause (permissive) · ce2cfbcce1fff1e8 · report
get_mapped_key pytorch/torchtune/torchtune/models/convert_weights.py found in paper text by Syntology ran BSD-3-Clause (permissive) · d6cb4e0752c5c9f3 · report
get_scale pytorch/torchtune/torchtune/modules/layer_dropout.py found in paper text by Syntology ran BSD-3-Clause (permissive) · e7e20fb1ae11dd0e · report
kv_offset_mask_flex pytorch/torchtune/torchtune/modules/attention_utils.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 7324b243dab2a3a7 · report
linear_l_loss_scale pytorch/torchtune/torchtune/modules/early_exit_loss.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 30d33d276263130b · report
meta_to_tune pytorch/torchtune/torchtune/models/convert_weights.py found in paper text by Syntology ran BSD-3-Clause (permissive) · d610f46ed966419e · report
slice_str_to_array pytorch/torchtune/torchtune/modules/common_utils.py found in paper text by Syntology ran BSD-3-Clause (permissive) · ba90aa8b068fae78 · report
sum_l_loss_scale pytorch/torchtune/torchtune/modules/early_exit_loss.py found in paper text by Syntology ran BSD-3-Clause (permissive) · f150c4576fb4b428 · report
uniform_loss_scale pytorch/torchtune/torchtune/modules/early_exit_loss.py found in paper text by Syntology ran BSD-3-Clause (permissive) · 76100abddef284dc · report
tune_to_meta pytorch/torchtune/torchtune/models/convert_weights.py found in paper text by Syntology unverified BSD-3-Clause (permissive) · 7ef8e710c01b7493 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.21442, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections