Skip to content
All experiments

63 to 71 ms

per token on Inferentia2 from 1 to 32 streams, requests served at once, while total output grew 26×. A GPU took 5.0 ms at one stream.

ASICs, July and August 2026

Llama 3.1 8B on AWS Trainium and Inferentia.

Amazon's own AI chips: a fine-tune on Trainium, served on Inferentia2, set against AMD and NVIDIA GPUs from a separate study.

The chips, and the words used here

Trainium and Inferentia
AI chips rented on AWS: Trainium for training models, Inferentia for serving them. Most of this study ran on Trainium1 and Inferentia2; Trainium2, the newer training chip, repeated the fine-tune. The MI300X (AMD) and the H200 (NVIDIA) are datacenter GPUs.
Tokens and streams
A token is a piece of a word: models read and write in tokens, and tok/s means tokens a second. A stream is one request being answered, so 32 streams are 32 replies written at once. Each stream keeps its own memory of the conversation on the chip, 128 KiB a token here, so Inferentia2's 32 GB, with the model loaded, has room for about 48 streams of 2,048 tokens.
Two waits
A reply has two waits: for its first token, while the request waits its turn and the model reads the prompt, and then the time per token as it writes the rest, called decode.
Compiled ahead of time
These chips run only steps compiled in advance for fixed sizes, such as 32 streams of 2,048 tokens. A new size needs a new compile.
Fine-tuning
More training on example replies, called SFT (supervised fine-tuning). LoRA trains a small add-on instead of every weight; full fine-tuning changes them all. Preference tuning trains on pairs of a better and a worse reply: ORPO uses the pairs alone, and DPO also needs the reference model, a frozen copy of the model that scores each reply. Online reinforcement learning (RL), such as GRPO and RLVR, instead has the model write replies during training and learn from scores on them.
A draft model
In speculative decoding, a small draft model guesses the next few tokens and the big model checks them in one step, keeping the ones it would have written.

What we found

  • A single GPU served tokens for less

    At 32 streams, Inferentia2's limit, a million output tokens cost $0.51 on Inferentia2, $0.21 on an MI300X and $0.28 on an H200 at on-demand list prices. The GPUs kept scaling to 256 streams, where they were 4.6× to 5.7× cheaper than Inferentia2.

  • Each reply ran slower than on a GPU

    Inferentia2 wrote a token every 63 to 71 ms from 1 to 32 streams, and held steady for 30 minutes at 8; a GPU took 5.0 ms at one stream and 21.6 to 31.0 ms at 256. Inferentia2's first-token wait grew from 0.4 to 6.4 s.

  • LoRA fine-tuning worked, and the model learned

    A LoRA fine-tune of the 8B ran on both Trainium chips. On Trainium1 its loss, the error of its predictions on text it never trained on, fell from 2.15 to 1.25. Full fine-tuning was tried only on small models, and at 1.7B fit only Trainium2.

  • Trainium2 trained up to 2.2× faster

    Per step, Trainium2 was 1.2× faster than Trainium1 at 2,048-token examples and 1.9× at 4,096, and alone fit 8,192. The whole 2,048-token job finished 2.2× sooner, because Trainium1 spent 51% of that job outside the timed training steps.

  • Trainium2 was cheaper per token only with its block kept busy

    Over the whole fine-tune, a million training tokens cost $0.26 on Trainium1. Trainium2 came as a prepaid 24-hour block: $0.20 a million if the block was kept fully busy, or $5.08 with the whole $53.64 charged to this one job.

  • Online RL was blocked by the software

    Online RL could not run: the training library's model has no way to write replies. The study calls it a gap in the library that no bigger budget or newer chip would close.

  • A small draft model made one stream 2.5× faster

    With Llama 3.2 1B drafting for the 8B, one stream on Trainium1 went from 31.6 to 78.5 tok/s. Decoding was greedy, so in principle the reply was the 8B's own. The gain nearly stopped past 7 draft tokens a step, as fewer drafts were accepted.

The results

The GPUs kept scaling past Inferentia2's 32 streams, and cost less per token

Total output tok/s as streams are added, on log scales where each gridline is 10×, and what a million output tokens cost. At every load all three ran, the GPUs wrote 8× to 13× Inferentia2's output.

measured on all three101001,00010,000tok/sH200MI300XInferentia2148163264128256

Concurrent streams. Llama 3.1 8B Instruct, 16-bit (BF16), vLLM, 1k in / 1k out, total output tok/s.

at 32 streams at the highest load measured
inf2.xlarge, 1x Inferentia2
$0.507
$0.507
MI300X, 1 GPU
$0.209
$0.089 at 256
H200, 1 GPU
$0.279
$0.110 at 256

$ per 1M output tokens, hourly rate divided by tokens per hour, at on-demand list prices. Inferentia2's two bars match because 32 streams is as many as it was compiled for.

Per token, Inferentia2 cost 2.4× an MI300X and 1.8× an H200 at 32 streams. Its first-token wait was mostly time spent queued behind other requests.

No GPU ran on AWS in either study, so the like-for-like rental, a g6e.xlarge with one L40S at $1.86/hr, is untested.

What differsNeuron studyGPU study
vLLM, the serving software0.16, the newest AWS deep learning image that boots on these chips0.26 on the GPUs
PyTorch2.9.12.11.0
CloudAWS us-west-2, on-demand list priceDigitalOcean (MI300X), Nebius (H200), published GPU-hour rates
Accessan AWS instance with one chipthe MI300X through a virtual function (SR-IOV) that presents the whole GPU; the H200 not virtualized that way
Device memory32 GB192 GB (MI300X), 141 GB (H200)

Trainium2 fine-tuned up to 1.9× faster per step, and only it fit 8,192-token examples

Training speed for one LoRA fine-tune of Llama 3.1 8B at three example lengths, what the whole job cost, and what each kind of training did on Trainium1.

Trainium1, $1.34/hr Trainium2, $2.235/hr
2,952
3,533
3,575
6,878
8,311
2,048 tokens4,096 tokens8,192 tokens

Steady-state tok/s, inside the timed training steps.

The whole fine-tune, 645 steps at 2,048 tokens, per million training tokens:

Trainium1
$0.258
Trainium2, block fully used
$0.195
Trainium2, whole block charged to this job
$5.08
Objective, one Trainium1StatusMeasured
Fine-tuning (SFT), LoRA
Llama 3.1 8B
works2,952 tok/s at 2,048 tokens
Preference tuning, ORPO
Llama 3.1 8B
runs1,181 tok/s at 1,024 tokens; its loss rose in short test runs
Pretraining from scratch
362M, the SmolLM2-360M design
works4,573 tok/s on one of the chip's two cores through the training library, loss falling over a short probe. A separate hand-written loop recompiled every step.
Preference tuning, DPO
Llama 3.1 8B
unresolvedcompiles once the reference model's scores are computed before training; the run then fails copying them off the chip
Online RL, GRPO and RLVR
Qwen3 1.7B
blockedthe training library's model cannot write replies (no generate())

The study's explanation for the smaller gain at 2,048 tokens, that the shorter step leaves the bigger chip idle, was not profiled. Longer examples raised the steady rates but not the whole job's: Trainium2's full run at 8,192 tokens and Trainium1's at 4,096 finished no sooner than at 2,048 (0.5% and 2% slower, both inside the 2.4% noise), because well under half of each long job's time fell inside the timed steps.

Two physical Trainium2 chips ran the same fine-tune with identical final loss. The GPU study trained all 8B weights rather than a LoRA add-on, so its numbers are not placed beside these.

One stream with and without a 1B draft model

Here a Llama 3.2 1B drafts for the 8B.

Draft tokens a stepSpeed, tok/sSpeed-upAccepted
none31.61.00×no drafts
244.51.41×96.6%
356.41.78×92.8%
464.32.03×88.8%
570.42.23×85.9%
673.92.34×82.4%
777.32.45×80.4%
1078.52.48×70.9%

