---
title: "Does Your Model Run on AWS Trainium? Look It Up"
description: "A Hugging Face Space reports whether popular Transformers models run unmodified on AWS Trainium via the TorchNeuron PyTorch backend."
url: "https://swe.quest/articles/does-your-model-run-on-aws-trainium-look-it-up-4ce5c68bb56caf0e"
canonical: "https://huggingface.co/blog/torch-neuronx-model-support"
source: "Hugging Face"
published: "2026-10-23"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 3
tags: ["inference","hardware","machine-learning"]
---

# Does Your Model Run on AWS Trainium? Look It Up

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-10-23, 3 min read, Announcement. Original: [https://huggingface.co/blog/torch-neuronx-model-support](https://huggingface.co/blog/torch-neuronx-model-support)

## Summary

A Hugging Face Space reports whether popular Transformers models run unmodified on AWS Trainium via the TorchNeuron PyTorch backend. For each model it shows the result, the number of Trainium cores used, wall time including compilation, peak device memory, and the run.py script to reproduce it. Each test shards the model with tensor or expert parallelism over the fewest trn2 cores that hold it, generates 32 tokens, and checks them against a CPU run or with a judge model. A PASS says nothing about throughput or long generations. Results are published as a queryable Parquet dataset, and precompiled NEFF graphs can be synced from a public cache to skip compilation.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)

## Prerequisites

- PyTorch
- Hugging Face Transformers
- tensor parallelism ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))

## Keywords

AWS Trainium, TorchNeuron, torch-neuronx, neuronx-cc, Hugging Face Transformers, Trainium2

## Related posts

- [TorchNeuron: running HF models on AWS Trainium is easier than ever](https://swe.quest/articles/torchneuron-running-hf-models-on-aws-trainium-is-easier-than-ever-99ae731bb5ca0252.md): Hugging Face · 2026-10-19 · Medium · 7 min read · Hardware, Model training, Inference & serving, Python
  TorchNeuron is a PyTorch plugin that exposes AWS Trainium as a native \`neuron\` device with eager execution, \`torch.compile\`, and native distributed APIs (DTensor, FSDP2, TP), replacing the PyTorch XLA–based path that required lazy tensors and static graphs.
- [The science behind TorchNeuron, Amazon’s new PyTorch backend for AWS Trainium chips](https://swe.quest/articles/the-science-behind-torchneuron-amazon-s-new-pytorch-backend-for-aws-trainium-c2048563f9b5b6ed.md): Amazon Science · 2026-10-22 · Medium · 5 min read · Compilers, Hardware, Testing, Model training, Python
  TorchNeuron is an open-source PyTorch backend that runs existing PyTorch code on AWS Trainium with little or no change.
- [Accelerating Hugging Face Transformers with AWS Inferentia2](https://swe.quest/articles/accelerating-hugging-face-transformers-with-aws-inferentia2-732d2daf15bc9874.md): Hugging Face · 2023-04-17 · Easy · 5 min read · Inference & serving, Hardware, Performance engineering, Cloud platforms
  Hugging Face benchmarked popular Transformer models on AWS Inferentia2 (inf2.xlarge) against Inferentia1 (inf1.2xlarge) and an NVIDIA A10G GPU (g5.2xlarge), running 144 p95-latency experiments at batch size 1 across six architectures and sequence lengths from 8 to 512.
- [Profiling TorchNeuron (Part 1): System-level profiling on AWS Trainium.](https://swe.quest/articles/profiling-torchneuron-part-1-system-level-profiling-on-aws-trainium-034696b775aee014.md): Hugging Face · 2026-10-21 · Medium · 9 min read · Performance engineering, Inference & serving, Hardware, Python
  A beginner-friendly walkthrough of system-level profiling for PyTorch on AWS Trainium using TorchNeuron.
- [Optimum+ONNX Runtime - Easier, Faster training for your Hugging Face models](https://swe.quest/articles/optimum-onnx-runtime-easier-faster-training-for-your-hugging-face-models-99e01d7695af970a.md): Hugging Face · 2023-01-24 · Medium · 6 min read · Model training, Performance engineering, Python
  Hugging Face Optimum's ORTTrainer swaps ONNX Runtime in as the training backend for Transformers models.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
