Skip to content

vllm.model_executor.offloader.uva

UVA-based CPU offloading using Unified Virtual Addressing.

Classes:

  • UVAOffloader –

    Offloader using Unified Virtual Addressing (UVA) for zero-copy access.

UVAOffloader

Bases: BaseOffloader

Offloader using Unified Virtual Addressing (UVA) for zero-copy access.

This offloader moves parameters to pinned CPU memory and creates CUDA views using UVA. The GPU can then directly access the CPU memory without explicit transfers, at the cost of PCIe bandwidth (slower than GPU memory).

When UVA is disabled via env var, falls back to a functional_call-based approach that moves parameters on-demand.

Parameters:

  • cpu_offload_max_bytes

    (int) –

    Maximum bytes to offload to CPU.

  • cpu_offload_params

    (set[str] | None, default: None ) –

    Set of parameter name segments to selectively offload. If empty, all parameters are eligible up to the byte limit.

Methods:

  • targets –

    Whether cpu_offload_params selects the parameter param_name.

  • wrap_modules –

    Wrap modules with UVA offloading.

_maybe_offload_to_cpu(module, prefix='')

Offload module parameters to CPU using UVA if budget allows.

targets(param_name)

Whether cpu_offload_params selects the parameter param_name.

wrap_modules(modules_generator, prefix='')

Wrap modules with UVA offloading.