
TrnRT
An open LLM inference engine for AWS Trainium
At a glance
TrnRT is an open inference engine for large language models on AWS Trainium, with an OpenAI-compatible API and NKI megakernels.
- Apache 2.0Open source license
- 1MToken context
- OpenAI-compatible API on Trainium
- NKI megakernels for decoding
- Long context with a prefix cache
Works with AWS TrainiumOpenAI API
- Pricing
- Free
- Platforms
- API
- Category
- Developer Tools
- Website
- github.com/runanywhereai
- Last checked

What it does
TrnRT is an open inference engine for large language models on AWS Trainium. It serves an OpenAI-compatible API from one trn2.48xlarge instance, and it runs decoding as NKI megakernels, with about one kernel per layer half.
The engine keeps a prefix cache across device and host memory, and it supports a context of up to one million tokens. GLM-5.3-Flash is the first supported model, and more open models are on the way.
How it works
- Build the Docker image with the Neuron SDK and Python 3.13.
- Build the compile cache on any x86_64 host, which needs no NeuronCore.
- Serve the model on a Trainium2 instance and call the OpenAI-compatible API.
What makes it different
Each engine is tensor-parallel over 32 logical NeuronCores, and a session-affine router sends requests to the right engine. The prefix cache uses a radix tree over FP8 key-value pages, with a host-memory tier for evicted pages.
Good to know
TrnRT needs AWS hardware to serve. You pay AWS for the instance and the compile host, and the engine itself is free to use. The project is licensed under Apache 2.0, and the repository includes a guide for people who are new to Trainium.
Who it's for
Engineers who run open LLMs on AWS Trainium
Typical uses
- Serve an open model on one Trainium2 instance behind an OpenAI-style API
- Run a long-context model without a GPU fleet
- Benchmark a Trainium serving setup against other engines
Features
- OpenAI-compatible API
- NKI megakernels for decoding
- Context of up to one million tokens
- Prefix cache across device and host memory
- Two engines per instance with a session router
- Docker build and compile cache
Pricing
Free
The engine is free to use under Apache 2.0. You pay AWS for the Trainium instance.
Limitations
- It needs a trn2.48xlarge instance to serve, which is AWS hardware.
- GLM-5.3-Flash is the only supported model for now.
FAQ
Is TrnRT free?
The engine is free under Apache 2.0. You pay AWS for the hardware it runs on.
Which model does it serve?
GLM-5.3-Flash is the first supported model, and more open models are planned.