vllm: [Bug]: vllm 0.8.2 serve Gemma3 error
Your current environment
The output of `python collect_env.py`
Collecting environment information...
PyTorch version: 2.6.0+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.12.8 (main, Dec 4 2024, 08:54:12) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-52-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA RTX A5000
GPU 1: NVIDIA RTX A5000
GPU 2: NVIDIA RTX A5000
GPU 3: NVIDIA RTX A5000
Nvidia driver version: 550.127.05
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 72
On-line CPU(s) list: 0-71
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
CPU family: 6
Model: 63
Thread(s) per core: 2
Core(s) per socket: 18
Socket(s): 2
Stepping: 2
CPU max MHz: 3600.0000
CPU min MHz: 1200.0000
BogoMIPS: 4599.61
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts vnmi md_clear flush_l1d
Virtualization: VT-x
L1d cache: 1.1 MiB (36 instances)
L1i cache: 1.1 MiB (36 instances)
L2 cache: 9 MiB (36 instances)
L3 cache: 90 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-17,36-53
NUMA node1 CPU(s): 18-35,54-71
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
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; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] flashinfer-python==0.2.3+cu124torch2.6
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-cusparselt-cu12==0.6.2
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.1
[pip3] torch==2.6.0
[pip3] torchaudio==2.6.0
[pip3] torchvision==0.21.0
[pip3] transformers==4.50.2
[pip3] triton==3.2.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.8.2
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X SYS SYS SYS 0-17,36-53 0 N/A
GPU1 SYS X PHB PHB 18-35,54-71 1 N/A
GPU2 SYS PHB X PHB 18-35,54-71 1 N/A
GPU3 SYS PHB PHB X 18-35,54-71 1 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
NVIDIA_VISIBLE_DEVICES=GPU-2332d5d5-dd2e-9369-4a0e-9aa54ffe3ea3,GPU-2df67f6e-9d5d-b923-0b27-5777cc5b47b6,GPU-6595c431-197e-7d6a-4497-95edf5fa1b6e,GPU-06543ac6-ec76-ade7-b91e-d41293b3b94c
NVIDIA_REQUIRE_CUDA=cuda>=12.1 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526
NCCL_VERSION=2.17.1-1
NVIDIA_DRIVER_CAPABILITIES=all
NVIDIA_PRODUCT_NAME=CUDA
CUDA_VERSION=12.1.1
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
NCCL_CUMEM_ENABLE=0
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY
🐛 Describe the bug
(VllmWorker rank=0 pid=7482) INFO 03-28 12:57:37 [loader.py:447] Loading weights took 4.77 seconds
(VllmWorker rank=0 pid=7482) INFO 03-28 12:57:37 [gpu_model_runner.py:1186] Model loading took 13.1665 GB and 5.346817 seconds
(VllmWorker rank=1 pid=7560) INFO 03-28 12:57:38 [loader.py:447] Loading weights took 5.62 seconds
(VllmWorker rank=1 pid=7560) INFO 03-28 12:57:38 [gpu_model_runner.py:1186] Model loading took 13.1665 GB and 6.083788 seconds
(VllmWorker rank=2 pid=7645) INFO 03-28 12:57:39 [loader.py:447] Loading weights took 5.55 seconds
(VllmWorker rank=2 pid=7645) INFO 03-28 12:57:39 [gpu_model_runner.py:1186] Model loading took 13.1665 GB and 6.311147 seconds
(VllmWorker rank=3 pid=7737) INFO 03-28 12:57:40 [loader.py:447] Loading weights took 6.46 seconds
(VllmWorker rank=3 pid=7737) INFO 03-28 12:57:40 [gpu_model_runner.py:1186] Model loading took 13.1665 GB and 7.117844 seconds
ERROR 03-28 12:57:52 [core.py:343] EngineCore hit an exception: Traceback (most recent call last):
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/engine/core.py”, line 335, in run_engine_core
ERROR 03-28 12:57:52 [core.py:343] engine_core = EngineCoreProc(*args, **kwargs)
ERROR 03-28 12:57:52 [core.py:343] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/engine/core.py”, line 290, in init
ERROR 03-28 12:57:52 [core.py:343] super().init(vllm_config, executor_class, log_stats)
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/engine/core.py”, line 63, in init
ERROR 03-28 12:57:52 [core.py:343] num_gpu_blocks, num_cpu_blocks = self._initialize_kv_caches(
ERROR 03-28 12:57:52 [core.py:343] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/engine/core.py”, line 127, in _initialize_kv_caches
ERROR 03-28 12:57:52 [core.py:343] get_kv_cache_config(vllm_config, kv_cache_spec_one_worker,
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py”, line 604, in get_kv_cache_config
ERROR 03-28 12:57:52 [core.py:343] check_enough_kv_cache_memory(vllm_config, kv_cache_spec, available_memory)
ERROR 03-28 12:57:52 [core.py:343] File “/venv/main/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py”, line 468, in check_enough_kv_cache_memory
ERROR 03-28 12:57:52 [core.py:343] raise ValueError("No available memory for the cache blocks. "
ERROR 03-28 12:57:52 [core.py:343] ValueError: No available memory for the cache blocks. Try increasing gpu_memory_utilization when initializing the engine.
ERROR 03-28 12:57:52 [core.py:343]
CRITICAL 03-28 12:57:52 [core_client.py:269] Got fatal signal from worker processes, shutting down. See stack trace above for root cause issue.
Killed
(main) root@C.19071914:/workspace$
I cannot deploy Gemma3 model when serve model with
vllm serve google/gemma-3-27b-it \
--trust-remote-code \
--served-model-name gemma3-27b \
--gpu-memory-utilization 0.98 \
--tensor-parallel-size 4 \
--port 8000 \
--max-model-len 2000 \
--limit-mm-per-prompt image=0 \
--enforce-eager
I saw in the documentation that Gemma 27B requires around ~70 GB of VRAM, while my GPU cluster has a total of 96 GB VRAM, but I still can’t deploy the model.
It seems like I need to set --kv-cache-dtype fp8 or a similar parameter to optimize memory usage. Someone can Help me???
Before submitting a new issue…
- Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (13 by maintainers)
Gemma 3 supports multimodal inputs by default so disabling it via
--limit-mm-per-promptshould basically reallocate the memory reserved for multimodal inputs to text. That being said, as long as the model context length (based on--max-model-len) doesn’t change, the overall memory usage should be around the same since vLLM profiles the model by filling up the whole context length.You can try removing
--enforce-eagerto enable CUDA graph andtorch.compilewhich should improve the speedCan you try reducing
--max-num-seqs? The default was raised from 256 in V0 to 1024 in V1