Skip to main content

AWS Trainium / Inferentia

Vendor: Amazon AWS

Category: ASIC Dedicated Accelerator

Architecture: NeuronCore

Introduction

AWS custom AI chip series: Trainium (purpose-built for training) and Inferentia (purpose-built for inference). Trainium2 delivers extreme training performance, Inferentia2 provides low-latency, high-throughput inference, offered through Amazon EC2 Trn1/Inf2 instances.

Specifications

ModelComputeMemoryInterfaceTDPProcess
Trainium2676 TFLOPS (FP8)192GB HBM3eNeuronLink500W5nm
Inferentia2220 TOPS (FP16)64GB HBM2eNeuronLink175W5nm

Official Website

Visit Official Website

Driver Downloads

Linux

OS Support

WindowsLinuxmacOSAndroid
✅ (AWS EC2)

Version History

VersionRelease DateDescription
Neuron SDK 3.02025-Q1Full Trainium2 support
Neuron SDK 2.x2024Inferentia2 support

Performance Benchmarks

ModelTaskPerformance Metric
Trainium2 × 16Llama 3 405B Training~2 days (AWS data)
Inferentia2Llama 2 13B Inference~500 tok/s
Inferentia2Stable Diffusion XL~5s/img (batched)

Pricing

ModelReference PriceNotes
Trainium2 (Trn2)~$5.00/chip/hEC2 instance on-demand
Inferentia2 (Inf2)~$0.96/chip/hOn-demand billing
Inf2 (xlarge)~$1.16/hSmallest instance

Quick Installation

AWS (via EC2)

# 1. Launch Trn2 instance
aws ec2 run-instances --instance-type trn2.48xlarge --region us-east-1

# 2. Install Neuron SDK after connecting
pip install torch-neuron neuronx-cc

# 3. Verify
neuron-ls

Trainium/Inferentia are only available on AWS EC2 and cannot be purchased as standalone cards.

Code Examples

Python (Neuron SDK)

import torch
import torch_neuronx

# Compile PyTorch model to Neuron format
model = torch.nn.Linear(1024, 1024)
model = model.to("xla") # XLA backend

# Compile
neuron_model = torch_neuronx.trace(model, example_input)

# Inference
output = neuron_model(input_data)

Architecture Highlights

  • NeuronCore: AWS proprietary AI accelerator architecture. Trainium for training, Inferentia for inference
  • NeuronLink: Inter-chip interconnect, supporting large-scale distributed training
  • Trn2 UltraServers: 16 Trainium2 chips per node, interconnected via NeuronLink Connect

Model Compatibility

Model/FrameworkSupportNotes
PyTorch✅ Neuron SDKtorch-neuronx
TensorFlowneuron-cc
JAXjax-neuronx
Llama / QLM and similar LLMsInf2 optimal for inference
HuggingFacetransformers-neuronx

If you're evaluating alternatives, the following products may also fit your scenario: