This document is relevant for: Trn2, Trn3
vLLM Neuron Plugin Documentation#
The vLLM Neuron plugin brings the full vLLM serving stack to AWS Trainium
accelerators. It supports continuous batching, speculative decoding
(EAGLE3 and DFlash), disaggregated inference, structured outputs, multimodal models, and
more — all accessible through the standard vllm serve command and
OpenAI-compatible API.
For a high-level overview of inference on Neuron and help choosing the right inference solution, see Inference on Neuron. The source code for the vLLM Neuron plugin is hosted in the vLLM Neuron GitHub repository.
Get started#
Deploy & serve#
Model Recipes#
Tutorials#
Model development#
Concepts & architecture#
Parallelism#
Topic |
Description |
|---|---|
Sharding Q/O weights across DP groups |
|
Per-component independent sharding |
|
Data parallelism overview |
|
KV cache sequence sharding for long contexts |
|
Independent TP/DP for multimodal encoders |
|
Expert parallelism for MoE |
|
Tensor parallelism overview |
Speculation#
Topic |
Description |
|---|---|
EAGLE3 autoregressive drafter internals on Neuron |
|
DFlash block-parallel drafter internals on Neuron |
Multimodal#
Topic |
Description |
|---|---|
FFD block packing for multi-image attention efficiency |
|
Choosing an attention block ladder for a mixed-resolution workload |
|
Block-based on-device cache for encoder outputs |
|
mm / prefix / encoder cache layers and their Prometheus metrics |
|
Spatial position embeddings for VLMs |
vLLM integration#
Topic |
Description |
|---|---|
Plugin registration, scheduler, KV cache |
|
KV cache integration points with vLLM |
|
Additional configuration options |
|
Async scheduling and execution design |
|
Reducing decode HBM reads |
|
Available memory determination |
|
FP8 KV cache mechanics |
|
Production metrics design |
|
Profiling integration |
|
Holdback queue and admission control |
|
Block KV cache architecture |
|
Prefill segmentation and KV reuse |
|
Pooling model execution on Neuron |
|
Prompt embedding support |
|
Adapter slots, per-token routing, LoRA kernels |
|
JSON, regex, grammar-constrained generation |
|
DI architecture, NIXL transport, hybrid TP, DCP |
|
Host tier of the prefix cache, copy modes, ordering against executions |
|
Single-NEFF decode for the whole GPT-OSS-120B decoder stack |
Framework#
Topic |
Description |
|---|---|
Async execution double buffering |
|
Multi-process weight loading from SafeTensors |
|
Model registry and factory pattern |
|
Per-graph neuronx-cc arguments through a model method |
Compilation#
Topic |
Description |
|---|---|
How vLLM Neuron uses the TorchNeuron |
|
Compilation cache (hit/miss, remote store) |
|
Ahead-of-time CPU compilation (NEFF extraction) |
|
FX passes architecture |
|
Aliasing output rewrite pass |
|
Device rewriting FX pass |
|
Inplace to out-of-place rewrite |
|
Collapse per-rank compiles into a single shared NEFF |
|
The per-engine |
Accuracy#
Topic |
Description |
|---|---|
Accuracy debugging framework |
|
How task-level lm_eval dataset runners work |
|
How NRT-boundary input tensors are captured for off-chip replay |
|
KV cache analysis |
|
Logit validation |
|
Module test guidelines |
|
Tensor capture |
|
Tensor compare |
|
Tensor replacement |
This document is relevant for: Trn2, Trn3