AI模型精选72°

torchtune:PyTorch 原生后训练库,高效微调 LLM

torchtune: PyTorch native post-training library

精选理由

做 LLM 微调的研究者或工程师,如果受够了黑盒框架的调试痛苦,torchtune 的模块化设计和 PyTorch 原生体验值得一试,能让你在保持性能的同时自由定制训练流程。

AI 摘要

torchtune 是一个 PyTorch 原生的后训练库,旨在简化大语言模型(LLM)的微调、实验和部署流程。与 Axolotl、Unsloth 等框架相比,torchtune 强调模块化、可定制性和对底层 PyTorch 组件的直接访问,而非牺牲透明度和可扩展性。论文展示了其模型构建器、训练配方和分布式训练栈的设计,并在多种后训练场景中评估了性能。结果表明,torchtune 在保持强性能和内存效率的同时,足够灵活以支持快速研究迭代。该库为可复现的 LLM 后训练研究提供了实用基础。

原文 · arXiv cs.AI

torchtune: PyTorch native post-training library

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.