AWS walks through training Qwen3 three ways on Trainium with torchtitan

AWS ML Blog · rss · 2026-10-22

AWS ML Blog publishes a full walkthrough for training Qwen3-4B on a single trn2.48xlarge (16 Trainium2 accelerators) with torchtitan-neuron, three ways: (1) Transformers v5 as a modeling backend via AutoModelForCausalLM with direct HF safetensors load/save — the verified fine-tune starts at loss 6.54 from published weights vs 12.43 from random init; (2) torchtitan's native Qwen3 implementation with SDPA; (3) NKI mixture-of-experts kernels attached via the override registry. All three share the same torchrun launch pattern and config structure, with pinned versions (torch 2.14.x, transformers 5.16.0, torchtitan-neuron release-2.33), install commands, and full config code included.

Original post →

More from Infra

Infra channel →