vllm.v1.outputs
¶
Classes:
-
AsyncModelRunnerOutput– -
LogprobsTensors– -
ModelRunnerOutput– -
SamplingMaskLists–CSR sampling masks; a request slice may contain multiple positions.
Functions:
-
make_empty_encoder_model_runner_output–Create a ModelRunnerOutput stub that contains the correct
AsyncModelRunnerOutput
¶
Bases: ABC
Methods:
-
get_kv_connector_output–Get the underlying kv_connector_output.
-
get_output–Get the ModelRunnerOutput for this async output.
get_kv_connector_output()
abstractmethod
¶
Get the underlying kv_connector_output.
When get_output() fails, this is used to salvage the step's KV output instead of losing it with the failure.
get_output()
abstractmethod
¶
Get the ModelRunnerOutput for this async output.
This is a blocking call that waits until the results are ready, which might involve copying device tensors to the host. This method should only be called once per AsyncModelRunnerOutput.
LogprobsTensors
¶
Bases: NamedTuple
Methods:
ModelRunnerOutput
dataclass
¶
Methods:
-
with_ec_conn_output–Return
outputcarryingec_connector_output. -
with_ec_conn_output_only–Return an otherwise-empty output carrying
ec_connector_output. -
with_kv_conn_output_only–Return ModelRunnerOutput containing the provided KVConnectorOutput,
with_ec_conn_output(output, ec_connector_output)
staticmethod
¶
Return output carrying ec_connector_output.
The shared empty output is copied rather than written to, so callers must use the return value.
with_ec_conn_output_only(ec_connector_output)
staticmethod
¶
Return an otherwise-empty output carrying ec_connector_output.
with_kv_conn_output_only(kv_connector_output)
staticmethod
¶
Return ModelRunnerOutput containing the provided KVConnectorOutput, otherwise empty. Returns None if kv_connector_output is passed as None.
SamplingMaskLists
¶
make_empty_encoder_model_runner_output(scheduler_output)
¶
Create a ModelRunnerOutput stub that contains the correct per-request bookkeeping but no generated data yet.