Skip to content

vllm.v1.engine

Modules:

Classes:

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

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.

EngineCoreEventType

Bases: IntEnum

The type of engine core request event.

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).

EngineCoreRequest

Bases: Struct

Attributes:

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.

EngineHealthState

Bases: StrEnum

EngineCore answer to a check_health_generate utility call.

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)

PrefixHashConfig dataclass

What a frontend needs to compute a request's prompt block hashes itself (see EngineCoreRequest.block_hashes).

ReconfigureRankType

Bases: IntEnum

Rank type for reconfiguring distributed request.