Skip to content

vllm.v1.worker.mm_encoder_model_runner

Model runner for instances that only run the multi-modal encoder.

An encoder-only instance -- --mm-encoder-only, or the producer side of encoder-cache disaggregation -- encodes the multi-modal items and publishes the embeddings. It runs no language model: no KV cache, sampler, or decoder graphs.

Classes:

MMEncoderModelRunner

Bases: GPUModelRunner

Encoder-only variant of the V2 GPU model runner.

Methods:

input_tensor_semaphore()

Guard the host writes into the pooled input buffers.

UvaBufferPool recycles a slot every max_concurrent_batches steps and the device reads the pooled host buffers in place. A sampling step is ordered by the device wait in AsyncOutput.get_output(); this one never waits, so entering blocks until the step that last wrote these slots is done with them and leaving records this step's last write.