Skip to content

TorchNeuron brings native PyTorch support for Hugging Face models on AWS Trainium

Hugging Face BlogFrom the sourcePicksTorchNeuron: running HF models on AWS Trainium is easier than ever
Original
Image: Hugging Face Blog
Who
Hugging Face
What
announced native TorchNeuron support in Hugging Face libraries for running models on AWS Trainium
QuoteTorchNeuron provides a new native backend for PyTorch on AWS Trainium.

What happened

Hugging Face libraries now support TorchNeuron, a native PyTorch backend for AWS Trainium entering public beta on Oct. 20, 2026. Transformers supports 89% of the top 100 most-used text-generation model architectures out of the box, compared with 46% in Optimum Neuron v0.4.5. Hugging Face recommends using its libraries directly instead of Optimum Neuron, with examples covering distributed inference, fine-tuning and image generation; training still requires shape management and disabling asynchronous weight loading.

Why it matters

The comparison with Optimum Neuron clarifies how native PyTorch integration reduces custom training code while retaining shape management and weight loading constraints that affect migration planning.

The story so far

Hugging Face has added native TorchNeuron support to Transformers, Diffusers and Kernels for running models on AWS Trainium, and introduced a Space showing which popular Hub models run unmodified. TorchNeuron entered public beta on Oct. 20, 2026, and Hugging Face recommends using its libraries directly instead of Optimum Neuron. Hugging Face says Transformers supports 89% of the top 100 most-used text-generation model architectures out of the box with TorchNeuron, compared with 46% in Optimum Neuron v0.4.5. Its examples cover distributed inference, fine-tuning and image generation; training still requires developers to manage shapes and disable asynchronous weight loading. The compatibility Space currently tests only text-generation and image-text-to-text Transformers models that fit on four Trainium2 devices, or at most 16 cores. Tests generate and check 32 tokens, so a PASS does not establish throughput or behavior during longer generations. The Space provides reproducible scripts, stack versions, runtime and peak device memory, with results and scripts available in the public aws-neuron/torch-neuronx-model-support dataset.

Catch every AI shift in one morning briefing

Model releases, price cuts, and compute shifts with original sources. Free, confirmed by email, unsubscribe anytime. Read a past issue

Read next

See the full storyHugging Face Adds Native TorchNeuron Support and Model Compatibility Tests for AWS Trainium
This story is in 10/20 AI Daily · Lead storyRead the whole issue