vllm-project/vllm
Data models
Cross-process boundaries demand explicit, versioned dataclasses. This page enumerates the most important ones with the file they live in.
Sampling and pooling
| Class | File | Role |
|---|---|---|
SamplingParams |
vllm/sampling_params.py |
Per-request decoding configuration |
StructuredOutputsParams |
vllm/sampling_params.py |
Grammar / regex / json constraints |
BeamSearchParams |
vllm/sampling_params.py |
Beam search options |
RequestOutputKind |
vllm/sampling_params.py |
Streaming kind (cumulative/delta/final) |
GuidedDecodingParams |
(alias for StructuredOutputsParams) |
Backwards-compatible name |
PoolingParams |
vllm/pooling_params.py |
Pooling-task options |
Inputs
| Class | File | Role |
|---|---|---|
PromptType |
vllm/inputs/data.py |
Union: TokensPrompt / TextPrompt / EmbedsPrompt / multimodal |
TokensPrompt |
vllm/inputs/data.py |
Pre-tokenized prompt |
TextPrompt |
vllm/inputs/data.py |
Plain text prompt |
EmbedsPrompt |
vllm/inputs/data.py |
Direct embedding inputs |
MultiModalDataDict |
vllm/multimodal/inputs.py |
Per-modality data (images, video, audio) |
MultiModalKwargs |
vllm/multimodal/inputs.py |
Processed kwargs returned to layers |
Outputs
| Class | File | Role |
|---|---|---|
RequestOutput |
vllm/outputs.py |
Generation result: outputs, logprobs, finished |
CompletionOutput |
vllm/outputs.py |
One sampled completion's tokens / text |
EmbeddingRequestOutput |
vllm/outputs.py |
Embedding pooling result |
ClassificationRequestOutput |
vllm/outputs.py |
Classification pooling result |
ScoringRequestOutput |
vllm/outputs.py |
Score / rerank result |
PoolingRequestOutput |
vllm/outputs.py |
Generic pooling result |
Logprob, PromptLogprobs |
vllm/logprobs.py |
Log-prob containers |
V1 engine internals
| Class | File | Role |
|---|---|---|
EngineCoreRequest |
vllm/v1/engine/__init__.py |
Cross-process request payload |
EngineCoreOutput |
vllm/v1/engine/__init__.py |
Per-step output to AsyncLLM |
EngineCoreOutputs |
vllm/v1/engine/__init__.py |
Batched outputs |
Request |
vllm/v1/request.py |
Engine-side request state |
RequestStatus, FinishReason |
vllm/v1/request.py |
Lifecycle markers |
KVCacheBlocks, KVCacheBlock |
vllm/v1/core/kv_cache_utils.py |
Cache addressing |
BlockHash, BlockHashWithGroupId |
vllm/v1/core/kv_cache_utils.py |
Prefix cache keys |
KVCacheConfig |
vllm/v1/kv_cache_interface.py |
Per-group KV cache layout |
KVCacheSpec |
vllm/v1/kv_cache_interface.py |
Backend-declared shape |
SchedulerOutput, NewRequestData |
vllm/v1/core/sched/output.py |
Step plan |
ModelRunnerOutput |
vllm/v1/outputs.py |
Worker → scheduler results |
SchedulerStats |
vllm/v1/core/sched/output.py |
Per-step counters |
IterationStats, PrefixCacheStats |
vllm/v1/metrics/stats.py |
Engine-level stats |
SpecDecodeMetadata |
vllm/v1/spec_decode/metadata.py |
Per-step spec-decode info |
SpecDecodingStats |
vllm/v1/spec_decode/metrics.py |
Spec-decode metrics |
SamplingMetadata |
vllm/v1/sample/metadata.py |
Sampler input batch |
Worker-side payloads
| Class | File | Role |
|---|---|---|
ExecuteModelRequest |
vllm/sequence.py (V0) / vllm/v1/... |
Cross-rank request payload |
IntermediateTensors |
vllm/sequence.py |
PP carry-over tensors |
WorkerProc |
vllm/v1/executor/multiproc_executor.py |
Per-rank worker process |
RPCBaseRequest |
vllm/v1/engine/coordinator/zmq_*.py |
ZMQ message base |
LoRA
| Class | File | Role |
|---|---|---|
LoRARequest |
vllm/lora/request.py |
Per-request adapter selection |
LoRAModel |
vllm/lora/lora_model.py |
Adapter tensors |
PunicaWrapper |
vllm/lora/punica_wrapper/__init__.py |
Per-shape kernel dispatch |
Adapters & multimodal
| Class | File | Role |
|---|---|---|
MultiModalRegistry |
vllm/multimodal/registry.py |
Per-modality plugins |
BaseMultiModalProcessor |
vllm/multimodal/processing.py |
HF-processor adapter |
MultiModalCache |
vllm/multimodal/cache.py |
Encoder cache |
Connectors
| Class | File | Role |
|---|---|---|
KVConnectorBase_V1 |
vllm/distributed/kv_transfer/kv_connector/v1/base.py |
KV transport interface |
ECConnectorBase |
vllm/distributed/ec_transfer/ec_connector/base.py |
Encoder-cache transport |
KVConnectorStats |
vllm/distributed/kv_transfer/kv_connector/v1/metrics.py |
Per-connector metrics |
EventPublisher |
vllm/distributed/kv_events.py |
KV event broadcasts |
For the request lifecycle that ties these classes together, see Engine core and Scheduler.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.