AWS published a Torchtitan walkthrough showing three Qwen3 training configurations on one Trainium2 instance, including Transformers and custom kernels.
AWS published a technical walkthrough on October 21, 2026, showing how to run Qwen3 training configurations with PyTorch Torchtitan on a single trn2.48xlarge instance. The guide covers three approaches: using Hugging Face Transformers v5 as the model backend, using Torchtitan’s native Qwen3 implementation, and applying Neuron Kernel Interface mixture-of-experts kernels through torchtitan-neuron recipes.
The walkthrough uses the same torchrun launch pattern and configuration structure across the three approaches. The specified instance contains 16 Trainium2 accelerators and 128 physical NeuronCores, exposed as 64 logical NeuronCores at LNC=2. AWS lists the versions used in its examples, including torch 2.14.0, torch_neuronx 2.14.3, Transformers 5.16.0 and torchtitan-neuron release 2.33. The post cautions that integrations and override modules can change between releases.
For the Transformers route, the example loads Qwen/Qwen3-4B-Instruct-2507 through AutoModelForCausalLM and can load published weights and export the result as Hugging Face safetensors. AWS reports a first-step loss of 6.54 when starting from published weights, compared with 12.43 from random initialization in its verified run. The native Torchtitan route selects a 4B model specification through the configuration.
The third example uses NKI kernels for a Qwen3-30B-A3B mixture-of-experts model, but reduces the model to four layers and 64 experts so the demonstration fits on the single instance. Each token is routed to four experts. AWS explicitly notes that the custom-kernel example demonstrates registration and autograd integration, not a performance improvement.
The guide’s practical focus is on giving developers a common launch and configuration workflow while allowing them to change model implementations or attach specialized kernels. It also explains how to shard model state across the instance’s logical NeuronCores and advises monitoring per-rank memory as model size, sequence length or batch size increases.
