vLLM Explained

Glossary

Referenceabout 71 min read

Code version: vLLM @ 3e44c0d · 2026-10-22

This page lists every term that has a tooltip on this site. Each entry gives a short definition. Many entries link to a page with the full explanation.

# A B C D E F G H I J K L M N O P Q R S T U V W Z

##

--goodput also: goodput SLO, request goodput

The vllm bench serve flag that sets SLOs as KEY:VALUE in milliseconds (ttft, tpot, e2el). A request is good when it meets every given SLO.

Flag vllm/benchmarks/serve.py:1867-1878; check vllm/benchmarks/serve.py:669-692.

Read more: Benchmarking vLLM: vllm bench serve, throughput, latency and startup

--kv-cache-memory-bytes also: kv_cache_memory_bytes, --kv-cache-memory

A fixed KV cache size per GPU, in bytes (1G = 1 GiB). With it, the worker still runs the profile run, but skips the memory measurement and ignores --gpu-memory-utilization.

Field vllm/config/cache.py:371-378; worker path vllm/v1/worker/gpu_worker.py:653-679. The start-up log suggests a value but names it --kv-cache-memory (vllm/v1/worker/gpu_worker.py:1046-1053).

Read more: Tuning vLLM: throughput and latency knobs, their real defaults and what each one does

--performance-mode also: performance_mode, throughput mode, interactivity mode

A vllm serve flag with the values balanced (default), interactivity and throughput. Throughput doubles the default token budget and max_num_seqs; interactivity captures CUDA graphs for every batch size from 1 to 32.

Field vllm/config/vllm.py:440-445; throughput vllm/engine/arg_utils.py:3171-3175; interactivity vllm/config/vllm.py:2552-2556.

Read more: Tuning vLLM: throughput and latency knobs, their real defaults and what each one does

@config decorator also: @config, config decorator

The decorator in vllm/config/utils.py that makes a config class a pydantic dataclass whose settings forbid unknown fields.

Defined at vllm/config/utils.py:51-82; extra="forbid" at vllm/config/utils.py:71.

Read more: How configuration works

__post_init__ also: post init, VllmConfig.__post_init__

The method that a dataclass runs right after its __init__. VllmConfig uses it to check the sub-configs together and to set many late defaults.

VllmConfig.__post_init__ at vllm/config/vllm.py:1492-2318.

Read more: config/vllm.py: VllmConfig, __post_init__ and compute_hash

A#

acceptance rate also: mean acceptance length, draft acceptance rate

Accepted draft tokens divided by proposed draft tokens. The mean acceptance length is 1 + accepted tokens per verification round.

PromQL in the docstring of SpecDecodingProm (vllm/v1/spec_decode/metrics.py:177-196).

Read more: Speculative decoding in vLLM serving

add_generation_prompt also: continue_final_message, generation prompt

A chat template variable (default true) that adds the start of a new assistant turn at the end of the prompt, so the model answers next.

Request field at vllm/entrypoints/openai/chat_completion/protocol.py:324-331; it cannot be true together with continue_final_message (vllm/entrypoints/openai/chat_completion/protocol.py:1045-1055).

Read more: Renderers and chat templates: from messages to token ids

all-reduce also: allreduce, all reduce

A collective operation: every GPU in a group gives one tensor, and every GPU gets back the element-wise sum of all of them.

Read more: Tensor and pipeline parallelism in practice

all2all backend also: --all2all-backend, all-to-all backend

The communication method that moves MoE tokens to the ranks of their experts and back. Set with --all2all-backend; the default is allgather_reducescatter.

Choices and default at vllm/config/parallel.py:45-60, vllm/config/parallel.py:220-234.

Read more: Expert parallelism and MoE serving

allocate_slots also: KVCacheManager.allocate_slots

The KVCacheManager method that the scheduler calls for each scheduled request. It adds prefix-cache hits, gets new blocks for the new tokens, caches full blocks, or returns None when blocks are short.

vllm/v1/core/kv_cache_manager.py:371-618

Read more: The KV cache manager: blocks, the block pool and memory sizing

API server also: API servers, API server process, --api-server-count

The uvicorn + FastAPI process of vllm serve that answers HTTP requests. One by default; several with --api-server-count or data parallelism.

With one API server it runs in the CLI process (vllm/entrypoints/cli/serve.py:153-156); with more, the CLI process spawns ApiServer_i processes (vllm/v1/utils.py:248-254).

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

app state also: app.state, init_app_state

The FastAPI app.state object of the API server. init_app_state stores the engine client, the renderer and one object per serving class in it.

Filled in vllm/entrypoints/launchers/api_server/app_state.py:24-176; route functions read it, for example request.app.state.openai_serving_chat.

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

async scheduling also: asynchronous scheduling, AsyncScheduler

The engine core schedules and starts step k+1 before it waits for the result of step k. So CPU work overlaps with GPU work. It is on by default.

Default: vllm/config/vllm.py:1664-1698. Batch queue: vllm/v1/engine/core.py:698-812.

Read more: Async scheduling: overlap the CPU and the GPU

AsyncLLM also: AsyncLLMEngine

The engine object in the front end of vllm serve. It turns requests into engine inputs, sends them to the engine core and streams the outputs back.

Read more: The engine client: AsyncLLM in the API server

attention backend also: attention backends, AttentionBackend

A set of classes that implement attention on a platform, for example FlashAttention or FlashInfer. vLLM selects one per layer type.

Read more: Attention backends: backend, metadata builder and implementation

attention metadata also: attn_metadata, AttentionMetadata

The per-step object that an attention backend needs to run its kernel for a group of layers: query offsets, sequence lengths, block table, slot mapping and backend-specific fields.

A metadata builder makes it from CommonAttentionMetadata. Model Runner V2 puts it into a dict keyed by layer name (vllm/v1/worker/gpu/attn_utils.py:579-580).

Read more: Attention backends: backend, metadata builder and implementation

AttentionBackendEnum also: attention backend enum, register_backend, --attention-backend

The enum that names every attention backend. Each value is the default dotted class path; register_backend can override it or add a member.

Defined at vllm/v1/attention/backends/registry.py:34-166 (49 members). Overrides live in _ATTN_OVERRIDES (vllm/v1/attention/backends/registry.py:344).

Read more: How vLLM chooses an attention backend

AttentionCGSupport also: CUDA graph support, cudagraph support, _cudagraph_support

How much CUDA graph capture a metadata builder allows: ALWAYS, UNIFORM_BATCH, UNIFORM_SINGLE_TOKEN_DECODE or NEVER. The weakest level in the model can lower the CUDA graph mode.

Enum at vllm/v1/attention/backend.py:557-569; the runner takes the minimum over all groups (vllm/v1/worker/gpu/attn_utils.py:314-341).

Read more: Attention backends: backend, metadata builder and implementation

AutoWeightsLoader also: auto weights loader

A helper that walks the module tree with the (name, tensor) stream. It calls a child's own load_weights if it has one, else the weight_loader of each parameter.

vllm/model_executor/models/utils.py:216-478.

Read more: "Weight loading: from checkpoint files to GPU parameters"

B#

backend priority list also: priority list, _get_backend_priorities

The ordered list of attention backends that a platform tries for one kind of layer. The first backend that passes validate_configuration wins.

CUDA builds the list in _get_backend_priorities (vllm/platforms/cuda.py:84-181), keyed by MLA or not and the compute capability.

Read more: How vLLM chooses an attention backend

batch also: batches, batching

The set of tokens from many requests that the model runs in one engine step. The token budget limits its size.

Read more: What you need from DeepInfer Explained

batch queue also: max_concurrent_batches

A short queue of started engine steps in the engine core. Its size is max_concurrent_batches: 2 on one GPU with async scheduling and Model Runner V2.

vllm/v1/engine/core.py:205-211, vllm/config/vllm.py:587-597

Read more: Async scheduling: overlap the CPU and the GPU

BatchDescriptor also: batch descriptor, batch_descriptor, BatchExecutionDescriptor

A small frozen dataclass (padded token count, request count, LoRA flags) in the forward context. Piecewise CUDA graph wrappers use it as the key of their graphs.

Defined at vllm/forward_context.py:29-57. Model Runner V2 also has its own BatchExecutionDescriptor for the dispatch decision (vllm/v1/worker/gpu/cudagraph_utils.py:70-85).

Read more: The forward context: how layers find per-step data

block hash also: BlockHash, BlockHashWithGroupId, block_hashes

The bytes that name one full KV cache block for prefix caching: a hash of the parent block hash, the block's token ids and its extra keys. In the map it gets a 4-byte group id.

BlockHash and BlockHashWithGroupId (vllm/v1/core/kv_cache_utils.py:44-69); computed by hash_block_tokens (vllm/v1/core/kv_cache_utils.py:707-737).

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

block pool also: BlockPool

The scheduler's record of all KV cache blocks: which blocks are free, which a request holds, and which cached blocks a prefix can reuse. It is CPU bookkeeping in the engine core; the KV tensors live in the workers.

Read more: The KV cache manager: blocks, the block pool and memory sizing

block table also: block tables, block_ids

For each request, the list of physical block ids that hold its KV values, in token order. The scheduler sends new block ids; Model Runner V2 keeps the table on the GPU.

Scheduler side: req_to_blocks (vllm/v1/core/single_type_kv_cache_manager.py:126). Worker side: BlockTables (vllm/v1/worker/gpu/block_table.py:17).

Read more: The KV cache manager: blocks, the block pool and memory sizing

breakable CUDA graph also: VLLM_USE_BREAKABLE_CUDAGRAPH, eager_break_during_capture, BreakableCUDAGraphWrapper

An experimental way to get piecewise CUDA graphs without torch.compile: capture stops at each attention op, runs it eagerly, and starts a new graph segment.

Module docstring vllm/compilation/breakable_cudagraph.py:3-20; on by default only for some architectures (vllm/config/vllm.py:75-128) or with VLLM_USE_BREAKABLE_CUDAGRAPH=1.

Read more: torch.compile and CUDA graphs in vLLM

burstiness also: --burstiness, gamma arrivals

The shape factor of the gamma distribution that vllm bench serve draws request gaps from. 1 gives a Poisson process; below 1 gives bursts; above 1 gives more even gaps.

Flag vllm/benchmarks/serve.py:1754-1765; gamma(shape=burstiness, scale=1/(rate × burstiness)) vllm/benchmarks/serve.py:504-508.

Read more: Benchmarking vLLM: vllm bench serve, throughput, latency and startup

busy loop also: run_busy_loop

The main loop of the engine core process. It takes new requests from the input queue, runs one engine step, and puts the outputs into the output queue.

EngineCoreProc.run_busy_loop (vllm/v1/engine/core.py:1609-1620).

Read more: The engine core loop: threads, queues and the busy loop

C#

