TrnRT needs two hosts: a trn2.48xlarge to serve on, and any x86_64 host with Docker to build the compile cache on.
They can be the same machine, but the compile step needs only CPUs and memory, so a cheaper instance does it.
| Option | When to use it | Link |
|---|---|---|
| EC2 Capacity Blocks for ML | Reserve a fixed window (days to weeks) at a known price. The benchmarks quote this price. | Capacity Blocks · user guide |
| On-demand | Short tests, if your account has trn2 quota | On-demand pricing |
| Spot | Cheapest, but can be interrupted | Spot pricing |
The instance: 16 Trainium2 chips with 96 GiB of HBM each, 192 vCPUs and 2 TB of memory (trn2 instances, Trainium2 architecture).
- AMI: a Neuron AWS Deep Learning AMI comes with the Neuron driver and tools. On a plain Ubuntu 24.04 AMI, install them with the Neuron setup guide. The host needs the Neuron driver; the Neuron SDK, compiler and runtime ship inside TrnRT's image.
- Docker: install Docker Engine.
- Check the devices:
neuron-ls(from the Neuron tools) lists the 16 devices of atrn2.48xlarge, and the processes holding them (neuron-ls guide). - Disk: about 30 GB for the image and 328 GB for the checkpoint, plus the compile cache. Attach storage to match.
- Hugging Face:
pip install -U huggingface_hubgives thehfcommand. SetHF_TOKENto avoid the Hub's per-IP rate limits (CLI guide).
Follow DEPLOY.md: build the image, build the compile cache, then serve.
| Neuron SDK documentation | awsdocs-neuron.readthedocs-hosted.com |
| Neuron release notes | release notes |
| NKI, the kernel language TrnRT's kernels use | NKI documentation |
| Trainium memory hierarchy (SBUF, PSUM, HBM) | memory hierarchy |
| Profiling | Neuron Explorer |
| Neuron containers | aws-neuron/deep-learning-containers · TrnRT's base image: pytorch-inference-vllm-neuronx |