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.
Written by
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.
Concurrent streams. Llama 3.1 8B Instruct, 16-bit (BF16), vLLM, 1k in / 1k out, total output tok/s.
$ 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 differs | Neuron study | GPU study |
|---|---|---|
| vLLM, the serving software | 0.16, the newest AWS deep learning image that boots on these chips | 0.26 on the GPUs |
| PyTorch | 2.9.1 | 2.11.0 |
| Cloud | AWS us-west-2, on-demand list price | DigitalOcean (MI300X), Nebius (H200), published GPU-hour rates |
| Access | an AWS instance with one chip | the MI300X through a virtual function (SR-IOV) that presents the whole GPU; the H200 not virtualized that way |
| Device memory | 32 GB | 192 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.
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 Trainium1 | Status | Measured |
|---|---|---|
| Fine-tuning (SFT), LoRA Llama 3.1 8B | works | 2,952 tok/s at 2,048 tokens |
| Preference tuning, ORPO Llama 3.1 8B | runs | 1,181 tok/s at 1,024 tokens; its loss rose in short test runs |
| Pretraining from scratch 362M, the SmolLM2-360M design | works | 4,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 | unresolved | compiles 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 | blocked | the 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.
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
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
| Trainium1 | 2.149 to 1.251(-0.898) |
| Trainium2 | 2.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
| Workload | Verdict |
|---|---|
| LoRA fine-tuning of a supported model, at fixed input sizes | strong fit |
| Full fine-tuning | ran 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 scratch | works 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 cost | a single GPU was cheaper per token |
| Serving where GPUs can't be rented, or data must stay in one place | the study's judgment, not a measurement: reasonable, up to 32 streams |
| A model type outside the export tool's list | a wall, not a tuning problem |
Every numberInferentia2's serving sweep, the GPU sweep, cost, the training ladder and the draft-model sweep, as tablesShowHide
Swipe the table sideways for more columns.
| Streams | Output tok/s | First token, median ms | Per token, median ms | NeuronCores busy |
|---|---|---|---|---|
| 1 | 15.7 | 399 | 63.2 | 95.6% |
| 4 | 61.4 | 988 | 64.3 | 95.1% |
| 8 | 119.3 | 1,765 | 65.4 | 94.4% |
| 16 | 226.6 | 3,333 | 67.4 | 93.8% |
| 32 | 415.5 | 6,409 | 70.8 | 93.3% |
Swipe the table sideways for more columns.
| Streams | MI300X tok/s | H200 tok/s | MI300X ms per token | H200 ms per token |
|---|---|---|---|---|
| 1 | 195 | 199 | 4.99 | 5.00 |
| 4 | 603 | 761 | 6.45 | 5.21 |
| 8 | 1,137 | 1,445 | 6.73 | 5.46 |
| 16 | 2,066 | 2,674 | 7.42 | 5.87 |
| 32 | 3,443 | 4,486 | 9.07 | 7.00 |
| 64 | 4,956 | 6,806 | 12.64 | 9.21 |
| 128 | 7,022 | 9,937 | 18.00 | 12.59 |
| 256 | 8,085 | 11,337 | 30.97 | 21.55 |
Swipe the table sideways for more columns.
| Device | $ per hour | tok/s at 32 streams | $ at 32 streams | Highest load, tok/s | $ there |
|---|---|---|---|---|---|
| inf2.xlarge, 1x Inferentia2 | 0.7582 | 415.5 | 0.507 | 415.5 at 32 | 0.507 |
| MI300X, 1 GPU | 2.59 | 3,443 | 0.209 | 8,085 at 256 | 0.089 |
| H200, 1 GPU | 4.50 | 4,486 | 0.279 | 11,337 at 256 | 0.110 |
Swipe the table sideways for more columns.
| Example length | Trainium1 tok/s | Trainium2 tok/s | Trainium2 against Trainium1 |
|---|---|---|---|
| 2,048 tokens, steady state | 2,951.8 | 3,532.8 | 1.20× |
| 4,096 tokens, steady state | 3,575.0 | 6,878.4 | 1.92× |
| 8,192 tokens, steady state | does not fit | 8,310.5 | |
| Whole 645-step job at 2,048, end to end | 1,441.0 | 3,181.0 | 2.21× |
Swipe the table sideways for more columns.
| Draft tokens a step | tok/s | Speed-up | Accepted |
|---|---|---|---|
| 0 | 31.61 | 1.000× | |
| 2 | 44.51 | 1.408× | 96.6% |
| 3 | 56.41 | 1.785× | 92.8% |
| 4 | 64.30 | 2.034× | 88.8% |
| 5 | 70.37 | 2.226× | 85.9% |
| 6 | 73.86 | 2.337× | 82.4% |
| 7 | 77.34 | 2.447× | 80.4% |
| 10 | 78.47 | 2.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.