cache hit cap also: max_cache_hit_length, num_tokens - 1

A prefix-cache hit covers at most num_tokens - 1 tokens, because the model must compute the last prompt token to get its logits. With whole blocks, the last block is often computed again.

vllm/v1/core/kv_cache_manager.py:289-300

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

cache salt also: cache_salt, salt

An optional secret string in a request. vLLM adds it to the hash of the first KV cache block, so only requests with the same salt share cached blocks.

Request field cache_salt (vllm/entrypoints/openai/chat_completion/protocol.py:499-511); used as an extra key of block 0 only (vllm/v1/core/kv_cache_utils.py:659-663).

Read more: Prefix caching: the idea

capability protocol also: capability protocols, model interface, model interfaces, Supports* interface

A class in models/interfaces.py, such as SupportsPP or SupportsLoRA, that a model inherits to say it supports a feature. It brings a ClassVar flag and names the needed methods.

Detected by a supports_* or is_* function, for example vllm/model_executor/models/interfaces.py:864-897.

Read more: Model capability protocols (SupportsPP, SupportsLoRA, ...)

capture size also: cudagraph_capture_sizes, max_cudagraph_capture_size, capture sizes

A padded token count for which vLLM records CUDA graphs at start-up. A PIECEWISE batch runs with the smallest captured size that is not smaller than its token count.

The default list is 1, 2, 4, multiples of 8 up to 248, then multiples of 16 up to the maximum (vllm/config/vllm.py:2557-2570).

Read more: torch.compile and CUDA graphs in vLLM

chat template also: chat templates

A Jinja template, usually in the tokenizer files of a model, that turns a list of chat messages into one prompt string.

Read more: Renderers and chat templates: from messages to token ids

chat_template_kwargs also: --default-chat-template-kwargs, template kwargs

Extra variables for the chat template, for example enable_thinking. Request values override --default-chat-template-kwargs; names the template does not use are dropped.

Merge: vllm/renderers/params.py:104-134; filter: vllm/renderers/hf.py:761-789.

Read more: Renderers and chat templates: from messages to token ids

chunked prefill

The scheduler splits a long prompt into parts and runs one part per step, so that it fits the token budget and decode can continue.

Read more: The V1 scheduler: one token budget, no phases

citation

A link to a file and line in the code. Every claim about the code on this site has one.

Read more: vLLM Explained

collective_rpc also: collective RPC

The executor method that runs one worker method (by name, or a pickled function) on every worker and collects the results. execute_model and sample_tokens use it too.

Interface: vllm/v1/executor/abstract.py:209-242.

Read more: Executors and workers: from the engine core to the GPUs

column-parallel linear layer also: ColumnParallelLinear, column parallel, column-parallel

A linear layer whose output columns are split across the tensor parallel GPUs. Each GPU computes its part of the output from the full input. vLLM class: ColumnParallelLinear.

Read more: Tensor and pipeline parallelism in practice

commit

One saved version of a git repository. A 40-character id names it. This site explains one pinned commit.

Read more: vLLM Explained

CommonAttentionMetadata also: common attention metadata, common_attn_metadata

The backend-neutral description of one step's batch for one KV cache group: query_start_loc, seq_lens, block table, slot mapping, token and request counts.

Fields at vllm/v1/attention/backend.py:389-475. Model Runner V2 builds one per KV cache group in build_attn_metadata (vllm/v1/worker/gpu/attn_utils.py:527-548).

Read more: Attention backends: backend, metadata builder and implementation

compilation mode also: CompilationMode, -cc.mode, VLLM_COMPILE

