技巧官方一手精选

在 AWS Trainium 上用 torchtitan 训练 Qwen3 的三种方式

精选理由

想在 Trainium 上训 Qwen3 的可以看这篇,AWS 把三条路都跑通了,配置还通用

AWS 官方博客给出在单台 trn2.48xlarge 实例上训练 Qwen3 的三条路径:Hugging Face Transformers v5 建模后端、torchtitan 原生 Qwen3 支持,以及 NKI 混合专家内核。三条路径共用同一个 torchrun 启动器和配置结构,无需改动。文章还涵盖加载和保存 Hugging Face safetensors 格式的权重。

图片来源 · AWS Machine Learning Blog
原文 · AWS Machine Learning Blog

Train Qwen3 on AWS Trainium with torchtitan three ways on a single trn2.48xlarge: the Hugging Face Transformers v5 modeling backend, torchtitan's native Qwen3, and NKI mixture-of-experts kernels. The same torchrun launcher and config structure work unchanged across all three paths, including loading and saving published Hugging Face safetensors.

在 AWS Trainium 上用 torchtitan 训练 Qwen3 的三种方式|AI热报