vllm.v1.engine
¶
Modules:
-
admission_control– -
async_llm– -
coordinator– -
core– -
core_client– -
detokenizer– -
exceptions– -
input_processor– -
llm_engine– -
logprobs– -
output_processor– -
parallel_sampling– -
tensor_ipc–Tensor IPC transport via torch.multiprocessing.Queue.
-
utils–
Classes:
-
CheckpointState–Process checkpoint lifecycle of an engine. It serves only while
-
EngineCoreEvent–A timestamped engine core event associated with a request.
-
EngineCoreEventType–The type of engine core request event.
-
EngineCoreReadyResponse–Sent from EngineCore to each frontend at the end of engine startup.
-
EngineCoreRequest– -
EngineCoreRequestType–Request types defined as hex byte strings, so it can be sent over sockets
-
FinishReason–Reason a request finished - stop, length, abort, error, or repetition.
-
ReconfigureRankType–Rank type for reconfiguring distributed request.
CheckpointState
¶
Bases: StrEnum
Process checkpoint lifecycle of an engine. It serves only while RUNNING, and may go through the cycle any number of times.
Attributes:
-
is_restored(bool) –Whether released state is back or coming back, so memory may wake and
Source code in vllm/v1/engine/__init__.py
is_restored
property
¶
Whether released state is back or coming back, so memory may wake and scheduling resume.
EngineCoreEvent
¶
Bases: Struct
A timestamped engine core event associated with a request.
The timestamp is a monotonic timestamp and is used by the engine frontend to calculate intervals between engine core events. These timestamps should not be compared with timestamps from other processes.
Source code in vllm/v1/engine/__init__.py
EngineCoreEventType
¶
EngineCoreReadyResponse
dataclass
¶
Sent from EngineCore to each frontend at the end of engine startup.
Contains post-initialization config that may differ from the original values (e.g. max_model_len after KV cache auto-fitting).
Source code in vllm/v1/engine/__init__.py
EngineCoreRequest
¶
Bases: Struct
Attributes:
-
params(SamplingParams | PoolingParams) –Return the processed params (sampling or pooling).
Source code in vllm/v1/engine/__init__.py
params
property
¶
Return the processed params (sampling or pooling).
EngineCoreRequestType
¶
Bases: Enum
Request types defined as hex byte strings, so it can be sent over sockets without separate encoding step.
Source code in vllm/v1/engine/__init__.py
FinishReason
¶
Bases: IntEnum
Reason a request finished - stop, length, abort, error, or repetition.
Int rather than Str for more compact serialization.
stop - a stop string was emitted length - max_tokens was consumed, or max_model_len was reached abort - aborted by client error - retryable request-level internal error (e.g., KV load failure). Invariant: always converted to 500 Internal Server Error. repetition - repetitive token pattern detected (hallucination)