Hugging Face Integrates TorchNeuron for Native PyTorch Support on AWS Trainium

·2026.10.19 09:00

Key point

The new backend enables eager execution and native distributed APIs in Transformers, Diffusers, and Kernels, replacing the previous Optimum Neuron workflow.

1 / 2

Details

  • TorchNeuron, a new PyTorch plugin for AWS Trainium, enters public beta on October 20, 2026, installable via pip install torch-neuronx.
  • The backend exposes neuron as a native device, supporting eager mode, torch.compile, and distributed APIs like FSDP and Tensor Parallelism (TP).
  • Transformers natively supports 89% of the top 100 most-used text-generation model architectures on Trainium, up from 46% with Optimum Neuron v0.4.5.
  • Hugging Face libraries (Transformers, Diffusers, Accelerate, PEFT, TRL) now run directly on Trainium using standard classes and scripts, eliminating the need for custom Optimum Neuron code.
  • Training on Trainium uses standard Hugging Face libraries with native parallelism handling; a demo fine-tuning run on 8 Trainium2 chips (32 NeuronCores) produced a standard checkpoint compatible with other hardware.
  • Diffusers pipelines such as FLUX.1-dev, FLUX.2, Qwen-Image, Qwen-Image-2.1, and H3 are compatible with tensor parallelism, and Neuron kernels on the Hub can provide up to a 2.4x speedup for vision transformers.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.