AWS Trainium is a family of custom AI accelerator chips designed by Amazon Web Services for training and, increasingly, serving large deep learning models. The chips are developed by Annapurna Labs, the AWS chip design unit, and are available only as cloud instances inside AWS, not as cards that customers can buy.
In AI hardware, Trainium belongs to the group of domain-specific accelerators that hyperscale cloud providers build as an alternative to data-center GPUs. Its purpose is to lower the cost per unit of training compute, give AWS control over supply, and offer customers a second platform beside NVIDIA hardware for workloads such as large language models.
How AWS Trainium processes neural network workloads
Each Trainium chip contains several NeuronCores, the compute engines that execute the operations of a neural network. A NeuronCore combines a large tensor engine built as a systolic array for matrix multiplication, a vector engine for element-wise operations such as activations and normalization, a scalar engine, and general-purpose cores for custom operators.
The chips are fed by high-bandwidth memory (HBM) stacked beside the die, because large models are often limited by memory bandwidth rather than arithmetic. Chips inside a server are linked by NeuronLink, a direct chip-to-chip interconnect, while servers communicate over the Elastic Fabric Adapter (EFA) network to form clusters with thousands to hundreds of thousands of chips.
Trainium supports the numeric formats that modern training relies on. The table below summarizes them and their typical role.
| Format | Typical role | Trade-off |
|---|---|---|
| FP32 | Master weights, sensitive layers | Highest precision, lowest throughput |
| TF32 | Matrix math with FP32 range | Faster than FP32, reduced mantissa |
| bfloat16 | Default for large model training | FP32 range, coarse precision |
| FP16 | Mixed-precision training | Narrow range, needs loss scaling |
| FP8 | Highest-throughput matrix math | Requires careful scaling |
Trainium also implements hardware stochastic rounding, which rounds values up or down with a probability proportional to their distance from each neighbor. This reduces the bias that accumulates when low-precision weights are updated over many training steps.
Trainium generations and instance types
AWS has released the chip in successive generations, each delivered through dedicated Amazon EC2 instance families and larger rack-scale systems. The figures below are approximate and are meant to show the direction of development rather than exact specifications.
| Generation | Availability | Key characteristics |
|---|---|---|
| Trainium (first generation) | Trn1 instances, 2022 | Two NeuronCores, 32 GB HBM per chip, 16 chips per instance |
| Trainium2 | Trn2 instances, late 2024 | Roughly four times the compute, 96 GB HBM per chip |
| Trn2 UltraServer | Late 2024 | 64 Trainium2 chips linked by NeuronLink |
| Trainium3 | Announced 2024, launched 2025 | 3-nanometer process, larger UltraServer systems |
Very large deployments group many UltraServers into UltraClusters. AWS built one such cluster, known as Project Rainier, with hundreds of thousands of Trainium2 chips for training frontier language models, which shows that the platform is designed for frontier-scale training, not only for small experiments.
The AWS Neuron software stack
Developers program Trainium through the AWS Neuron SDK, which includes a compiler, runtime, profiling tools and framework integrations. Models written in PyTorch or JAX are traced into a computation graph, compiled by the Neuron compiler and executed on NeuronCores, usually through the open XLA compiler infrastructure.
- Neuron compiler: converts framework graphs into instructions for the tensor, vector and scalar engines.
- Distributed training libraries: provide tensor, pipeline and data parallelism for models that span many chips.
- Neuron Kernel Interface (NKI): lets engineers write custom low-level kernels, similar in spirit to writing CUDA or Triton kernels on GPUs.
- Profiler and monitoring tools: show engine utilization, memory traffic and collective communication time.
The software stack is the main adoption hurdle. Popular model architectures run with little change, but custom operators, dynamic shapes and code tuned specifically for CUDA may require porting work and recompilation.
Trainium compared with other AI accelerators
Trainium competes with data-center GPUs and with other custom chips built by cloud providers. The main differences lie in availability, software ecosystem and pricing model rather than in a single performance figure.
| Accelerator | Provider and access | Main distinction |
|---|---|---|
| AWS Trainium | AWS only, EC2 instances | Training focus, lower cost per hour |
| AWS Inferentia | AWS only, EC2 instances | Optimized for inference serving |
| Cloud TPU | Google Cloud only | Mature XLA and JAX ecosystem |
| NVIDIA Hopper and Blackwell | All major clouds and on premises | Broadest software support through CUDA |
| AMD Instinct | Several clouds and on premises | ROCm software, large HBM capacity |
AWS has gradually blurred the line between Trainium and Inferentia: Trainium2 and later generations are also marketed for inference of large models, because the same high memory bandwidth and interconnect benefit both training and serving.
When to choose Trainium and what to watch
Trainium is most attractive for large, steady training or serving workloads on standard architectures, where a lower price per hour adds up over weeks of use. It is less attractive when a team depends on GPU-specific libraries or needs to move workloads between clouds.
| Situation | Recommendation | Reason |
|---|---|---|
| Long training runs on transformers | Evaluate Trainium seriously | Cost savings compound over time |
| Heavy use of custom CUDA kernels | Stay on GPUs or budget porting time | Kernels must be rewritten |
| Multi-cloud portability required | Prefer widely available GPUs | Trainium exists only in AWS |
| Short research experiments | Use familiar hardware | Compilation overhead dominates |
- Compilation time: first runs can take minutes to compile; caching compiled graphs avoids repeated delays.
- Vendor lock-in: code tuned for Neuron does not transfer directly to other hardware.
- Benchmark claims: vendor price-performance figures depend on model, precision and batch size, so a pilot run on the real workload is essential.
In plain words
Training a modern AI model needs huge amounts of math. Most companies do that math on graphics chips from NVIDIA. Amazon decided to design its own chip for this job. That chip is Trainium.
You cannot buy a Trainium chip and put it in your office. You rent it by the hour in Amazon’s cloud. The main promise is a lower price for the same training work.
The catch is software. Programs written for graphics chips sometimes need changes before they run well on Trainium. So Trainium suits teams that run big, steady workloads on Amazon and can spend some time adapting their code.
A real-world example
A mid-sized software company wants to fine-tune a 70-billion-parameter language model on its own support tickets. On rented GPU instances, the estimated cost of the planned three-week training run exceeds its budget, so the machine learning team tests Trn2 instances with the Neuron SDK.
The team keeps its PyTorch training script, switches the device to the Neuron backend and uses the bfloat16 format with stochastic rounding. The first compilation takes about 40 minutes, and two custom attention operators must be replaced with supported equivalents. After a one-week pilot, measured throughput per dollar is roughly 30 percent better than the GPU baseline for this specific model.
The company runs the full training on Trainium but keeps a small GPU cluster for research prototypes, where flexibility matters more than cost per training step.