This sweep checked only that reply lengths matched the 8B's own, and an earlier, separate run found identical output. Accepted is how often the draft guessed right, not a quality score. This ran on the Trainium1, not vLLM on the Inferentia2, so its speeds do not compare with the serving figure.

The fine-tune needed no recompile and learned; serving held steady for 30 minutes at 8 streams

Boot to first token, Inferentia2

First ever boot, compiling every step, 39.5 min
2,372 s
Fine-tuned weights, every compiled step reused, 9.1 min
548 s

The fine-tune changed the weights, not the steps, so its boot compiled nothing new. No boot of the original weights with every step already compiled was timed, so the gap is not a saving the fine-tune made.

Held-out loss after the fine-tune

Trainium12.149 to 1.251(-0.898)
Trainium22.148 to 1.265(-0.883)

Both chips were scored on the same examples, and their starting losses differ by only 0.001, so the two drops compare directly. It shows the model fit its training data's style, not that its answers got better: no quality benchmark was run.

30 minutes of steady load, Inferentia2

Speed kept, last round against first
100.4%
Speed, first to last
118.8 to 119.3 tok/s
Slowest 1% of first-token waits, rounds 2 to 7 (round 1: 3.64 s)
3.12 to 3.14 s

Llama 3.1 8B Instruct as released, at 8 of its 32 streams, seven rounds. A full load was not held for 30 minutes.

Fine-tuning fit well; serving at the lowest cost did not

WorkloadVerdict
LoRA fine-tuning of a supported model, at fixed input sizesstrong fit
Full fine-tuningran at 1.1B on both chips; at 1.7B only on Trainium2, Trainium1 ran out of memory
Preference tuning (ORPO)runs; its short tests did not show it learning
Pretraining a small model from scratchworks at 362M and 386M parameters on one Trainium1; a 1.7B model did not fit its memory
Online RL (GRPO and RLVR tested)blocked: any online RL method hits the same wall
Serving an 8B model at the lowest costa single GPU was cheaper per token
Serving where GPUs can't be rented, or data must stay in one placethe study's judgment, not a measurement: reasonable, up to 32 streams
A model type outside the export tool's lista wall, not a tuning problem
Every numberInferentia2's serving sweep, the GPU sweep, cost, the training ladder and the draft-model sweep, as tablesShow

Swipe the table sideways for more columns.

StreamsOutput tok/sFirst token, median msPer token, median msNeuronCores busy
115.739963.295.6%
461.498864.395.1%
8119.31,76565.494.4%
16226.63,33367.493.8%
32415.56,40970.893.3%

Swipe the table sideways for more columns.

StreamsMI300X tok/sH200 tok/sMI300X ms per tokenH200 ms per token
11951994.995.00
46037616.455.21
81,1371,4456.735.46
162,0662,6747.425.87
323,4434,4869.077.00
644,9566,80612.649.21
1287,0229,93718.0012.59
2568,08511,33730.9721.55

Swipe the table sideways for more columns.

Device$ per hourtok/s at 32 streams$ at 32 streamsHighest load, tok/s$ there
inf2.xlarge, 1x Inferentia20.7582415.50.507415.5 at 320.507
MI300X, 1 GPU2.593,4430.2098,085 at 2560.089
H200, 1 GPU4.504,4860.27911,337 at 2560.110

Swipe the table sideways for more columns.

Example lengthTrainium1 tok/sTrainium2 tok/sTrainium2 against Trainium1
2,048 tokens, steady state2,951.83,532.81.20×
4,096 tokens, steady state3,575.06,878.41.92×
8,192 tokens, steady statedoes not fit8,310.5
Whole 645-step job at 2,048, end to end1,441.03,181.02.21×

Swipe the table sideways for more columns.

Draft tokens a steptok/sSpeed-upAccepted
031.611.000×
244.511.408×96.6%
356.411.785×92.8%
464.302.034×88.8%
570.372.226×85.9%
673.862.337×82.4%
777.342.447×80.4%
1078.472.482×70.9%

