This document is relevant for: Trn2, Trn3

Concepts & architecture#

How vLLM Neuron works under the hood — parallelism strategies, plugin integration, speculative decoding internals, and the accuracy validation framework.

Parallelism#

Topic

Description

Attention DP

Sharding Q/O weights across DP groups

Component DP sharding

Per-component independent sharding

Data parallelism

Data parallelism overview

Decode Context Parallelism

KV cache sequence sharding for long contexts

Encoder parallelism

Independent TP/DP for multimodal encoders

Expert parallelism

Expert parallelism for MoE

Tensor parallelism

Tensor parallelism overview

Speculation#

Topic

Description

Speculative decoding (EAGLE3)

EAGLE3 autoregressive drafter internals on Neuron

Speculative decoding (DFlash)

DFlash block-parallel drafter internals on Neuron

Multimodal#

Topic

Description

Block Packing Attention

FFD block packing for multi-image attention efficiency

Vision Block Bucket Planner

Choosing an attention block ladder for a mixed-resolution workload

On-Device Encoder Cache

Block-based on-device cache for encoder outputs

Encoder Cache Metrics

mm / prefix / encoder cache layers and their Prometheus metrics

M-RoPE

Spatial position embeddings for VLMs

vLLM integration#

Topic

Description

vLLM integration design reference

Plugin registration, scheduler, KV cache

KV cache integration

KV cache integration points with vLLM

Additional config

Additional configuration options

Async scheduling and execution

Async scheduling and execution design

Context-length bucketing

Reducing decode HBM reads

Memory management

Available memory determination

KV cache quantization

FP8 KV cache mechanics

Metrics

Production metrics design

Neuron profiling

Profiling integration

Neuron scheduler

Holdback queue and admission control

Block KV batching and padding

Block KV cache architecture

Prefill processing and prefix caching

Prefill segmentation and KV reuse

Pooling models

Pooling model execution on Neuron

Prompt embeddings

Prompt embedding support

Multi-LoRA serving

Adapter slots, per-token routing, LoRA kernels

Structured outputs and tool calling

JSON, regex, grammar-constrained generation

Disaggregated inference

DI architecture, NIXL transport, hybrid TP, DCP

CPU KV offloading

Host tier of the prefix cache, copy modes, ordering against executions

GPT-OSS-120B decode megakernel

Single-NEFF decode for the whole GPT-OSS-120B decoder stack

Framework#

Topic

Description

Async execution

Async execution double buffering

Checkpoint loading

Multi-process weight loading from SafeTensors

Model factory

Model registry and factory pattern

Per-graph compiler arguments

Per-graph neuronx-cc arguments through a model method

Compilation#

Topic

Description

How vLLM is integrated with TorchNeuron

How vLLM Neuron uses the TorchNeuron torch.compile lowering

Compilation cache

Compilation cache (hit/miss, remote store)

CPU compilation

Ahead-of-time CPU compilation (NEFF extraction)

FX passes architecture

FX passes architecture

Aliasing output rewrite pass

Aliasing output rewrite pass

Device rewriting FX pass

Device rewriting FX pass

Inplace to out-of-place pass

Inplace to out-of-place rewrite

SPMD compilation

Collapse per-rank compiles into a single shared NEFF

Compile-artifact manifest

The per-engine manifest.json — compiled graphs, the config that produced them, and how it’s laid out on disk

Accuracy#

Topic

Description

Accuracy debugging design

Accuracy debugging framework

Dataset evaluation

How task-level lm_eval dataset runners work

Input snapshot

How NRT-boundary input tensors are captured for off-chip replay

KV cache analysis

KV cache analysis

Logit validation

Logit validation

Module test guidelines

Module test guidelines

Tensor capture

Tensor capture

Tensor compare

Tensor compare

Tensor replacement

Tensor replacement

This document is relevant for: Trn2, Trn3