How vLLM applies torch.compile: NONE (eager), STOCK_TORCH_COMPILE, DYNAMO_TRACE_ONCE or VLLM_COMPILE (vLLM's own Inductor backend with graph splitting and caching).

Enum at vllm/config/compilation.py:37-50. Above O0 an unset mode becomes VLLM_COMPILE (vllm/config/vllm.py:1806-1810).

Read more: torch.compile and CUDA graphs in vLLM

compile cache also: torch_compile_cache, compilation cache, VLLM_DISABLE_COMPILE_CACHE

The folder under $VLLM_CACHE_ROOT/torch_compile_cache where vLLM stores compiled graphs. A second start with the same hash loads them instead of compiling again.

The hash covers env factors, the config hash, the traced source files and the compiler (vllm/compilation/backends.py:1086-1098).

Read more: torch.compile and CUDA graphs in vLLM

component picker also: component pickers, get_*_cls

A Platform method that returns the dotted class name of a part to use on this hardware, for example get_attn_backend_cls or get_device_communicator_cls.

Read more: The Platform interface

concurrency also: requests in flight, max concurrency

The number of requests in the server at the same time. More concurrency gives bigger batches and more throughput, but each step takes longer.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

config class also: config classes, @config, config dataclass

A pydantic dataclass in vllm/config/ made with the @config decorator. It forbids unknown fields. VllmConfig holds one object of each top-level config class.

The decorator is config in vllm/config/utils.py (vllm/config/utils.py:52-82).

Read more: Config classes

connector role also: KVConnectorRole, scheduler-side connector, worker-side connector

The half of a KV connector that an object plays: SCHEDULER (in the engine core, plans loads and saves) or WORKER (in each worker, moves the data).

KVConnectorRole (vllm/distributed/kv_transfer/kv_connector/v1/base.py:139-144). Not the same as kv_role (producer or consumer).

Read more: KV connectors

console script also: console scripts, console_scripts, [project.scripts]

An entry point in the group console_scripts. The installer makes a small program with that name, for example vllm, that calls the given function.

Read more: Python entry points

create_engine_config() also: create_engine_config

The EngineArgs method that builds every sub-config in a fixed order, fills the None defaults, and returns one VllmConfig.

vllm/engine/arg_utils.py:2234-2905.

Read more: engine/arg_utils.py: EngineArgs, the flags and create_engine_config

CUDA graph also: CUDA graphs, cudagraph

A recorded sequence of GPU kernel launches that the GPU can replay with one launch. It removes CPU launch overhead in small steps.

Read more: torch.compile and CUDA graphs in vLLM

custom all-reduce also: CustomAllreduce, custom allreduce

vLLM's own all-reduce kernel for small tensors in a TP group, normally on one node. It writes through peer-to-peer GPU memory instead of NCCL.

Conditions at vllm/distributed/device_communicators/custom_all_reduce.py:214-291; size rule vllm/distributed/device_communicators/custom_all_reduce.py:499-513.

Read more: Process groups: how vLLM slices its ranks

CustomOp also: custom op, custom ops

A vLLM layer class with one forward method per platform (forward_cuda, forward_native, ...). It selects one of them when it is made.

Read more: CustomOp, out-of-tree ops and IR op providers

D#

data parallel rank also: DP rank

The index of one data parallel replica. In vllm serve each DP rank is one engine core process with its own workers and KV cache.

Engine choice per rank at vllm/v1/engine/core.py:1534-1543.

Read more: Data parallel serving: several engine cores behind one endpoint

data parallelism also: DP, data parallel

Several copies of the model serve different requests at the same time. In vLLM, each data parallel rank has its own engine core (DP).

Read more: Data parallel serving: several engine cores behind one endpoint

DBO (dual batch overlap) also: dual batch overlap, microbatching, --enable-dbo

Splits a batch into two microbatches that run in two threads, so the MoE dispatch and combine of one overlap with the compute of the other.

docs/design/dbo.md:5-11; flag vllm/config/parallel.py:258-259.

Read more: Expert parallelism and MoE serving

decode also: decoding

The work that makes the output tokens after the first one, usually one token per request per step. It reads the whole KV cache of the request.

Read more: What you need from DeepInfer Explained

device communicator also: CudaCommunicator, DeviceCommunicatorBase

The platform object that runs the collectives of a group with more than one rank. On CUDA it is CudaCommunicator, which picks pynccl, custom all-reduce, symmetric memory or FlashInfer.

Made at vllm/distributed/parallel_state.py:549-560; CUDA class vllm/platforms/cuda.py:581-584.

Read more: Process groups: how vLLM slices its ranks

dispatch key also: dispatch_key, PrivateUse1

The PyTorch dispatcher key of a device, for example CUDA or PrivateUse1. Platform.dispatch_key holds it; the default is CPU.

Default at vllm/platforms/interface.py:142-145; CUDA sets "CUDA" (vllm/platforms/cuda.py:230).

Read more: The Platform interface

DP coordinator also: DPCoordinator, data parallel coordinator

An extra process for data parallel serving (MoE, or internal/hybrid load balancing). It collects load counts from the engine cores and publishes them to the API servers. For MoE it also tracks the request waves.

Read more: Data parallel serving: several engine cores behind one endpoint

DP wave also: request wave, wave

For MoE data parallelism: one period in which all DP engine cores step together. It ends when no rank has unfinished requests; a new request starts the next wave.

Wave logic in vllm/v1/engine/core.py:2453-2559.

Read more: Data parallel serving: several engine cores behind one endpoint

draft model also: draft_model, drafter

A small separate language model that proposes tokens for a larger target model. In vLLM it is the method draft_model.

It is also the method vLLM picks when the model name gives no other hint (vllm/config/speculative.py:1186-1195).

Read more: Speculative decoding in vLLM serving

Dynamo also: TorchDynamo, torch._dynamo

The capture part of torch.compile. It reads the Python bytecode of a function as it runs and records the tensor operations as an FX graph.

Read more: PyTorch for serving: custom ops and torch.compile

E#

E2E latency also: end-to-end latency, E2EL, request latency

End-to-end latency. The time from the arrival of a request to its last output token.

vLLM measures it in the front end from arrival_time (vllm/v1/metrics/stats.py:594). vllm bench serve measures it at the client and calls it E2EL.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

EAGLE also: eagle3, EAGLE-3, EagleSpeculator

A speculative method with a small draft head that reads the target model's hidden states. vLLM has eagle and eagle3.

use_eagle() is true for eagle, eagle3, mtp, dflash and dspark (vllm/config/speculative.py:2013-2017).

Read more: Speculative decoding in vLLM serving

EC connector also: EC connectors, ECConnectorBase, encoder cache connector

An encoder-cache connector. It moves the outputs of a multimodal encoder between vLLM instances, with the same scheduler and worker roles as a KV connector.

Registry ECConnectorFactory (vllm/distributed/ec_transfer/ec_connector/factory.py:20-74); set with --ec-transfer-config.

Read more: KV connectors

embedding endpoint also: /v1/embeddings, embeddings API

POST /v1/embeddings of the OpenAI-compatible server. It exists only when the model supports the embed task, or when its selected task is token_embed.

Routes are registered in register_pooling_api_routers (vllm/entrypoints/pooling/factories.py:110-143).

Read more: Pooling models and embeddings in vLLM serving

encoder cache also: EncoderCacheManager, EncoderCache, encoder cache size

Storage for multimodal encoder outputs, keyed by the item hash. The scheduler budgets it in embeddings; the worker keeps the tensors.

Scheduler side EncoderCacheManager (vllm/v1/core/encoder_cache_manager.py:19); worker side EncoderCache in Model Runner V2 (vllm/v1/worker/gpu/mm/encoder_cache.py:8-13).

Read more: Multimodal serving: images, audio and video in vLLM

endpoint plugin also: endpoint plugins, vllm.endpoint_plugins

A plugin in the group vllm.endpoint_plugins that adds HTTP routes to the API server. It loads only when VLLM_PLUGINS names it.

The entry point gives a factory that returns an object with name, required_tasks, attach_router() and init_state() (vllm/plugins/endpoint_plugins/interface.py:49-94).

Read more: Plugins in the API server

engine core client also: EngineCoreClient, AsyncMPClient

The object in the front end that talks to the engine core: in the same process, or over ZMQ to one or more engine core processes.

Read more: The engine client: AsyncLLM in the API server

engine death also: dead engine

The state after the engine core process fails during serving. The front end raises EngineDeadError, requests get HTTP 500, /health answers 503 and the API server exits unless VLLM_KEEP_ALIVE_ON_ENGINE_DEATH=1.

Watchdog vllm/entrypoints/launchers/launcher.py:314-337; status mapping vllm/entrypoints/serve/exception_handling/error_response.py:68-72.

Read more: Troubleshooting vLLM: symptom, cause and fix

engine step also: step, steps, engine steps

One turn of the EngineCore loop: schedule a batch, run the model once, sample, and update the requests. Most requests get one new token per step.

Read more: The engine core loop: threads, queues and the busy loop

EngineArgs also: AsyncEngineArgs, engine arguments

One flat dataclass with a field for each engine flag. vllm serve fills it from the parsed command line, then calls create_engine_config() on it.

Class at vllm/engine/arg_utils.py:482-483; AsyncEngineArgs adds one flag (vllm/engine/arg_utils.py:3230-3235).

Read more: engine/arg_utils.py: EngineArgs, the flags and create_engine_config

EngineClient also: engine client, EngineClient protocol

The abstract class that the API server talks to (vllm/engine/protocol.py). AsyncLLM implements it: generate(), abort(), health checks, sleep and RPCs.

The serving classes get the renderer and the input processor from it too (vllm/entrypoints/generate/base/serving.py:150-151).

Read more: The engine client: AsyncLLM in the API server

EngineCore also: engine core, engine core process, EngineCoreProc

The inner loop of vLLM. It owns the scheduler (which holds the KV cache manager) and the executor, and it runs steps on the workers. vllm serve runs it in its own process.

Read more: The engine core loop: threads, queues and the busy loop

EngineCoreOutputs also: EngineCoreOutput, engine core outputs

The message that the engine core sends back after a step. It holds one EngineCoreOutput (new token ids, finish reason) per request, plus scheduler stats.

Made in Scheduler.update_from_output (vllm/v1/core/sched/scheduler.py:2487-2490).

Read more: Data contracts between the parts of vLLM

EngineCoreRequest also: engine core request

The request object that the front end sends to the engine core. It is a msgspec struct with the token ids, the sampling parameters and the arrival time.

Made by InputProcessor.process_inputs (vllm/v1/engine/input_processor.py:538-555). Sent as msgpack over ZMQ.

Read more: Data contracts between the parts of vLLM

EngineDeadError also: engine dead

The exception that the front end raises when an engine core process has died. It cannot be recovered; the API server then shuts down unless VLLM_KEEP_ALIVE_ON_ENGINE_DEATH is set.

Read more: The engine client: AsyncLLM in the API server

entry point also: entry points, entry_points

A name that a Python package publishes in its metadata, under a group. Other code finds it with importlib.metadata and loads the object it points to.

Read more: Python entry points

entry-point group also: entry point group, group

The name that collects related entry points in package metadata, for example console_scripts. Code asks importlib.metadata for all entry points of one group.

vLLM reads its own groups, for example vllm.general_plugins. Those are the plugin groups.

Read more: Python entry points

entry-point metadata also: entry_points.txt, dist-info metadata

The file entry_points.txt in the .dist-info folder of an installed package. importlib.metadata reads it when vLLM asks for the entry points of a group.

The installer writes it from entry_points= in setup.py or from the [project.entry-points."..."] tables in pyproject.toml (pyproject.toml:45-47).

Read more: Python entry points

environment variable also: environment variables, env var, env vars

A named text value that a process gets from its parent when it starts. vLLM declares its VLLM_* variables in vllm/envs.py.

Each variable is a function in the dict environment_variables (vllm/envs.py:618).

Read more: Environment variables

environment variable cache also: enable_envs_cache, envs cache

The functools.cache that enable_envs_cache() puts around envs.__getattr__. After it, envs.X returns a stored value. Only the engine core and the worker processes of the multiprocessing executor turn it on.

vllm/envs.py:2308-2326; callers vllm/v1/engine/core.py:243 and vllm/v1/executor/multiproc_executor.py:710.

Read more: envs.py: environment variables as a dict of lambdas

EPLB also: expert parallel load balancing, --enable-eplb

Expert parallelism load balancer. It counts how many tokens each expert gets and moves or copies busy experts between GPUs every step_interval steps.

Config at vllm/config/parallel.py:63-119; step at vllm/distributed/eplb/eplb_state.py:561-695.

Read more: Expert parallelism and MoE serving

executor also: MultiprocExecutor, UniProcExecutor

The object in the engine core that starts the workers and sends work to them: in one process, in many processes, or with Ray.

Read more: Executors and workers: from the engine core to the GPUs

expert parallelism also: EP, expert parallel

The experts of a MoE layer are split across GPUs. Tokens go to the GPUs of their experts and the results come back (EP).

Read more: Expert parallelism and MoE serving

extension point also: extension points

A place where outside code can change vLLM: a plugin group, a register function, or a config field that names a class.

Read more: All the ways to extend vLLM

external load balancing also: --data-parallel-external-lb

A deployment where a router outside vLLM spreads requests over several vllm serve endpoints. For dense models these are independent servers; the --data-parallel-* external flags are for MoE models only.

Dense models raise ValueError with external DP flags (vllm/engine/arg_utils.py:2445-2454).

Read more: Deployment recipes: single GPU, TP, DP, multi-node, load balancers and security

extra keys also: extra_keys, generate_block_hash_extra_keys

Values besides the token ids that go into a block hash: the LoRA name and path, multimodal item ids, the cache salt (block 0 only) and a hash of prompt embeddings.

generate_block_hash_extra_keys (vllm/v1/core/kv_cache_utils.py:637-675).

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

F#

forward context also: ForwardContext, set_forward_context

An object that vLLM sets before each forward pass. Attention layers read their metadata for the step from it, by layer name.

Read more: The forward context: how layers find per-step data

forward_native also: native implementation, forward_native()

The PyTorch-only method of a CustomOp. vLLM calls it when the op is disabled, and the other forward_* methods fall back to it by default.

Base method at vllm/model_executor/custom_op.py:136-142; disabled path at vllm/model_executor/custom_op.py:189-192.

Read more: CustomOp, out-of-tree ops and IR op providers

free block queue also: FreeKVCacheBlockQueue, free_block_queue

A doubly linked list of all free KV blocks in eviction order. The pool takes new blocks from the front. Freed blocks without a hash go to the front, cached blocks to the end.

FreeKVCacheBlockQueue (vllm/v1/core/kv_cache_utils.py:258-279); used in BlockPool.free_blocks (vllm/v1/core/block_pool.py:776-807).

Read more: The KV cache manager: blocks, the block pool and memory sizing

front end also: front-end process, frontend

The API server process of vllm serve. It runs the HTTP server and AsyncLLM, and sends requests to the engine core process.

Read more: The process and thread architecture of vllm serve

full CUDA graph also: FULL, full cudagraph, FULL_DECODE_ONLY

One CUDA graph for the whole forward pass, attention included. Model Runner V2 replays it with a single call for batches that match a captured shape.

Captured with torch.cuda.graph in CudaGraphManager.capture and replayed in run_fullgraph (vllm/v1/worker/gpu/cudagraph_utils.py:555-568).

Read more: torch.compile and CUDA graphs in vLLM

FusedMoE also: FusedMoEFactory, MoERunner, MoE layer

vLLM's MoE layer. FusedMoEFactory builds a router, a RoutedExperts object with the expert weights, and an MoERunner that runs the layer.

vllm/model_executor/layers/fused_moe/layer.py:92-470.

Read more: Expert parallelism and MoE serving

FX graph also: torch.fx, GraphModule

A PyTorch data structure (torch.fx.GraphModule) that lists the operations of a function as nodes in order. Compiler passes read and change it.

Read more: PyTorch for serving: custom ops and torch.compile

G#

gather_output also: gather output

A flag of ColumnParallelLinear. When true and TP > 1, the layer all-gathers the output slices so every rank has the full output. Default false.

vllm/model_executor/layers/linear.py:625-627.

Read more: The tensor-parallel layers (linear.py and vocab_parallel_embedding.py)

general plugin also: general plugins, vllm.general_plugins

A function in the entry-point group vllm.general_plugins. vLLM calls it with no arguments, at most once in each process, usually to register something.

Loaded by load_general_plugins() (vllm/plugins/__init__.py:77-90). vLLM's own LoRA resolvers are general plugins (pyproject.toml:45-47).

Read more: plugins/__init__.py: the plugin loaders

generation config also: generation_config.json, --generation-config

The generation_config.json file of a model folder. It gives default sampling values (for example temperature, top_p) and EOS token ids. vLLM uses it by default.

Read more: Hugging Face checkpoints

goodput

The number of requests per second that also meet the latency targets (for example TTFT and TPOT limits).

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

grammar bitmask also: token bitmask, bitmask, GrammarOutput

One bit per vocabulary token, packed in int32 words, for each structured request in a step. A 0 bit means the grammar forbids the token; its logit becomes -inf.

Worker buffer int32 [max_num_logits, cdiv(vocab_size, 32)] (vllm/v1/worker/gpu/structured_outputs.py:63-65).

Read more: Structured outputs: JSON schemas, grammars and token bitmasks in vLLM

graph break also: graph breaks

A place where Dynamo cannot capture the Python code. Plain torch.compile then splits the function and runs that part in Python. vLLM compiles with fullgraph=True, so a break is an error.

Read more: PyTorch for serving: custom ops and torch.compile

GroupCoordinator also: group coordinator

vLLM's wrapper for one process group. It holds a gloo CPU group, an NCCL device group, an optional device communicator and an optional shared-memory broadcaster.

Class at vllm/distributed/parallel_state.py:427-453.

Read more: distributed/parallel_state.py: process groups and GroupCoordinator

H#

hash chain also: block hash, block hashes, chained hash

A list of hashes where each hash also includes the hash before it. In prefix caching, the hash of a block names the whole prefix up to the end of that block.

vLLM hashes the tuple (parent hash, block token ids, extra keys) for each full block (vllm/v1/core/kv_cache_utils.py:707-737).

Read more: Prefix caching: the idea

Hugging Face config also: config.json, hf_config, PretrainedConfig

The config.json file of a model folder. It names the model class (architectures) and gives sizes such as hidden_size, num_hidden_layers and max_position_embeddings.

Read more: Hugging Face checkpoints

I#

idx_mapping also: idx mapping, batch_idx -> req_state_idx

An int64 GPU tensor [num_reqs] that maps each row of this step's batch to the request slot in the persistent state. GPU kernels use it to gather per-request data.

Built from the sorted request ids in gather_batch_req_state and copied to the GPU in prepare_inputs (vllm/v1/worker/gpu/model_runner.py:1392-1395).

Read more: The model runner (Model Runner V2)

incremental detokenization also: detokenizer, DecodeStream

Turning token ids into text one token at a time, so each new token gives the next piece of text. vLLM uses the DecodeStream of the tokenizers library.

vllm/v1/engine/detokenizer.py:179-198

Read more: The engine client: AsyncLLM in the API server

Inductor also: TorchInductor, torch._inductor

The default code generator of torch.compile. It turns an FX graph into fused kernels, for example Triton kernels on NVIDIA GPUs.

Read more: PyTorch for serving: custom ops and torch.compile

input thread also: process_input_sockets, input_queue

A daemon thread in the engine core process. It receives requests on the ZMQ sockets, decodes them, builds the Request object and puts it into input_queue.

EngineCoreProc.process_input_sockets (vllm/v1/engine/core.py:1921-2028).

Read more: The engine core loop: threads, queues and the busy loop

InputProcessor also: input processor

The front-end object that checks a rendered prompt and its sampling parameters and makes an EngineCoreRequest.

Read more: The engine client: AsyncLLM in the API server

IntermediateTensors also: intermediate tensors

A dict of named tensors that a pipeline stage returns instead of hidden states. For Llama: hidden_states and residual, each [num_tokens, hidden_size].

vllm/sequence.py:12-28; Llama returns it at vllm/model_executor/models/llama.py:443-450.

Read more: How a vLLM model file is written (llama.py)

IO processor plugin also: IO processor, IOProcessor, vllm.io_processor_plugins

A plugin in the group vllm.io_processor_plugins. It changes the input and the output of a pooling model, for example an image in and an image out.

The function behind the entry point returns the qualified name of an IOProcessor subclass, or None (vllm/plugins/io_processors/__init__.py:63-69). The image example is from the design docs (docs/design/io_processor_plugins.md:3).

Read more: Plugins in the API server

IR op also: vllm.ir op, IrOp, IR ops

An op of vllm.ir, such as rms_norm: a native PyTorch function with optional kernel providers. A priority list per op selects the provider at call time.

register_op at vllm/ir/op.py:102-150; dispatch at vllm/ir/op.py:321-359.

Read more: CustomOp, out-of-tree ops and IR op providers

ITL also: inter-token latency

Inter-token latency. The time between two outputs of one request. In vLLM one output can carry more than one token, for example with speculative decoding.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

J#

json_schema response format also: response_format, json_object, JSON mode

The OpenAI field response_format of type json_schema. vLLM turns it into a structured outputs json constraint, so the answer must match the schema.

vllm/entrypoints/generate/base/protocol.py:181-211

Read more: Structured outputs: JSON schemas, grammars and token bitmasks in vLLM

K#

kernel provider also: provider, providers, IR provider

A named implementation of an IR op, for example vllm_c, oink, aiter or triton. The name native is reserved for the PyTorch version, and the name unfused is also reserved.

register_impl at vllm/ir/op.py:240-298; reserved names at vllm/ir/op.py:36.

Read more: CustomOp, out-of-tree ops and IR op providers

KV cache group also: KVCacheGroupSpec, kv cache groups

A set of layers that use the same KV cache layout and share one block table, for example all full-attention layers.

Read more: The hybrid KV cache: specs, groups and one manager per layer type

KV cache quantization also: FP8 KV cache, kv-cache-dtype, fp8 KV

Storing the keys and values of the KV cache in a smaller format, for example FP8, with scales. FP8 halves the KV memory per token compared with BF16. Set with --kv-cache-dtype.

Read more: Quantized checkpoints

KV cache spec also: KVCacheSpec, FullAttentionSpec, SlidingWindowSpec, MambaSpec

A small dataclass that describes the KV cache of one layer: block size, page size and type (full attention, sliding window, chunked local, MLA, Mamba, ...). The type selects the single-type manager.

KVCacheSpec and subclasses in vllm/v1/kv_cache_interface.py:185-1270; the spec-to-manager registry (vllm/v1/core/single_type_kv_cache_manager.py:2645-2715).

Read more: The hybrid KV cache: specs, groups and one manager per layer type

KV cache usage also: kv_cache_usage, vllm:kv_cache_usage_perc, GPU KV cache usage

The fraction of KV blocks that requests hold now: 1 − free blocks / (all blocks − 1). Free cached prefix blocks count as free. Prometheus shows it as vllm:kv_cache_usage_perc (0 to 1).

BlockPool.get_usage (vllm/v1/core/block_pool.py:881-892); gauge (vllm/v1/metrics/loggers.py:619-623).

Read more: The KV cache manager: blocks, the block pool and memory sizing

KV connector also: KV connectors, KVConnectorBase_V1, kv_connector

A plugin class that moves KV cache blocks between a vLLM instance and something outside it: another instance, CPU memory or a storage system.

Base class KVConnectorBase_V1 (vllm/distributed/kv_transfer/kv_connector/v1/base.py:181); registry KVConnectorFactory (vllm/distributed/kv_transfer/kv_connector/factory.py:27-40).

Read more: KV connectors

KV consumer also: kv_consumer, decode instance, decoder

An instance with kv_role kv_consumer: in disaggregated prefill it loads the prompt's KV blocks from a producer and then decodes.

vllm/config/kv_transfer.py:11-12, vllm/config/kv_transfer.py:134-136.

Read more: Disaggregated prefill: prefill and decode on different instances

KV events also: KV cache events, --kv-events-config, BlockStored, BlockRemoved, KVEventsConfig

Messages that an engine core publishes when its prefix cache changes: BlockStored, BlockRemoved and AllBlocksCleared. An external router can subscribe over ZMQ to know which prefixes each engine holds.

Event types (vllm/distributed/kv_events.py:56-142); KVEventsConfig (vllm/config/kv_events.py:10-52); publish per step (vllm/v1/core/sched/scheduler.py:2469-2484).

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

KV offloading also: KV cache offloading, OffloadingConnector, --kv-offloading-size

Copying KV cache blocks to CPU memory or storage, so that a later request can load them again instead of computing the prefill again.

--kv-offloading-size turns it on through a KV connector (vllm/config/vllm.py:1133-1167); the native code is in vllm/v1/kv_offload/.

Read more: KV connectors

KV producer also: kv_producer, prefill instance, prefiller

An instance with kv_role kv_producer: in disaggregated prefill it computes the prompt and keeps the KV blocks until a decode instance has read them.

vllm/config/kv_transfer.py:11-12, vllm/config/kv_transfer.py:130-132.

Read more: Disaggregated prefill: prefill and decode on different instances

KVCacheBlock also: KV cache block metadata, ref_cnt

The scheduler-side record of one KV cache block: block_id, ref_cnt, the block hash (only when full and cached) and two links for the free queue. The KV data itself is on the GPU.

vllm/v1/core/kv_cache_utils.py:161-186

Read more: The KV cache manager: blocks, the block pool and memory sizing

KVTransferConfig also: --kv-transfer-config, kv_role, kv_connector_extra_config

The config that turns on a KV connector: kv_connector (the name), kv_role (kv_producer, kv_consumer or kv_both) and kv_connector_extra_config. Set with --kv-transfer-config.

Defined at vllm/config/kv_transfer.py:56-91; a connector name without a role raises (vllm/config/kv_transfer.py:120-124).

Read more: KV connectors

L#

lazy registration also: lazy entry, _LazyRegisteredModel, lazy model

A registry entry that stores only a module name and a class name. vLLM imports the module only when a process needs the class.

register_model with a "module:Class" string makes a _LazyRegisteredModel (vllm/model_executor/models/registry.py:1187-1193). All built-in entries are lazy.

Read more: Out-of-tree models and the model registry

load format also: --load-format, load_format

The value of --load-format (default auto). It selects the model loader class and, for the default loader, which weight files to read.

Table of the 15 built-in formats: vllm/model_executor/model_loader/__init__.py:50-66.

Read more: "Weight loading: from checkpoint files to GPU parameters"

load-balancing mode also: internal LB, external LB, hybrid LB, DP load balancing

How requests reach the DP ranks: internal (the API servers pick an engine), hybrid (per node), or external (one endpoint per rank, an outside router picks).

Mode detection at vllm/entrypoints/cli/serve.py:79-103.

Read more: Data parallel serving: several engine cores behind one endpoint

logits processor also: logits processors, LogitsProcessor, --logits-processors, vllm.logits_processors

Code that changes the logits of the batch before sampling. Model Runner V2 runs built-in ones (bias, penalties, bad words) and custom ones.

V2 interface: add_request(slot), apply_staged_writes(), apply(logits, ctx) (vllm/v1/worker/gpu/sample/logits_processor/interface.py:92-158).

Read more: Sampling and logits processors in Model Runner V2

logprobs also: prompt_logprobs, top_logprobs, logprobs_mode

Log probabilities of the sampled token and the top alternatives, returned per output token (logprobs) or per prompt token (prompt_logprobs).

Capped by --max-logprobs, default 20 (vllm/config/model.py:286); raw or processed values by --logprobs-mode (vllm/config/model.py:291-299).

Read more: Sampling and logits processors in Model Runner V2

long_prefill_token_threshold also: --long-prefill-token-threshold

A cap on the tokens that one request can get in one step. 0 (the default) means no cap. The scheduler ignores it when only one request is running or waiting.

Field: vllm/config/scheduler.py:79-84; applied at vllm/v1/core/sched/scheduler.py:677-683 and vllm/v1/core/sched/scheduler.py:764-765.

Read more: The V1 scheduler: one token budget, no phases

LoRA adapter also: LoRA, adapter

A small set of extra low-rank weights that changes a base model for one task. One server can apply different adapters to different requests.

Read more: LoRA adapters

LoRA rank also: adapter rank, LoRA r, max_lora_rank

The inner size r of a LoRA adapter: the update of a d_out x d_in weight is B (d_out x r) times A (r x d_in). Typical values are 8 to 64.

Read more: LoRA adapters

LoRA resolver also: LoRA resolvers, LoRAResolver

An object that finds a LoRA adapter by name when a request asks for an adapter that the server does not know yet, for example in a local folder.

Resolvers register in LoRAResolverRegistry (vllm/lora/resolver.py:52-72). OpenAIServingModels in the API server gets them (vllm/entrypoints/openai/models/serving.py:113-117) and asks them for an unknown adapter (vllm/entrypoints/openai/models/serving.py:325-326).

Read more: Serving LoRA adapters: from the model name to the wrapped layer

LoRA slot also: LoRA slots, GPU slot, lora_slots

One of max_loras GPU positions in the stacked LoRA buffers. An active adapter is copied into a free slot.

Slots are filled in activate_adapter (vllm/lora/model_manager.py:355-412); the LRU manager frees the oldest when all are used.

Read more: Serving LoRA adapters: from the model name to the wrapped layer

LoRARequest also: lora_request, lora_int_id

The small object that names one LoRA adapter for a request: lora_name, lora_int_id and lora_path.

A msgspec struct (vllm/lora/request.py:8-29); equality and hash use only the name.

Read more: Serving LoRA adapters: from the model name to the wrapped layer

M#

Mamba state also: MambaSpec, MambaManager, mamba_cache_mode, SSM state

The fixed-size recurrent state of a Mamba (state-space) layer. It replaces a growing KV cache. vLLM stores it in KV blocks; prefix caching keeps states at block boundaries only in mamba_cache_mode align.

MambaSpec (vllm/v1/kv_cache_interface.py:1079-1151); MambaManager (vllm/v1/core/single_type_kv_cache_manager.py:1424-1464); mamba_cache_mode (vllm/config/cache.py:301-308).

Read more: The hybrid KV cache: specs, groups and one manager per layer type

max_concurrent_batches also: batch queue size

The number of engine steps that can be in flight at the same time. It sets the size of the batch queue: pp_size + 1 with async scheduling and Model Runner V2, so 2 on one GPU.

VllmConfig.max_concurrent_batches (vllm/config/vllm.py:586-597).

Read more: Async scheduling: overlap the CPU and the GPU

maximum concurrency also: Maximum concurrency, kv_cache_max_concurrency

The start-up log value: KV blocks divided by the blocks that one request of max_model_len needs. It tells how many full-length requests fit in the KV cache at once.

Computed in get_max_concurrency_for_kv_cache_config (vllm/v1/core/kv_cache_utils.py:1015-1047) and logged as "Maximum concurrency for N tokens per request: X.XXx" (vllm/v1/core/kv_cache_utils.py:1090-1108).

Read more: Tuning vLLM: throughput and latency knobs, their real defaults and what each one does

MessageQueue also: shared-memory message queue, rpc_broadcast_mq, shm_broadcast

vLLM's one-writer, many-reader queue in shared memory (a ring buffer of chunks). Large messages go over a ZMQ socket instead. The multiproc executor uses it to talk to its workers.

vllm/distributed/device_communicators/shm_broadcast.py:483-530; large messages: vllm/distributed/device_communicators/shm_broadcast.py:942-946.

Read more: Executors and workers: from the engine core to the GPUs

metadata builder also: AttentionMetadataBuilder, builder

The AttentionMetadataBuilder of a backend. It turns the common batch description into the backend's own attention metadata, once per step for each group of layers.

Abstract class at vllm/v1/attention/backend.py:592-761; the backend names it in get_builder_cls().

Read more: Attention backends: backend, metadata builder and implementation

middleware also: --middleware, ASGI middleware

Code that runs around every HTTP request before the route, for example CORS or the API-key check. vLLM adds it in init_entrypoints_middleware.

vllm/entrypoints/serve/middleware/register.py:19-75

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

model implementation also: model_impl, --model-impl, Transformers backend fallback

The --model-impl setting: auto (vLLM class, else the Transformers backend), vllm, transformers or terratorch.

Values at vllm/config/model.py:109; used in the lookup order of vllm/model_executor/models/registry.py:1351-1402.

Read more: Out-of-tree models and the model registry

model info also: _ModelInfo, modelinfo, modelinfos

_ModelInfo: a frozen record of 24 capability values of a model class (generative, pooling, PP, LoRA, multimodal, hybrid ...). The registry computes it from the class.

Fields at vllm/model_executor/models/registry.py:891-915; computed by from_model_cls (vllm/model_executor/models/registry.py:917-954); cached as JSON in VLLM_CACHE_ROOT/modelinfos.

Read more: Model capability protocols (SupportsPP, SupportsLoRA, ...)

model loader also: model loaders, BaseModelLoader, --load-format, register_model_loader

A class that builds the model and loads its weights for one --load-format, for example safetensors, dummy or tensorizer.

Base class BaseModelLoader; table _LOAD_FORMAT_TO_MODEL_LOADER and register_model_loader (vllm/model_executor/model_loader/__init__.py:50-128).

Read more: Hooks in the engine core and the workers

model registry also: ModelRegistry, model registry, _ModelRegistry

ModelRegistry: the one table per process that maps an architecture name from config.json, such as LlamaForCausalLM, to a model class.

Built from the tables in vllm/model_executor/models/registry.py:1565-1573; plugins add entries with register_model (vllm/model_executor/models/registry.py:1160-1203).

Read more: Out-of-tree models and the model registry

model runner also: Model Runner V2, MRV2

The object in a worker that prepares the inputs of a step, runs the model and samples tokens. vLLM uses Model Runner V2 by default.

Read more: The model runner (Model Runner V2)

modular MoE kernel also: FusedMoEKernel, prepare/finalize

An MoE kernel built from two parts: a prepare/finalize object (quantize and dispatch, then combine) and an experts object (the grouped GEMMs).

Design comment at vllm/model_executor/layers/fused_moe/modular_kernel.py:51-84.

Read more: Expert parallelism and MoE serving

MPClient also: multiprocess client, AsyncMPClient, SyncMPClient

The base class of the engine core clients that talk to engine core processes over ZMQ. It binds (or takes over) the sockets, waits for the ready messages and, when it started the engine processes, watches them.

Read more: v1/engine/core_client.py: the engine core clients

msgpack also: MessagePack

MessagePack, a compact binary format for data. vLLM encodes the messages between the front end and the engine core with it.

Read more: Processes, ZMQ and shared memory

MTP also: multi-token prediction, deepseek_mtp

Multi-token prediction: extra layers in the checkpoint that predict the next tokens. vLLM uses them as a drafter with the method mtp.

Model-specific names such as deepseek_mtp are deprecated and become mtp (vllm/config/speculative.py:1197-1201).

Read more: Speculative decoding in vLLM serving

multi-LoRA serving also: multi-LoRA, multi LoRA, batched LoRA

One server keeps one base model and several LoRA adapters. It runs requests with different adapters in the same batch; each token uses the adapter of its request.

Read more: LoRA adapters

multimodal processor also: BaseMultiModalProcessor, MM processor, MULTIMODAL_REGISTRY

The per-model class that turns the HF processor output into tensors and placeholder tokens in the prompt (BaseMultiModalProcessor).

Abstract base at vllm/multimodal/processing/processor.py:1032; registered on the model class with MULTIMODAL_REGISTRY.register_processor.

Read more: Multimodal serving: images, audio and video in vLLM

multiproc executor also: MultiprocExecutor, mp executor

The executor backend "mp" (MultiprocExecutor). It starts one worker process per local rank and sends every call to all of them through one shared-memory message queue.

vllm/v1/executor/multiproc_executor.py:112-268

Read more: Executors and workers: from the engine core to the GPUs

N#

NONE_HASH also: NONE_HASH, init_none_hash

The value that stands for the parent hash of block 0. vLLM derives it from a seed: PYTHONHASHSEED if set, else a fixed seed for the sha256 algorithms and a random seed for the xxhash algorithms.

vllm/v1/core/kv_cache_utils.py:104-158

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

null block also: null_block, block 0

Block 0 of the block pool. It is never given to a request. It fills block table places that hold no data, for example blocks outside a sliding window.

vllm/v1/core/block_pool.py:184-188; KV cache usage leaves it out (vllm/v1/core/block_pool.py:888-892).

Read more: The KV cache manager: blocks, the block pool and memory sizing

num_computed_tokens also: computed tokens

The number of tokens of a request whose KV values are in the KV cache (or are computed by a step already started). The scheduler gives tokens until it catches up with num_tokens.

Set to 0 by Request.__init__ (vllm/v1/request.py:184); advanced in _update_after_schedule (vllm/v1/core/sched/scheduler.py:1716); reset to 0 on preemption (vllm/v1/core/sched/scheduler.py:1680).

Read more: The V1 scheduler: one token budget, no phases

num_speculative_tokens also: k, --spec-tokens, number of speculative tokens

k, the number of draft tokens per request per step. A decode then has 1 + k query tokens.

No default; it comes from n_predict of the draft config when present (vllm/config/speculative.py:393-395).

Read more: Speculative decoding in vLLM serving

O#

op registry also: op_registry, op_registry_oot

op_registry: the dict from a registered op name, such as rms_norm, to its CustomOp or PluggableLayer class. The +name and -name switches use these names.

vllm/model_executor/custom_op.py:16-22; filled by register (vllm/model_executor/custom_op.py:310-323).

Read more: CustomOp, out-of-tree ops and IR op providers

OpenAI-compatible server also: API server, OpenAI server

The HTTP server of vllm serve. Its routes, such as /v1/chat/completions, accept the same requests as the OpenAI API.

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

optimization level also: -O, --optimization-level, OptimizationLevel, O2

The -O0 to -O3 switch of vllm serve. It sets defaults for the CUDA graph mode and the fusion passes; O2 is the default.

Enum at vllm/config/vllm.py:131-143, default at vllm/config/vllm.py:434, defaults per level at vllm/config/vllm.py:254-338.

Read more: torch.compile and CUDA graphs in vLLM

out-of-tree also: OOT, out of tree

Code that is not in the vLLM repository, for example a model or a platform in your own package. Short form: OOT.

Read more: All the ways to extend vLLM

output handler also: output_handler

The one background asyncio task of AsyncLLM. It takes EngineCoreOutputs from the engine core client, runs the OutputProcessor and puts each RequestOutput into the collector of its request.

Read more: The engine client: AsyncLLM in the API server

output placeholder also: num_output_placeholders

A count of tokens that are in flight: a started step will sample them, but the scheduler does not have them yet. The async scheduler uses it to plan the next step of a request.

num_output_placeholders: added at schedule time (vllm/v1/core/sched/async_scheduler.py:45-47), removed when the token arrives (vllm/v1/core/sched/async_scheduler.py:71-73).

Read more: Async scheduling: overlap the CPU and the GPU

output thread also: process_output_sockets, output_queue

A daemon thread in the engine core process. It takes EngineCoreOutputs from output_queue, encodes them with msgpack and sends them on a ZMQ PUSH socket to the front end.

EngineCoreProc.process_output_sockets (vllm/v1/engine/core.py:2030-2096).

Read more: The engine core loop: threads, queues and the busy loop

OutputProcessor also: output processor

The front-end object that turns EngineCoreOutputs into RequestOutputs. It detokenizes, checks stop strings and computes the request metrics.

vllm/v1/engine/output_processor.py:728-895

Read more: The engine client: AsyncLLM in the API server

P#

P/D disaggregation also: disaggregated prefill, prefill/decode disaggregation, disagg

Running prefill and decode of a request on different vLLM instances, with a KV connector that moves the KV cache between them.

Why: docs/features/disagg_prefill.md:8-16.

Read more: Disaggregated prefill: prefill and decode on different instances

page size unification also: unify_kv_cache_spec_page_size, page_size_padded, page size

Making the bytes of one block equal in every layer of a model with several KV cache groups. vLLM scales up the block size of small pages, or pads pages, because all groups share one block pool.

unify_kv_cache_spec_page_size (vllm/v1/core/kv_cache_planning.py:346-408); for Mamba hybrids also _align_hybrid_block_size (vllm/platforms/interface.py:939-1134).

Read more: The hybrid KV cache: specs, groups and one manager per layer type

percentile also: p50, p90, p99, median

The value that a given part of the samples is below. p50 (the median): half of the samples are below it. p99: 99 % are below it.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

persistent batch also: persistent state, req_states, RequestState (MRV2)

The request state that Model Runner V2 keeps on the GPU between steps, one fixed row per running request. Each step gathers its inputs from these rows.

RequestState allocates max_num_reqs rows for token ids, lengths, computed counts, last sampled tokens and drafts (vllm/v1/worker/gpu/states.py:9-85). The design doc explains why the state is kept apart from the per-step inputs (docs/design/model_runner_v2.md:31-39).

Read more: The model runner (Model Runner V2)

piecewise CUDA graph also: PIECEWISE, piecewise cudagraph, piecewise graph

CUDA graphs captured for the compiled pieces between attention ops. Attention itself runs eagerly between the replays, so any batch shape works.

Each compiled piece gets a CUDAGraphWrapper with runtime mode PIECEWISE (vllm/compilation/backends.py:656-707).

Read more: torch.compile and CUDA graphs in vLLM

pipeline bubble also: bubble, bubbles, pipeline bubbles

Idle time of a pipeline stage. It waits for the stage before it, because there is not enough work in flight to keep every stage busy.

Read more: Tensor and pipeline parallelism in practice

pipeline parallelism also: PP, pipeline parallel

Each GPU holds a different range of layers. The hidden states go from one GPU to the next (PP).

Read more: Tensor and pipeline parallelism in practice

placeholder token also: placeholders, image token, mm_placeholders

A prompt token that stands for one embedding of an image, audio or video item. The model replaces it with encoder output.

The processor inserts as many placeholders as the encoder gives embeddings (vllm/multimodal/processing/processor.py:1816-1826).

Read more: Multimodal serving: images, audio and video in vLLM

platform also: current_platform, Platform class

The object that holds the hardware choices of a process (CUDA, ROCm, CPU, ...). Code reads it as current_platform.

Read more: Platform plugins and current_platform

platform detector also: platform detectors, detector function, builtin_platform_plugins

A function with no arguments that returns the class name of a Platform subclass when its hardware is present, else None. vLLM has five built-in detectors.

Built-in detectors: tpu, cuda, rocm, xpu, cpu (vllm/platforms/__init__.py:231-237). An out-of-tree platform plugin is also a detector (vllm/platforms/__init__.py:254-259).

Read more: Platform plugins and current_platform

platform hook also: platform hooks, config hook

A method of the Platform class that vLLM calls at a fixed point of the start-up or of a request, for example check_and_update_config or get_attn_backend_cls.

Read more: The Platform interface

PluggableLayer also: pluggable layer, pluggable layers

A layer base class, for example of the linear layers, that an out-of-tree class can replace as a whole. It has no per-platform forward methods.

vllm/model_executor/custom_op.py:32-99.

Read more: CustomOp, out-of-tree ops and IR op providers

plugin also: plugins, vLLM plugin

Code that a Python package (usually not vLLM itself) publishes as an entry point in a vLLM group. vLLM finds and loads it, so that it can add or change a feature.

Read more: How vLLM finds and loads plugins

plugin group also: entry-point group, vllm.general_plugins

An entry-point group name that vLLM reads, for example vllm.general_plugins. Each group has its own purpose and its own load time.

Read more: How vLLM finds and loads plugins

plugin package also: plugin packages, vendor plugin package

An installable Python package that publishes one or more vLLM entry points, for example a vendor package with a platform plugin and a general plugin.

vLLM's own test packages in tests/plugins/ are small examples, for example tests/plugins/vllm_add_dummy_platform/setup.py:6-18.

Read more: Tour: Life of a plugin

pooler also: Pooler, PoolerConfig, pooling type

The model's last module for pooling tasks: it reduces hidden states to one vector per request (LAST, MEAN, CLS) or keeps one per token (ALL, STEP).

Interface at vllm/model_executor/layers/pooler/abstract.py:16-34; settings in PoolerConfig (vllm/config/pooler.py:30).

Read more: Pooling models and embeddings in vLLM serving

pooling model also: pooling models, embedding model, --runner pooling

A model that returns vectors or scores (embeddings, classes, rewards) instead of generated text. vLLM runs it with --runner pooling.

Runner types generate, pooling and draft (vllm/config/scheduler.py:20); --convert embed or classify adapts a generative architecture (vllm/config/model.py:124-128).

Read more: Pooling models and embeddings in vLLM serving

PPMissingLayer also: PP missing layer, is_pp_missing_parameter

An identity module that stands in for a layer that another pipeline stage owns. It keeps layer indices and names the same on every stage.

vllm/model_executor/models/utils.py:852-860.

Read more: How a vLLM model file is written (llama.py)

preemption also: preempt

The scheduler stops a running request when no free KV cache blocks are left. It frees the blocks and runs the request again later.

Read more: The V1 scheduler: one token budget, no phases

preemption rate also: preemptions per second

Preemptions per second: rate(vllm:num_preemptions_total[5m]) in PromQL. A rate above 0 means that the KV cache is too small for the running requests.

Counter vllm/v1/metrics/loggers.py:738-746; incremented from PREEMPTED events (vllm/v1/metrics/stats.py:580-583).

Read more: Troubleshooting vLLM: symptom, cause and fix

prefill also: prefills

The work on the prompt tokens of a request. It fills the KV cache and gives the first output token. In vLLM, prefill is not a separate phase of the scheduler.

Read more: What you need from DeepInfer Explained

prefix (of a layer) also: prefix, layer prefix, maybe_prefix

The dotted name of a layer in the model tree, for example model.layers.0.self_attn.qkv_proj. Each constructor gets it and passes a longer one to its children.

The quantization config uses it to pick a method per layer (vllm/model_executor/layers/quantization/base_config.py:203-217), and the Attention layer uses it as its key in static_forward_context (vllm/model_executor/layers/attention/attention.py:443-445).

Read more: How a vLLM model file is written (llama.py)

prefix caching also: automatic prefix caching, APC

vLLM keeps full KV cache blocks with a hash of their tokens. A new request with the same prefix uses these blocks and skips their prefill.

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

process group also: process groups, ProcessGroup

A fixed set of ranks that run collectives together, for example the two ranks of one TP group. vLLM wraps each one in a GroupCoordinator.

PyTorch groups made with torch.distributed.new_group (vllm/distributed/parallel_state.py:501-518).

Read more: Process groups: how vLLM slices its ranks

profile run also: memory profiling, determine_available_memory

A forward pass with dummy inputs of max_num_batched_tokens tokens at start-up. vLLM measures the peak memory of this pass to compute how much memory is left for the KV cache.

Worker.determine_available_memory (vllm/v1/worker/gpu_worker.py:680-697); profile_run in Model Runner V2 (vllm/v1/worker/gpu/model_runner.py:1010-1040).

Read more: v1/worker/gpu_worker.py: the GPU Worker

Prometheus counter also: counter

A Prometheus metric that only goes up, for example the number of generated tokens. Use rate() to get a value per second.

Read more: Prometheus metrics

Prometheus gauge also: gauge

A Prometheus metric that holds the current value and can go up and down, for example the number of waiting requests.

Read more: Prometheus metrics

Prometheus histogram also: histogram, Prometheus

A Prometheus metric that counts samples in fixed buckets. It has the series _bucket, _sum and _count. Percentiles from it are estimates.

vLLM takes the default bucket edges from vllm/v1/metrics/buckets.py (vllm/v1/metrics/buckets.py:30-104).

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

Prometheus label also: label, labels

A key-value pair on a Prometheus metric, for example engine="0". Each set of label values is one time series.

Most vLLM engine metrics use the labels model_name and engine (vllm/v1/metrics/loggers.py:499).

Read more: Prometheus metrics

Punica wrapper also: PunicaWrapper, PunicaWrapperGPU, shrink, expand

The object that runs the batched LoRA kernels (shrink and expand) for a batch in which each token can use a different adapter.

The platform names the class; CUDA uses PunicaWrapperGPU (vllm/platforms/cuda.py:577-578).

Read more: Serving LoRA adapters: from the model name to the wrapped layer

Q#

QKVParallelLinear also: qkv_proj, QKV parallel linear

The column-parallel layer that computes Q, K and V in one GEMM. It splits by attention heads and copies KV heads when TP is larger than the KV head count.

vllm/model_executor/layers/linear.py:1011-1091.

Read more: The tensor-parallel layers (linear.py and vocab_parallel_embedding.py)

quantization method also: QuantizationConfig, quantization

A vLLM class pair that reads a quantized checkpoint and runs its layers, for example FP8, AWQ or GPTQ. --quantization selects it.

Read more: Quantization methods as plugins

QuantizationConfig also: quantization config, quant_config

The base class of a quantization method. One object holds the checkpoint settings and returns a quantize method for each layer through get_quant_method.

Abstract methods: get_name, get_supported_act_dtypes, get_min_capability, get_config_filenames, from_config, get_quant_method (vllm/model_executor/layers/quantization/base_config.py:109-217).

Read more: Quantization methods as plugins

quantize method also: QuantizeMethodBase, quant_method, LinearMethodBase

The per-layer object that makes a layer's quantized weights (create_weights), runs its forward (apply) and post-processes the loaded weights.

Base class QuantizeMethodBase (vllm/model_executor/layers/quantization/base_config.py:23-95). A linear layer stores it as self.quant_method (vllm/model_executor/layers/linear.py:290-296).

Read more: Quantization methods as plugins

R#

rank layout also: rank grid, layout order

The order in which vLLM arranges all ranks before it cuts them into groups: ExternalDP × DP × PP × PCP × TP, with TP as the fastest dimension.

vllm/distributed/parallel_state.py:2148-2163.

Read more: Process groups: how vLLM slices its ranks

readiness probe also: liveness probe, health probe

A periodic health request from an orchestrator (for example Kubernetes) that decides when a server gets traffic. For vllm serve it is usually GET /health.

/health answers 200, or 503 after EngineDeadError (vllm/entrypoints/serve/instrumentator/health.py:22-33). The vLLM docs use /health for both probes (docs/deployment/k8s.md:244-254).

Read more: Deployment recipes: single GPU, TP, DP, multi-node, load balancers and security

reasoning output also: reasoning_content, reasoning field, reasoning content

The thinking text of a reasoning model. With --reasoning-parser, vLLM returns it in the vLLM field reasoning (old name reasoning_content), not in content.

Response field at vllm/entrypoints/openai/chat_completion/protocol.py:79-80; old input name renamed at vllm/entrypoints/openai/chat_completion/protocol.py:590-592.

Read more: Tool and reasoning parsers: from model text to tool_calls and reasoning

reasoning parser also: reasoning parsers, ReasoningParserManager, --reasoning-parser

A class that splits the model's reasoning text from its answer. --reasoning-parser selects it; the API server and the engine core both use it.

Registry ReasoningParserManager (vllm/reasoning/abs_reasoning_parsers.py:225-373).

Read more: Tool and reasoning parsers: from model text to tool_calls and reasoning

recompute preemption also: recompute, PREEMPTED

vLLM's only kind of preemption: the scheduler frees all KV blocks of the request and sets num_computed_tokens to 0. Later the request computes its tokens again (prefix caching can give some back).

Scheduler._preempt_request (vllm/v1/core/sched/scheduler.py:1658-1701).

Read more: The V1 scheduler: one token budget, no phases

reduce_results also: reduce results

A flag of RowParallelLinear (default true). When true and TP > 1, the layer all-reduces the partial sums of the ranks.

vllm/model_executor/layers/linear.py:1803-1806.

Read more: The tensor-parallel layers (linear.py and vocab_parallel_embedding.py)

register_oot also: register_oot(), @CustomOp.register_oot, out-of-tree op

The decorator that registers an out-of-tree replacement class for an in-tree CustomOp or PluggableLayer. vLLM then builds the replacement wherever code builds the in-tree class.

vllm/model_executor/custom_op.py:334-356. A string as the first argument raises TypeError; use name="...".

Read more: CustomOp, out-of-tree ops and IR op providers

rejection sampler also: RejectionSampler, verification

The sampler that checks draft tokens against the target model's distribution, keeps the accepted prefix and adds one recovered or bonus token.

Model Runner V2 class at vllm/v1/worker/gpu/spec_decode/rejection_sampler.py:147; variants standard, synthetic, block, fly (vllm/config/speculative.py:83).

Read more: Speculative decoding in vLLM serving

ReplicatedLinear also: replicated linear

A linear layer that every TP rank holds in full. It splits nothing and needs no communication.

vllm/model_executor/layers/linear.py:327-431.

Read more: The tensor-parallel layers (linear.py and vocab_parallel_embedding.py)

request also: requests

One generation job from a client: a prompt, sampling settings and the output tokens so far. vLLM gives each request an id and tracks it until it finishes.

Read more: Tour: Life of a chat request

request rate also: --request-rate, QPS

In vllm bench serve, the mean number of requests that the client starts per second (--request-rate). The default inf sends all requests at time 0.

Flag vllm/benchmarks/serve.py:1745-1753; arrival times vllm/benchmarks/serve.py:483-526.

Read more: Benchmarking vLLM: vllm bench serve, throughput, latency and startup

request slot also: req_index, req_state_idx, slot index

The row index that Model Runner V2 gives a request in its persistent tensors, from 0 to max_num_reqs - 1. The request keeps it until it finishes or is preempted.

add_request pops a free index; remove_request appends it again, so the last freed slot is reused first (vllm/v1/worker/gpu/states.py:99-102, vllm/v1/worker/gpu/states.py:127-134).

Read more: The model runner (Model Runner V2)

request throughput also: requests per second, req/s, RPS

The number of finished requests per second, over the whole run.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

RequestOutput also: CompletionOutput

The result object that AsyncLLM gives to the API server: new text, new token ids and a finished flag. In streaming mode it holds only the new part.

Read more: The engine client: AsyncLLM in the API server

RequestOutputCollector also: output collector

A one-slot queue per request in the front end. The output handler puts RequestOutputs in it, and generate() takes them out. It merges outputs when the reader is slow.

vllm/v1/engine/output_processor.py:53-111

Read more: The engine client: AsyncLLM in the API server

RequestState also: request state

The front-end record of one request in the OutputProcessor: prompt, detokenizer, logprobs processor, output kind, collector queue and timing stats.

Read more: v1/engine/output_processor.py: from token ids to RequestOutputs

route also: routes, endpoint, API route

One HTTP method and path that the API server answers, for example POST /v1/chat/completions. FastAPI calls one handler function for each route.

Read more: The OpenAI-compatible API

router also: routers, APIRouter, register_api_routers

A FastAPI APIRouter: a group of routes in one module. register_api_routers adds the routers to the app, some only for some tasks or flags.

vllm/entrypoints/launchers/api_server/routers.py:12-90

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

row-parallel linear layer also: RowParallelLinear, row parallel, row-parallel

A linear layer whose input rows are split across the tensor parallel GPUs. Each GPU makes a partial sum of the full output; an all-reduce adds them. vLLM class: RowParallelLinear.

Read more: Tensor and pipeline parallelism in practice

running queue also: running, self.running, RUNNING requests

The list Scheduler.running: the requests that hold KV blocks and take part in steps. The scheduler serves it first in each step, from the front.

self.running: list[Request] (vllm/v1/core/sched/scheduler.py:232); the running pass (vllm/v1/core/sched/scheduler.py:713-715).

Read more: The V1 scheduler: one token budget, no phases

S#

safetensors also: .safetensors, model.safetensors.index.json, safetensors index

A file format for tensors: a JSON header with the name, dtype, shape and byte offsets of each tensor, then the raw bytes. Loading it runs no code.

Read more: Hugging Face checkpoints

SamplingParams also: sampling parameters, sampling_params

The per-request sampling settings: temperature, top_p, top_k, min_p, penalties, seed, stop rules, logprobs and more.

Class at vllm/sampling_params.py:271. The OpenAI server builds it from the request and the server defaults.

Read more: Sampling and logits processors in Model Runner V2

scheduler also: Scheduler

The part of the EngineCore that decides, in each step, which requests run and how many of their tokens. It also allocates KV cache blocks and preempts requests.

Read more: The V1 scheduler: one token budget, no phases

scheduler_cls also: --scheduler-cls, custom scheduler

A config field (--scheduler-cls) that names the scheduler class of the engine core. Not set: AsyncScheduler with async scheduling, else Scheduler.

Field at vllm/config/scheduler.py:177; resolved by get_scheduler_cls (vllm/config/scheduler.py:231-256).

Read more: Hooks in the engine core and the workers

SchedulerOutput also: scheduler output

The plan of one engine step: which requests run, how many tokens each gets, and which KV blocks they use. The scheduler gives it to the executor.

Fields: vllm/v1/core/sched/output.py:232-313.

Read more: Data contracts between the parts of vLLM

scheduling policy also: --scheduling-policy, fcfs, priority scheduling

How the scheduler orders waiting requests and picks a preemption victim: fcfs (default, arrival order) or priority (smaller priority value first, then arrival time).

--scheduling-policy, SchedulerConfig.policy (vllm/config/scheduler.py:159-165); SchedulingPolicy (vllm/v1/core/sched/request_queue.py:13-17).

Read more: The V1 scheduler: one token budget, no phases

serving class also: serving classes, serving object, OpenAIServingChat, BaseServing

A class in vllm/entrypoints that implements one API, for example OpenAIServingChat for /v1/chat/completions. All derive from BaseServing.

Base class at vllm/entrypoints/serve/engine/serving.py:31; the generate family shares GenerateBaseServing (vllm/entrypoints/generate/base/serving.py:129).

Read more: The OpenAI-compatible server: launch modes, app, serving classes and streaming

sleep mode also: sleep-mode backend, SleepModeBackendFactory, --enable-sleep-mode

A feature that frees most GPU memory of an idle engine and restores it later. A sleep-mode backend does the work; the built-in one is cumem.

Turned on with --enable-sleep-mode (vllm/config/model.py:370-372); backends in SleepModeBackendFactory (vllm/device_allocator/sleep_mode_backend.py:160-214).

Read more: Hooks in the engine core and the workers

SlidingWindowManager also: sliding window manager, SWA manager

The single-type KV cache manager for sliding-window layers. It frees blocks that fall out of the window, puts the null block in their place, and searches prefix hits from right to left.

vllm/v1/core/single_type_kv_cache_manager.py:942-1179

Read more: The hybrid KV cache: specs, groups and one manager per layer type

SLO also: service level objective

Service level objective. A limit that a request must meet to count as good, for example TTFT of 500 ms or less.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

slot mapping also: slot_mapping, slot_mappings, PAD_SLOT_ID

For each scheduled token, the flat index of its place in the KV cache: block id × block size + offset. Padding tokens get -1 (PAD_SLOT_ID).

Model Runner V2 computes one row per KV cache group (vllm/v1/worker/gpu/block_table.py:229-260); the formula is at vllm/v1/worker/gpu/block_table.py:409.

Read more: The model runner (Model Runner V2)

spawn also: spawn start method, fork

A way to start a Python child process. The child starts a new interpreter and imports its modules again. It does not copy the memory of the parent.

Read more: Processes, ZMQ and shared memory

SpeculativeConfig also: --speculative-config, speculative config, -sc

The config of speculative decoding. --speculative-config takes it as a JSON object: method, model, num_speculative_tokens and more.

Class at vllm/config/speculative.py:387; the CLI keeps the JSON as a dict until the engine config is built (vllm/engine/arg_utils.py:1851-1857).

Read more: Speculative decoding in vLLM serving

splitting op also: splitting_ops, splitting operation

A custom op where vLLM cuts the compiled FX graph into pieces. The op runs eagerly between the pieces, so it stays out of piecewise CUDA graphs.

By default the attention ops (vllm/config/compilation.py:768-787) plus the two KV cache update ops when Inductor graph partition is off (vllm/config/compilation.py:1175-1213).

Read more: torch.compile and CUDA graphs in vLLM

SSE also: server-sent events, streaming

Server-sent events. The server keeps the HTTP response open and sends each part as a 'data:' line. The OpenAI API (not SSE itself) ends the stream with 'data: [DONE]'.

Read more: The OpenAI-compatible API

stacked parameter also: stacked params, stacked_params_mapping, shard id, shard_id, packed module

One vLLM parameter that holds several checkpoint tensors side by side, for example qkv_proj for q_proj, k_proj and v_proj. A shard id says which part a tensor fills.

Llama stacks q/k/v into qkv_proj and gate/up into gate_up_proj (vllm/model_executor/models/llama.py:348-357). Older model files use a stacked_params_mapping list in load_weights instead.

Read more: "Weight loading: from checkpoint files to GPU parameters"

start method also: multiprocessing start method, fork, forkserver

How Python's multiprocessing starts a child process: fork (copy the parent), spawn (start a new interpreter) or forkserver. vLLM reads it from VLLM_WORKER_MULTIPROC_METHOD.

Read more: Processes, ZMQ and shared memory

start-up handshake also: handshake, READY message, HELLO

The HELLO, init message and READY exchange between a new engine core process and the front end on a ZMQ socket.

Engine side vllm/v1/engine/core.py:1364-1413; front-end side vllm/v1/engine/utils.py:1398-1591.

Read more: Tour: Start-up of vllm serve

stat logger also: stat loggers, StatLoggerBase, vllm.stat_logger_plugins

An object in the API server that receives the scheduler and iteration statistics of each step, for example the Prometheus logger. Plugins add more.

Base class StatLoggerBase (vllm/v1/metrics/loggers.py:54-81); plugin group vllm.stat_logger_plugins (vllm/v1/metrics/loggers.py:84-98).

Read more: Plugins in the API server

static_forward_context also: static forward context, no_compile_layers

A dict in the compilation config from layer name (prefix) to layer object. Attention, MoE and some other layers add themselves when they are built.

Declared at vllm/config/compilation.py:757-760; the Attention layer registers at vllm/model_executor/layers/attention/attention.py:443-445. The forward context copies a reference to it as no_compile_layers (vllm/forward_context.py:248).

Read more: The forward context: how layers find per-step data

structured output backend also: --structured-outputs-config.backend, xgrammar, guidance, outlines

The library that compiles a constraint into a grammar and fills the token bitmask: xgrammar, guidance, outlines or lm-format-enforcer. The default auto picks per request.

Choices at vllm/config/structured_outputs.py:11-24; auto rules at vllm/sampling_params.py:1390-1441.

Read more: Structured outputs: JSON schemas, grammars and token bitmasks in vLLM

T#

tensor parallelism also: TP, tensor parallel

Each GPU holds a slice of every weight matrix. The GPUs compute their slices of each layer and then combine the results (TP).

Read more: Tensor and pipeline parallelism in practice

token budget also: max_num_batched_tokens, max_num_scheduled_tokens

The maximum number of tokens that the scheduler puts into one step. It is max_num_scheduled_tokens, which is max_num_batched_tokens by default. Prefill and decode tokens share it.

Read more: The V1 scheduler: one token budget, no phases

token throughput also: tokens per second, tok/s, output throughput, generation throughput

The number of tokens per second that a server makes (output tokens), or reads and makes (input plus output tokens).

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

token-in token-out also: TITO, tokens in tokens out, /inference/v1/generate

Serving where the client sends token ids and gets token ids back, with no template and no detokenization in the server. vLLM has /inference/v1/generate for it.

Registered only with --enable-scale-out or --tokens-only (vllm/entrypoints/scale_out/factories.py:94-137).

Read more: Renderers and chat templates: from messages to token ids

tool parser also: tool parsers, ToolParserManager, --tool-call-parser

A class in the API server that turns the model's text into OpenAI tool calls. --tool-call-parser selects it by name.

Registry ToolParserManager (vllm/tool_parsers/abstract_tool_parser.py:235-380).

Read more: Tool and reasoning parsers: from model text to tool_calls and reasoning

tool_choice also: tool choice, tool_choice auto, tool_choice required

The request field that says whether the model must call a tool: none, auto, required, or one named function. vLLM enforces required and named with structured outputs.

Validation at vllm/entrypoints/openai/chat_completion/protocol.py:959-1043; schema for required or named at vllm/tool_parsers/utils.py:449-490.

Read more: Tool and reasoning parsers: from model text to tool_calls and reasoning

torch.compile also: Dynamo, Inductor

The PyTorch compiler. It captures a model as a graph and makes faster code for it. vLLM adds its own backend and passes.

Read more: torch.compile and CUDA graphs in vLLM

torch.library op also: custom operator, torch.ops, registered op

An operator that code registers with PyTorch under a namespace, for example torch.ops.vllm.unified_attention_with_output. torch.compile treats it as one opaque node.

Read more: PyTorch for serving: custom ops and torch.compile

touch also: touch(), BlockPool.touch

BlockPool.touch(): add 1 to the ref_cnt of a prefix-cache hit block. A block with ref_cnt 0 first leaves the free block queue, so it cannot be evicted.

vllm/v1/core/block_pool.py:752-770

Read more: Prefix caching in the engine core: hashes, lookup, caching, eviction and KV events

TPOT also: time per output token

Time per output token. The mean time between output tokens of one request, after the first token.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

TTFT also: time to first token

Time to first token. The time from the arrival of a request to the first output token. Prefill and queue time set it.

Read more: Serving metrics: TTFT, TPOT, ITL, throughput, goodput

U#

uni executor also: UniProcExecutor, uniproc executor

The executor backend "uni" (UniProcExecutor). It makes the one worker as an object in the engine core process and calls its methods directly. By default, vLLM uses it only when TP = PP = DP = 1.

vllm/v1/executor/uniproc_executor.py:51-75; chosen at vllm/config/parallel.py:1055 and vllm/config/parallel.py:1099-1100.

Read more: Executors and workers: from the engine core to the GPUs

UnspecifiedPlatform also: unspecified platform, PlatformEnum.UNSPECIFIED

The fallback platform when no detector finds hardware. It has an empty device_type, so most device calls fail or return nothing.

Defined at vllm/platforms/interface.py:1493-1495; chosen at vllm/platforms/__init__.py:290-292.

Read more: Platform plugins and current_platform

usage context also: UsageContext, OPENAI_API_SERVER, LLM_CLASS

A UsageContext enum value that tells create_engine_config() who starts the engine. vllm serve passes OPENAI_API_SERVER; the token budget defaults depend on it.

Enum at vllm/usage/usage_lib.py:111-117; used for defaults at vllm/engine/arg_utils.py:3159-3168.

Read more: How configuration works

utility call also: utility method, call_utility_async

A remote method call from the front end to the engine core: a UTILITY message with a call id, a method name and arguments. The reply comes back in EngineCoreOutputs.utility_output.

Read more: v1/engine/core_client.py: the engine core clients

V#

V1 engine also: V1, vllm/v1

The only engine of vLLM at this commit: the code in vllm/v1/ (AsyncLLM, the engine core, the scheduler, the workers). The old V0 names are aliases of it.

Read more: What vLLM is today

VllmConfig also: vllm config, engine config

The one object that holds the whole engine configuration: model, cache, parallel, scheduler, compilation and other sub-configs.

Read more: How configuration works

vocab padding also: pad_vocab_size, DEFAULT_VOCAB_PADDING_SIZE

VocabParallelEmbedding rounds the vocabulary size up to a multiple of 64 (padding_size) and splits the padded rows across TP ranks. Padding rows are zero.

vllm/model_executor/layers/vocab_parallel_embedding.py:95-97, vllm/model_executor/layers/vocab_parallel_embedding.py:286-291.

Read more: The tensor-parallel layers (linear.py and vocab_parallel_embedding.py)

W#

W8A8 also: W8A8-FP8, W8A8-INT8, weight and activation quantization

Weights and activations both in 8 bits (FP8 or INT8), so the matrix multiply itself runs in 8 bits. Each tensor has scales that map it back to real values.

Read more: Quantized checkpoints

waiting queue also: waiting, self.waiting, WAITING requests

The queue of requests that are not running yet: new requests and preempted ones. Its order comes from the scheduling policy (FCFS deque or priority heap).

self.waiting and self.kv_holding_waiting (vllm/v1/core/sched/scheduler.py:224-228); the queue classes (vllm/v1/core/sched/request_queue.py:75-207).

Read more: The V1 scheduler: one token budget, no phases

weight loader also: weight_loader, weight_loader_v2, default_weight_loader

A function stored on a parameter (param.weight_loader). It copies one checkpoint tensor into the parameter and keeps only the slice that this TP rank owns.

Parameters without one use default_weight_loader, a shape check and a copy (vllm/model_executor/model_loader/weight_utils.py:1529-1547).

Read more: "Weight loading: from checkpoint files to GPU parameters"

weight-only quantization also: W4A16, W8A16, weight-only

Only the weights are stored in a small format (for example 4-bit integers). The kernel expands them and computes with 16-bit activations. Names: W4A16, W8A16; AWQ and GPTQ are examples.

Read more: Quantized checkpoints

WeightsMapper also: hf_to_vllm_mapper, orig_to_new_stacked, weights mapper

A small rule set that renames checkpoint tensor names to vLLM parameter names (by prefix, suffix, substring, regex), drops some names, and adds shard ids for stacked parameters.

Fields and order of the rules: vllm/model_executor/models/utils.py:48-145.

Read more: "Weight loading: from checkpoint files to GPU parameters"

worker also: worker process, GPU worker

The process or object that owns one GPU. It sets up the device and the process groups, and it holds the model runner.

Read more: Executors and workers: from the engine core to the GPUs

worker extension class also: worker_extension_cls, --worker-extension-cls

A class named by --worker-extension-cls. vLLM adds it as a base class of the worker class, so its methods become callable with collective_rpc.

Injected in WorkerWrapperBase.init_worker (vllm/v1/worker/worker_base.py:304-331).

Read more: Hooks in the engine core and the workers

WorkerProc also: worker process, VllmWorker

The wrapper that runs one worker in its own process (named VllmWorker-0, VllmWorker-1, ...). Its busy loop reads calls from the broadcast message queue and writes the results into its own reply queue.

vllm/v1/executor/multiproc_executor.py:608-710

Read more: Executors and workers: from the engine core to the GPUs

Z#

ZMQ also: ZeroMQ, pyzmq

ZeroMQ, a message library. vLLM uses ZMQ sockets to send requests and outputs between the front end and the engine core processes.

Read more: Processes, ZMQ and shared memory

ZMQ socket type also: ROUTER, DEALER, PUSH, PULL, XPUB

The pattern of a ZMQ socket, for example ROUTER, DEALER, PUSH, PULL or XPUB. The type sets who can send, who can receive and how messages are routed.

Read more: Processes, ZMQ and shared memory