How we ran it

Machines
One trn1.2xlarge (one Trainium1, 32 GB, $1.34/hr) fine-tunes the model and runs the draft-model test, and one inf2.xlarge (one Inferentia2, 32 GB, $0.76/hr) serves it, both on demand in us-west-2. One trn2.3xlarge (one Trainium2, 96 GB) in sa-east-1 repeats the fine-tune. It came as a prepaid Capacity Block, 24 hours being the shortest sold, because no on-demand capacity was ever available: $53.64, or $2.235/hr.
Fine-tune
Llama 3.1 8B Instruct, LoRA rank 16, on the dolly-15k instruction set packed into 2,048-token examples: 645 steps over 3 epochs, each step 8 examples fed one at a time, 10,567,680 tokens in all. The model is split across 2 cores on Trainium1 and 4 on Trainium2, each chip's working default.
Serving
vLLM 0.16 with NxD Inference 0.10, AWS's library for running models on these chips, compiled for 32 streams of 2,048 tokens. Each request sends exactly 1,024 tokens and asks for 1,024, from a client on the same machine. Times are medians.
Draft model
On the Trainium1 through NxD Inference's fused speculation, one stream, greedy, over Spec-Bench's 39 prompts in 13 categories.
GPU points
They come from the MI300X and H200 study, which used the same model, request shape and measures on vLLM 0.26.
Repeats
One run per point. Three seeds on one Trainium1, and the same fine-tune on two physical Trainium2 chips, agreed within 2.4%, so smaller differences are noise.
Evidence
Every number has a committed log in torchneuronx, the study's own repository. The instances were terminated on 2026-08-26, and the analysis re-runs from the committed results with no AWS account.

Limits

Two studies
The Neuron and GPU numbers come from separate studies that differ in the ways listed under the first figure. Inferentia2's vLLM was ten versions older than the GPUs', so part of its gap may be older software.
A virtual GPU
The GPU study reached its MI300X through a virtual function, not bare metal, and calls that its largest caveat.
Flat time per token
The study reads the flat 63 to 71 ms as decode reading the whole model from memory once a step, however many streams share it. A step compiled for 32 streams that runs at every load would look the same: the NeuronCores, the chip's compute units, were 95.6% busy at one stream. The two were not told apart.
MFU left out
The study also reported MFU, the share of the chip's peak arithmetic a run used. Its own audit found that figure unreliable (counted in full, one run came to 97 to 107% of peak), so this page leaves it out.
One chip each, as set up
The speed-ups compare each chip as set up, not the silicon alone. Trainium2 on 2 cores was not run.

Sources

The talk covers the same material.

Keep reading

All experiments
  • 1.84×

    the H200's room for conversation memory (the KV cache) on an MI300X with the same 70 GB of weights, from 1.36× the memory. Measured, the H200 is faster at most work

    Hardware, July 2026

    MI300X against H200

    One AMD Instinct MI300X against one NVIDIA H200, two datacenter GPUs, serving and training language models with the same versions of vLLM, a serving engine, and PyTorch.

    Alpha Romer Coma

  • 2.9×

    the X2 Elite's GPU speed at reading the prompt, on the M5 with Gemma 3 1B. On the CPU, the X2 Elite leads by 1.9×

    Hardware, 27 July 2026

    Apple M5 against Snapdragon X2 Elite

    A MacBook Air against a Qualcomm reference board on AI work: CPU, GPU and NPU, inference and training, with the same llama.cpp release and byte-identical weights.

    Alpha Romer Coma

  • About 7×

    faster GPU matrix maths on a Snapdragon 8 Elite, through OpenCL, than on a Dimensity 9500s, through Vulkan

    Hardware, 13 and 27 July 2026

    Snapdragon 8 Elite against Dimensity 9500s

    What an ordinary app, with no control over the whole phone and no chipmaker's private tools, can do for AI on two flagship phone chips: the CPU, the GPU, the NPU (the chip built for AI) and training on the phone.

    Alpha Romer Coma