# AWS releases TorchNeuron to run PyTorch models on Trainium with minimal code changes

published: 2026-11-09T11:05:31.565Z
topic: infrastructure
source: https://www.infoq.com/news/2026/11/aws-torchneuron-trainium-pytorch/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=AI%2C+ML+%26+Data+Engineering
url: https://aiagentnews.io/stories/aws-releases-torchneuron-to-run-pytorch-models-on-trainium-with-minimal-code

AWS introduced TorchNeuron, a native PyTorch backend that runs existing PyTorch code on Trainium chips with virtually no code changes. Amazon says a single configuration change is enough to switch hardware and that training and inference capacity can be shared.

Amazon introduced TorchNeuron at the PyTorch Conference North America 2026, describing it as a native PyTorch backend that lets developers run existing PyTorch code on AWS Trainium chips with almost no code changes. According to the TorchNeuron documentation, when code uses torch.accelerator for device detection, the only required change is replacing .to('cuda') with .to('neuron'). The backend also supports distributed training and PyTorch parallelism APIs, including DDP, FSDP2 and DTensor.

Amazon says enterprises can move resources from inference to training during off-peak hours on the same hardware. Colin Brace, vice president at Amazon Annapurna Labs, who leads the team behind TorchNeuron, said the team validated the 100,000 most popular models and more than 800 ML architectures.

TorchNeuron also exposes the Neuron Kernel Interface, which lets developers write custom operators and call NKI kernels directly in model code to replace sequences of standard PyTorch operations. Cartesia is using it for voice AI inference, and the Lieber Institute for Brain Development is exploring drug target identification and discovery.

## Why it matters if you build agents

Teams whose agents rely on PyTorch models can test those models on Trainium without rewriting or revalidating them, which lowers the cost of trying a second hardware option. Anyone adopting it should measure performance, cost per token and reproducibility on their own workloads, since the announcement gives adoption examples but no benchmark figures.
