On October 20, 2026, AWS Trainium gained a native PyTorch backend called TorchNeuron that runs Hugging Face model libraries directly on the chip without a separate translation layer, according to a Hugging Face blog post.

The move removes the need for the Optimum Neuron library, which previously required custom model classes and graph-compilation workarounds, the post said. It gives developers the same device-switching experience they have on GPUs, potentially expanding demand for Amazon’s custom AI silicon among users of the dominant PyTorch framework.

Before TorchNeuron, AWS Trainium and Inferentia relied on the XLA-based torch-neuronx package and the Hugging Face-maintained Optimum Neuron bridge. That stack imposed lazy tensors, static shapes, and recompilation at every graph break, the Hugging Face post explains. TorchNeuron replaces that with eager execution, torch.compile, and standard PyTorch distributed APIs such as FSDP2, DTensor, and tensor parallelism, according to a PyTorch blog post.

With TorchNeuron, 89 percent of the top 100 most-used text-generation model architectures on Hugging Face work out of the box, up from 46 percent under Optimum Neuron v0.4.5, the Hugging Face post says. A developer passes device_map="neuron" and the model moves to the Neuron devices. Training on Trainium uses the same Transformers, Accelerate, PEFT, and TRL libraries as any other accelerator.

TorchNeuron becomes available as an open-source public beta on October 20 under the Apache 2.0 license at github.com/aws-neuron/torch-neuronx. The PyTorch post notes that the backend registers Trainium through the framework’s PrivateUse1 extension point, so standard APIs work without modification. Neither announcement includes independent benchmark results or pricing comparisons against Nvidia GPUs.