# TrnRT

> Open-source LLM inference engine for AWS Trainium that serves an OpenAI-compatible API.

- Website: https://github.com/RunanywhereAI/trnrt
- Category: AI Models & APIs
- Source page: https://opendirs.com/en/tools/trnrt
- Pricing: Open source
- Starting price: $0
- Public API: Yes
- Open source: Yes
- Chinese language: No
- Accessible from mainland China: Unknown
- Platforms: Linux · API
- Country: Unknown
- Last verified: Nov 28, 2026

## Overview

TrnRT is an open-source inference engine for large language models on AWS Trainium, published by RunAnywhere under the Apache-2.0 license. It serves an OpenAI-compatible API from one trn2.48xlarge instance, runs decode as NKI megakernels, and keeps a prefix cache across device and host memory. GLM-5.3-Flash is the first supported model, and AWS hardware costs apply separately.

**Best for:** Teams running open LLMs on AWS Trainium2 that want an OpenAI-compatible endpoint.

## Key features

- NKI megakernels fuse each decode layer half into one kernel
- 1M-token context via sparse and linear attention
- Prefix cache over FP8 KV pages with a host-memory tier
- OpenAI chat, completions, Responses and Anthropic Messages APIs
- Structured outputs via JSON schema, regex and EBNF

## Use cases

- Serving GLM-5.3-Flash on a single trn2.48xlarge instance
- Running coding-agent sessions that reuse a prefix cache
- Comparing tokens per dollar on Trainium against GPU nodes

## Pros

- Apache-2.0 licensed, with benchmark tables and method documented in the repository
- Exposes OpenAI-compatible endpoints that work with standard OpenAI clients

## Cons

- Requires AWS Trainium2 hardware (trn2.48xlarge) to serve
- Only GLM-5.3-Flash is listed as a supported model

## Alternatives

- [Hugging Face](https://opendirs.com/en/tools/hugging-face.md)
- [OpenRouter](https://opendirs.com/en/tools/openrouter.md)
- [API Stable](https://opendirs.com/en/tools/api-stable.md)
- [You.com](https://opendirs.com/en/tools/you-com.md)
- [Mistral](https://opendirs.com/en/tools/mistral.md)

## FAQ

### What is TrnRT?

TrnRT is an open-source inference engine for large language models on AWS Trainium, published by RunAnywhere under the Apache-2.0 license. It serves an OpenAI-compatible API from one trn2.48xlarge instance, runs decode as NKI megakernels, and keeps a prefix cache across device and host memory. GLM-5.3-Flash is the first supported model, and AWS hardware costs apply separately.

### Is TrnRT free?

TrnRT uses a Open source pricing model (verified Nov 28, 2026).

### Does TrnRT have an API?

Yes. TrnRT offers an API for developers.

### Does TrnRT support Chinese, and is it available in China?

TrnRT does not support Chinese, and it has unverified availability in mainland China.

### What are the best alternatives to TrnRT?

Popular alternatives to TrnRT include Hugging Face, OpenRouter, API Stable, You.com.

_Last verified: Nov 28, 2026_