
What happened
AWS walked through training Qwen3 three ways on one trn2.48xlarge — via Hugging Face Transformers v5, torchtitan's native Qwen3, and NKI mixture-of-experts kernels — all using the same torchrun launcher.
Why it matters
Hedge: this is a documented example rather than a claim of performance gains.
Summaries like this, in your inbox every morning.
The post is structured around three configurations that differ in how the model is built, not in how the job is launched. In the first, Transformers v5 supplies the Qwen3 implementation through AutoModelForCausalLM, and the config simply sets the Hub ID. The second swaps in torchtitan's native Qwen3Model by changing config.model_spec, starting from qwen3_32b() and replacing the model spec with the 4B variant because the tested build lacks a generic 4B builder. The third goes further, replacing the mixture-of-experts block with NKI grouped-experts kernels through qwen3_nki_moe_config(), reduced to 4 layers and 64 experts so it fits on one trn2.48xlarge.
The custom-kernel section is the most procedural. A kernel from nkilib is wrapped with wrap_nki and registered as a PyTorch operator, and a second operator handles the backward pass with saved routing metadata. A numerical check compared rope_hf against torchtitan's PyTorch rotary embedding with float32 inputs; the run reported a maximum absolute difference of 0.0 for query and key. The authors describe this part as demonstrating registration and autograd integration, not performance improvement.
What ties the three paths together is the launcher and the override mechanism. Data parallel sharding is set with data_parallel_shard_degree = -1 across 64 ranks, and tensor parallelism can be layered on the same multidimensional DeviceMesh. Overrides are scoped with fully qualified names so that, for example, fqns=["layers.1[0-9].attention.rope"] targets rotary embeddings in layers 10 through 19. torchtitan halts when two overrides claim the same node. This points to a workflow where switching between Hub-defined and native implementations, or attaching custom kernels, is a configuration change rather than a different training stack.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
At GTC Berlin, Jensen Huang introduced DSX POD — seven Vera Rubin NVL72 racks per container — and said deploym…
Opposable launched an AI agent that operates Android phones via accessibility services and iPhones through a c…

On Meta's third quarter earnings call, CEO Mark Zuckerberg said the company has a goal of serving billions of…

OpenAI's GPT-5.6 Sol tracked down the PHP flaw under Patch-the-Planet, and Wiz independently found the same is…

OpenAI said its GPT-5.6 Sol identified the critical PHP flaw as part of its Patch the Planet initiative; secur…

The PHP Foundation disclosed two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, collectively c…
