Skip to content

vllm.v1.worker.cpu.standalone_model_runner

Classes:

StandaloneCPUModelRunner

Bases: LoRAModelRunnerMixin

Standalone MRV2 implementation for CPUs without mature Triton support.

It follows the GPU MRV2 architecture with a smaller feature set. Batch preparation, request bookkeeping, KV-cache metadata, and sampling use C++ and PyTorch operations instead of Triton.

Methods:

gather_batch_req_state(scheduler_output, dummy_run)

Gather CPU request state for the scheduled batch, in batch order. Returns (batch_state, uniform_decode_token_count)

on_target_weights_replaced()

Called by the worker after a weight transfer; nothing derives from them.

reload_weights(weights_iterator=None, weights_path=None, is_checkpoint_format=True)

Reload weights in place.

shutdown()

Release CPU tensors (model weights, KV caches, workspace) so that memory is reclaimable when running in the same process.