covex.trainiumCovex SDK
A native PyTorch backend for Trainium. torch.compile, eager debugging, autograd and mixed precision — the APIs your team already knows.
Covex creates SDKs, runtime libraries, and developer tools for the entire AWS Trainium ecosystem — with native PyTorch integration. Bring the model you already have. Train and serve it on Trainium without rewriting a line.
$ pip install covex[trainium]

import torch
import covex.trainium as ct
model = MyTransformer().to(ct.device())
model = ct.compile(model) # native torch.compile backend
for batch in loader:
loss = model(batch).loss
loss.backward()
optimizer.step()The platform
From a single Trn1 instance to a Trainium3 UltraCluster, Covex gives PyTorch teams the SDKs, runtime libraries and developer tools to go fast on AWS silicon — built on top of the AWS Neuron SDK, not around it.
Cost-efficient training for production models
Large-scale training and high-throughput inference
Up to 144 chips per UltraServer for frontier-scale models
covex.trainiumA native PyTorch backend for Trainium. torch.compile, eager debugging, autograd and mixed precision — the APIs your team already knows.
libcovexrtMemory planning, collective scheduling and a persistent graph cache that keeps NeuronCores busy and compile times out of your loop.
covex.kernelsAutotuned NKI kernels for attention, MoE routing, norms and quantized matmuls. Swap them into any PyTorch module in one call.
covex profileStep-level traces across chips, HBM, NeuronLink and EFA. See exactly where every millisecond and every byte goes.
covex.serveOpenAI-compatible inference with continuous batching, paged KV cache and W4A8 quantization on Trainium.
covexHealth checks, cluster launch on EKS, Slurm or SageMaker HyperPod, and reproducible environments from your laptop.
Works with the tools you already run
Native PyTorch
No new framework, no forked torch, no graph-rewrite tax. Covex plugs into the PyTorch APIs you use today and makes them fast on Trainium.
Keep your PyTorch training loop. Covex registers as a torch.compile backend and finds every NeuronCore on the instance.
import torch
import covex.trainium as ct
from transformers import AutoModelForCausalLM
device = ct.device() # all NeuronCores on trn1 / trn2 / trn3
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B")
model = ct.compile(model.to(device), mode="max-throughput")
opt = torch.optim.AdamW(model.parameters(), lr=3e-4)
with ct.autocast(dtype=torch.bfloat16):
for batch in ct.data.loader(dataset, batch_size=16, device=device):
loss = model(**batch).loss
loss.backward()
opt.step()
opt.zero_grad()Architecture
Covex is a thin, opinionated layer on top of the AWS Neuron SDK. You keep full access to Neuron and NKI — Covex handles the plumbing that usually takes months to get right.
A content-addressed graph cache shares compiled artifacts across runs, nodes and teammates.
All-reduce and all-to-all scheduled around NeuronLink and EFA, overlapped with compute.
Activation checkpointing and offload chosen per layer to fit bigger batches on every chip.
Expert routing, sequence parallelism and ring attention as first-class primitives.
Per-step MFU, HBM and interconnect metrics streamed to your existing dashboards.
Pinned environments and deterministic compilation for audit-friendly training runs.
Benchmarks
Same model, same instance, same PyTorch code. The only change is Covex.
1× trn2.48xlarge · BF16 · seq 4k
Training throughput · higher is better
1.4×
faster
4× trn2.48xlarge · TP8 PP4
Training throughput · higher is better
1.5×
faster
2× trn2.48xlarge · EP8
Training throughput · higher is better
1.7×
faster
1× trn2.48xlarge · W4A8 · batch 64
Output tokens / sec · higher is better
2.1×
faster
70B graph · shared cache hit
Time to first step · lower is better
4.5×
quicker start
Preliminary, illustrative results from internal testing on AWS Trn2 instances, normalized to a PyTorch + AWS Neuron SDK baseline. Results vary by model, configuration and software version. Full methodology and reproducible scripts will be published with general availability.
Early access
We're onboarding a small group of PyTorch teams. Tell us about your workload and we'll get you set up.