---
title: "Amazon opens TorchNeuron beta so PyTorch code runs on Trainium chips with a one-line device change"
url: https://anawords.com/story/amazon-torchneuron-pytorch-backend-trainium-public-beta
published: 2026-10-20T12:49:16+05:30
updated: 2026-10-20T12:49:16+05:30
section: Chips & Compute
author: Mayank Sahu
checked: sources checked by AI, approved by editor
version: 1
---

# Amazon opens TorchNeuron beta so PyTorch code runs on Trainium chips with a one-line device change

The open-source backend supports Trainium2 and Trainium3, works with Hugging Face and vLLM plugins, and starts public beta on 20 October. Some PyTorch features are not supported yet.

**In short:** Amazon Web Services has released TorchNeuron, an open-source native PyTorch backend that lets existing PyTorch code run on its Trainium AI chips by setting the device to “neuron”. It supports Trainium2 and Trainium3 and entered public beta on 20 October 2026 under the Apache 2.0 licence.

## What TorchNeuron is

TorchNeuron is a native PyTorch backend for AWS Trainium, announced on the PyTorch blog by AWS engineers on 19 October ahead of PyTorch Conference North America in San Jose.[^1][^2] It is open source under Apache 2.0 and entered public beta on 20 October.[^1][^2]

For most code, the change is moving the model to the new device: `model.to("neuron")`.[^1] Code written against PyTorch’s `torch.accelerator` API runs unchanged, AWS says.[^1] It supports Trainium2 and Trainium3.[^1][^2]

## How it works

- **Eager mode** for research and debugging, where operations run immediately and normal Python debugging works.[^1]
- **torch.compile** for production, which hands the model graph to the Neuron compiler.[^1]
- **Distributed training** with DDP, FSDP2, tensor and pipeline parallelism.[^1]
- **Custom kernels** through the Neuron Kernel Interface, with open-source FlashAttention and mixture-of-experts kernels.[^1]

Hugging Face Transformers and Diffusers support Trainium as an upstream device, and vLLM plugins serve language and diffusion models.[^1]

## What is not ready yet

AWS lists gaps in the first release, including sparse tensors, NestedTensor, arbitrary attention masks and dynamic input shapes.[^1][^2] FP8 and TorchAO are in private beta.[^1] An experimental adaptive eager mode aims to bring eager speed closer to compiled graphs.[^1]

## Early users

AWS says Cartesia and Deepgram are early users; Deepgram reports about 60% more audio processed per dollar than its GPU baselines in its own tests.[^1] AWS also says about 100,000 Hugging Face models ran in its September tests.[^1] These are company-reported figures.

## Why it matters

Software, not just chips, has kept many teams on Nvidia GPUs. A backend that runs standard PyTorch code with few changes lowers the cost of trying other hardware.

## Fact ledger

- [Confirmed] TorchNeuron is an open-source native PyTorch backend for AWS Trainium, Apache 2.0. (source 1)
- [Confirmed] Public beta started on 20 October 2026. (source 1)
- [Confirmed] It supports Trainium2 and Trainium3. (source 1)
- [Confirmed] Existing code mainly needs the device set to “neuron”. (source 1)
- [Confirmed] The first release lacks dynamic shapes, sparse tensors and some other features. (source 1)
- [Company claim] Deepgram reports about 60% more audio seconds per dollar than its GPU baselines. (source 1)

## Sources

1. [PyTorch blog: Introducing TorchNeuron, native PyTorch backend for AWS Trainium](https://pytorch.org/blog/introducing-torchneuron-native-pytorch-backend-for-aws-trainium/) — official
2. [TNW: Amazon’s TorchNeuron lets PyTorch code run on AWS Trainium chips](https://thenextweb.com/news/amazon-torchneuron-pytorch-trainium)
