---
title: "TorchNeuron"
description: "2 posts about TorchNeuron, summarised, each linking to the original."
---

# TorchNeuron
> 2 posts about TorchNeuron, summarised, each linking to the original.

## Articles

### [Profiling TorchNeuron (Part 1): System-level profiling on AWS Trainium.](https://yomu.fyi/post/profiling-torchneuron-part-1-system-level-profiling-on-aws-trainium.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Josh Longenecker
- Published: Oct 21, 2026
- Type: Tutorial

The post introduces system-level profiling of inference performance on AWS Trainium using TorchNeuron. It explains how to configure torch.profiler with the Neuron backend by passing a NeuronConfig and using NeuronProfiler to capture traces. The walkthrough profiles three implementations of RMSNorm: naive PyTorch operations, the fused torch.rms\_norm, and naive operations compiled with torch.compile. The key\_averages() table shows that the naive implementation spends 2,355 µs on the Neuron device across six operator dispatches, while both fused and compiled versions reduce device time to about 400 µs with a single dispatch. Neuron Explorer visually confirms the lifecycle of each operation from framework dispatch through runtime scheduling to hardware execution, revealing the gaps that fusion eliminates.


### [TorchNeuron: running HF models on AWS Trainium is easier than ever](https://yomu.fyi/post/torchneuron-running-hf-models-on-aws-trainium-is-easier-than-ever.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Régis Pierrard, Simon Pagezy, Michael Benayoun, Jingya Huang, Alvaro Moran, David Corvoysier, Jeff Boudier
- Published: Oct 19, 2026
- Type: Announcement

TorchNeuron is a new PyTorch plugin that adds a native Neuron backend for AWS Trainium, supporting eager mode, torch.compile, and distributed APIs like FSDP and TP. It will be available as a public beta starting October 20, 2026, and can be installed with pip install torch-neuronx. Hugging Face libraries such as Transformers, Diffusers, Accelerate, PEFT, and TRL now run directly on Trainium without needing the Optimum Neuron wrapper, using the same classes and scripts as on any other accelerator. For text generation, 89% of the top 100 most-used model architectures are supported out of the box, compared to 46% with Optimum Neuron v0.4.5. Training uses standard TRL scripts with only a few Neuron-specific settings like static shapes and torch.compile, and the resulting checkpoints are hardware-agnostic.
