Open & local AI

Check if your Hugging Face model runs on AWS Trainium

A new Hugging Face Space lists which popular models run unmodified on AWS Trainium2, providing scripts and compatibility data for developers.

Server hardware connected to a compatibility checklist screen
Illustration generated for this article

Hugging Face has launched a new interactive tool to help developers determine if their preferred open-source models are compatible with AWS Trainium hardware. Released in late October 2026, this resource addresses the growing need for clarity around hardware acceleration for large language models on Amazon’s custom silicon.

The tool provides immediate visibility into which models from the Hugging Face Hub can execute without code modification on Trainium instances. It serves as a practical bridge between the abstract promise of hardware acceleration and the concrete reality of deployment engineering.

What happened

Hugging Face introduced a dedicated Space called torch-neuronx model support to catalog compatibility between popular Transformer models and AWS Trainium. This initiative builds on the earlier release of TorchNeuron, a native PyTorch backend that allows the Transformers library to run its standard modeling code directly on Trainium devices via the torch-neuronx package.

The Space aggregates test results for the most downloaded and trending models on the Hub. It does not merely list theoretical support but provides empirical evidence of execution. For each tested model, the interface displays whether it passed validation, the number of Trainium cores required for sharding, the total wall time including compilation, and the peak device memory usage.

Users can navigate the data through three primary views. The Selected view showcases a curated list of top models chosen by download count and trending scores. The Trending and Downloads views allow users to search for specific models by name, following the Hub’s own ranking systems. If a model has not been tested, the interface explains why, citing reasons such as low priority or genuine incompatibility. The tool also allows users to filter results by specific versions of the Neuron compiler (neuronx-cc) and the Transformers library.

How it works

The underlying mechanism relies on automated testing pipelines that load models onto trn2 instances. The system shards models across the minimum number of Trainium cores necessary to hold the weights, typically using tensor parallelism. For mixture-of-experts architectures that lack a tensor-parallel plan, the system employs expert parallelism instead. Currently, the tests are limited to models that fit within four Trainium2 devices, totaling no more than 16 cores.

Validation involves generating 32 tokens from the model. On single-core setups, the output tokens are compared directly against a reference run on CPU. For sharded models, a smaller judge model evaluates the output to ensure it constitutes fluent English. A "PASS" status confirms functional correctness but does not guarantee specific throughput metrics or performance over longer generation sequences.

For developers ready to deploy, the Space provides the exact software stack used during testing. It lists the required packages and supplies a run.py script that mirrors the official TorchNeuron recipe. This script loads the model using from_pretrained, applies sharding where necessary, and generates text using a static cache with torch.compile(backend="neuron"). The script handles distributed ranks internally, removing the need for external launchers like torchrun.

To reduce startup latency, developers can bypass the initial graph compilation step. The Space provides commands to sync pre-compiled graphs from a public NEFF cache bucket hosted on Hugging Face. By matching the compiler version, users can load these cached artifacts directly into their local environment.

Key details

  • The tool currently supports only text-generation and image-text-to-text tasks, with plans to expand to diffusers and sentence transformers.
  • Tests are conducted on AWS Trainium2 (trn2) instances, with a maximum limit of 16 cores per model.
  • Each test result includes the specific neuronx-cc and Transformers library versions used, ensuring reproducibility.
  • The underlying data is available as a public dataset named aws-neuron/torch-neuronx-model-support, stored in Parquet format.
  • Compilation graphs can be retrieved from the public bucket hf://buckets/aws-neuron/torch-neuronx-neff-cache/ to skip initial compile times.
  • A passing test verifies functional output correctness but does not measure inference speed or long-context stability.

Why it matters

For engineering teams evaluating cloud infrastructure costs, hardware specificity is a major risk factor. AWS Trainium offers potential cost advantages for training and inference, but only if the software stack aligns perfectly with the hardware. Previously, determining this alignment required manual trial and error, often involving complex debugging of compilation errors or memory overflow issues. This tool eliminates that uncertainty by providing a verified list of compatible models.

The availability of pre-compiled graphs and exact reproduction scripts significantly lowers the barrier to entry. Developers no longer need to reverse-engineer the optimal configuration for each model. Instead, they can replicate the tested environment precisely, reducing the time from selection to deployment. This standardization is crucial for teams aiming to operationalize open-source models at scale without maintaining extensive custom forked codebases.

What you can do

  • Visit the torch-neuronx model support Space on Hugging Face to check if your target model is listed.
  • Use the search function in the Trending or Downloads view to find specific models by name.
  • Note the specific versions of neuronx-cc and Transformers associated with any passing model you intend to use.
  • Copy the provided run.py script and package list to set up your local development environment.
  • Sync the pre-compiled NEFF graphs from the public Hugging Face bucket to avoid initial compilation delays.
  • Query the public aws-neuron/torch-neuronx-model-support dataset directly if you need to analyze compatibility trends programmatically.
  • #aws trainium
  • #hugging face
  • #pytorch
  • #llm deployment
  • #machine learning ops

Tools from the Bytechap store

$89

DocBento

Self-hosted document management that reads every scan and answers with page citations.

Live demo

Keep reading

All stories