vllm-project / vllm-project/vllm
[Bug]: --cpu-offload-gb is accepted, reported in non-default args, and then NoopOffloader is selected: weights are never offloaded
- Dominant language
- Python
- Stars
- 91.8k
- Forks
- 22.2k
- PR merge metrics
- PR metrics pending
Description
### Your current environment
==============================
System Info
==============================
OS : Ubuntu 26.04 LTS (x86_64)
GCC version : (Ubuntu 15.2.0-16ubuntu1) 15.2.0
Clang version : Could not collect
CMake version : Could not collect
Libc version : glibc-2.43
==============================
PyTorch Info
==============================
PyTorch version : 2.13.0+cu130
Is debug build : False
CUDA used to build PyTorch : 13.0
ROCM used to build PyTorch : N/A
XPU used to build PyTorch : N/A
==============================
Python Environment
==============================
Python version : 3.14.4 (main, Jun 18 2026, 14:25:02) [GCC 15.2.0] (64-bit runtime)
Python platform : Linux-7.0.0-29-generic-x86_64-with-glibc2.43
==============================
CUDA / GPU Info
==============================
Is CUDA available : True
CUDA runtime version : 13.1.115
CUDA_MODULE_LOADING set to :
GPU models and configuration : GPU 0: NVIDIA GeForce RTX 5070 Ti
Nvidia driver version : 595.84
cuDNN version : Could not collect
HIP runtime version : N/A
MIOpen runtime version : N/A
Is XNNPACK available : False
==============================
CPU Info
==============================
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 12
On-line CPU(s) list: 0-11
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 5 9600X 6-Core Processor
CPU family: 26
Model: 68
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 85%
CPU max MHz: 5486.4409
CPU min MHz: 627.9670
BogoMIPS: 7799.98
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpuid_fault cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx_vnni avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect movdiri movdir64b overflow_recov succor smca fsrm avx512_vp2intersect flush_l1d amd_lbr_pmc_freeze
Virtualization: AMD-V
L1d cache: 288 KiB (6 instances)
L1i cache: 192 KiB (6 instances)
L2 cache: 6 MiB (6 instances)
L3 cache: 32 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-11
Vulnerability Gather data sampling: Not affected
Vulnerability Ghostwrite: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Old microcode: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Mitigation; IBPB on VMEXIT only
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB on VMEXIT
==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.16.post3
[pip3] nccl4py==0.4.1
[pip3] numpy==2.4.6
[pip3] nvidia-cublas==13.1.1.3
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cccl==13.3.3.4.1
[pip3] nvidia-cuda-crt==13.3.73
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvcc==13.3.73
[pip3] nvidia-cuda-nvdisasm==13.3.73
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.19.0.56
[pip3] nvidia-cudnn-cu13==9.20.0.48
[pip3] nvidia-cudnn-frontend==1.27.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cusparselt-cu13==0.8.1
[pip3] nvidia-cutlass-dsl==4.6.0
[pip3] nvidia-cutlass-dsl-libs-base==4.6.0
[pip3] nvidia-cutlass-dsl-libs-core==4.6.0
[pip3] nvidia-cutlass-dsl-libs-cu12==4.6.0
[pip3] nvidia-cutlass-dsl-libs-cu13==4.6.0
[pip3] nvidia-ml-py==13.610.43
[pip3] nvidia-nccl-cu12==2.28.9
[pip3] nvidia-nccl-cu13==2.29.7
[pip3] nvidia-nvjitlink==13.3.33
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] nvidia-nvvm==13.3.73
[pip3] pyzmq==27.1.0
[pip3] tokenspeed-triton==3.8.10.post20260721
[pip3] torch==2.13.0
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.11.0
[pip3] torchcodec==0.16.0
[pip3] torchvision==0.28.0
[pip3] transformers==5.15.0
[pip3] triton==3.7.1
[conda] Could not collect
==============================
vLLM Info
==============================
ROCM Version : Could not collect
vLLM Version : 0.27.1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; XPU: Disabled
GPU Topology:
GPU0 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X 0-11 0 N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
==============================
Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_raj-rarihar
### 🐛 Describe the bug
Environment
vLLM 0.28.0
Python 3.14
torch CUDA 13.2, driver 595.84
GPU 1 x RTX 5070 Ti, 16303 MiB (15.47 GiB visible to torch)
Model Qwen/QwQ-32B-AWQ, 19.33 GB of weights
Entry vllm.entrypoints.openai.api_server (AsyncLLM path)
What happens
vllm serve --max-model-len 2048 --enforce-eager \
--gpu-memory-utilization 0.9 --max-num-seqs 44 --cpu-offload-gb 15.1
The server reports the flag back:
INFO [api_utils.py:273] non-default args: {..., 'cpu_offload_gb': 15.1, ...}
and then dies loading weights:
ERROR + get_offloader().wrap_modules(
ERROR File ".../vllm/model_executor/offloader/base.py", line 104, in wrap_modules
ERROR File ".../vllm/model_executor/layers/linear.py", line 504, in __init__
ERROR self.quant_method.create_weights(
ERROR File ".../vllm/model_executor/layers/quantization/auto_awq.py", line 479, in create_weights
ERROR data=torch.empty(...)
ERROR torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 136.00 MiB.
GPU 0 has a total capacity of 15.47 GiB of which 24.44 MiB is free.
Of the allocated memory 15.06 GiB is allocated by PyTorch
base.py:104 is return list(modules_generator) inside NoopOffloader.wrap_modules. Nothing was offloaded, so the whole checkpoint was built onto the card.
NoopOffloader is announced at DEBUG (set_offloader), so on a default log there is no sign of any of this. The only place its name appears is a traceback.
Why it is not the obvious things
Each of these was checked separately, in this order.
The flag reaches the config.
from vllm.engine.arg_utils import EngineArgs
c = EngineArgs(model=..., cpu_offload_gb=15.1).create_engine_config()
print(c.offload_config)
# OffloadConfig(offload_backend='auto',
# uva=UVAOffloadConfig(cpu_offload_gb=15.1, cpu_offload_params=set()),
# prefetch=PrefetchOffloadConfig(offload_group_size=0, ...))
The selector works.
from vllm.config.offload import OffloadConfig, UVAOffloadConfig
from vllm.model_executor.offloader.base import create_offloader
create_offloader(OffloadConfig(uva=UVAOffloadConfig(cpu_offload_gb=15.1)))
# -> UVAOffloader
create_offloader(OffloadConfig(uva=UVAOffloadConfig(cpu_offload_gb=0)))
# -> NoopOffloader
The global is one global.
import vllm.model_executor.offloader.base as b
from vllm.model_executor.offloader import get_offloader
b.set_offloader(b.create_offloader(OffloadConfig(uva=UVAOffloadConfig(cpu_offload_gb=15.1))))
get_offloader() # -> UVAOffloader
b.get_offloader() # -> UVAOffloader
The ordering is right. set_offloader(create_offloader(...)) is inside __init__ on both v1/worker/gpu_model_runner.py and v1/worker/gpu/model_runner.py, which runs before load_model.
It is not the backend selection. --offload-backend uva fails identically. So does the prefetch backend (--offload-group-size 8 --offload-num-in-group 7), which is a different code path and reaches create_offloader the same way.
It is not another process on the card. nvidia-smi shows 46 MiB in use, gnome-shell and snapd.
Five launches across those configurations produced OOM messages identical to the byte: 15.06 GiB allocated, 136.00 MiB requested, 24.44 MiB free. Identical output across different offload sizes and different max_num_seqs is the signature of a value that is not being read.
What that leaves
The config is correct in the API server process and create_offloader receives a zero budget in the worker. AsyncLLM spawns EngineCore unconditionally (VLLM_ENABLE_V1_MULTIPROCESSING governs only the offline LLMEngine path), and vllm_config crosses that boundary as a pickled kwarg to context.Process in v1/engine/utils.py. That is the one link not directly instrumented above, and it is where we would look first.
Suggested fixes, independent of the cause
set_offloader should log at INFO when it selects NoopOffloader while cpu_offload_gb > 0 was requested. The silence is most of why this took a night to find.
create_offloader could warn when it is handed a zero budget by a config whose offload_backend is not auto, since that combination can only come from a value having been lost.
Reproducer
Any model larger than the card, with --cpu-offload-gb set to more than the difference. The failure is at weight loading, not at warm-up.
[vllm_offload_bug.md.pdf](https://github.com/user-attachments/files/32062768/vllm_offload_bug.md.pdf)
### Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.
Contributor guide
Assessment
This issue has not been assessed yet.