vllm-project / vllm

A high-throughput and memory-efficient inference and serving engine for LLMs
https://docs.vllm.ai
Apache License 2.0
29.89k stars 4.51k forks source link

[Bug]: Problem loading Gemma 2 27b-it #6387

Open rdaiello opened 4 months ago

rdaiello commented 4 months ago

Your current environment

PyTorch version: 2.3.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Red Hat Enterprise Linux 9.1 (Plow) (x86_64)
GCC version: (GCC) 11.3.0
Clang version: Could not collect
CMake version: version 3.30.0
Libc version: glibc-2.34

Python version: 3.10.4 (main, Apr 29 2023, 13:32:24) [GCC 11.3.0] (64-bit runtime)
Python platform: Linux-5.14.0-162.6.1.el9_1.x86_64-x86_64-with-glibc2.34
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-40GB
GPU 1: NVIDIA A100-SXM4-40GB

Nvidia driver version: 525.85.12
cuDNN version: Could not collect
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, 57 bits virtual
Byte Order:                      Little Endian
CPU(s):                          48
On-line CPU(s) list:             0-47
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Gold 5317 CPU @ 3.00GHz
CPU family:                      6
Model:                           106
Thread(s) per core:              2
Core(s) per socket:              12
Socket(s):                       2
Stepping:                        6
CPU max MHz:                     3600.0000
CPU min MHz:                     800.0000
BogoMIPS:                        6000.00
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 art 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 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       1.1 MiB (24 instances)
L1i cache:                       768 KiB (24 instances)
L2 cache:                        30 MiB (24 instances)
L3 cache:                        36 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-11,24-35
NUMA node1 CPU(s):               12-23,36-47
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
Vulnerability Retbleed:          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; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] flashinfer==0.0.8+cu121torch2.3
[pip3] numpy==1.26.4
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] torch==2.3.0
[pip3] torchvision==0.18.0
[pip3] transformers==4.42.3
[pip3] triton==2.3.0
[conda] No relevant packages
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.5.1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    NIC0    CPU Affinity    NUMA Affinity
GPU0     X      NV4     SYS     0       0-1
GPU1    NV4      X      SYS     0       0-1
NIC0    SYS     SYS      X

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

NIC Legend:

  NIC0: mlx5_0

🐛 Describe the bug

Seems similar to #6192 but confirmed that the proper version of flash infer is installed.

Command export VLLM_ATTENTION_BACKEND=FLASHINFER python -m vllm.entrypoints.openai.api_server \ --model google/gemma-2-27b-it \ --tensor-parallel-size 2

Model fails to load with this error:

(VllmWorkerProcess pid=4091308) ERROR 07-12 15:20:49 multiproc_worker_utils.py:226] rank0: Traceback (most recent call last): rank0: File "/cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/lib/python3.10/runpy.py", line 196, in _run_module_as_main rank0: return _run_code(code, main_globals, None, rank0: File "/cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/lib/python3.10/runpy.py", line 86, in _run_code rank0: exec(code, run_globals) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/entrypoints/openai/api_server.py", line 216, in rank0: engine = AsyncLLMEngine.from_engine_args( rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 431, in from_engine_args rank0: engine = cls( rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 360, in init rank0: self.engine = self._init_engine(*args, *kwargs) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 507, in _init_engine rank0: return engine_class(args, **kwargs) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 256, in init

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 366, in _initialize_kv_caches rank0: self.model_executor.initialize_cache(num_gpu_blocks, num_cpu_blocks) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/executor/distributed_gpu_executor.py", line 62, in initialize_cache

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/executor/multiproc_gpu_executor.py", line 130, in _run_workers rank0: driver_worker_output = driver_worker_method(*args, **kwargs) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/worker/worker.py", line 214, in initialize_cache

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/worker/worker.py", line 230, in _warm_up_model

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context rank0: return func(*args, **kwargs) rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1109, in capture_model

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1339, in capture rank0: with torch.cuda.graph(self._graph, pool=memory_pool, stream=stream): rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/torch/cuda/graphs.py", line 184, in exit

rank0: File "/home/daielloiir/deepspeed/.gemma/lib/python3.10/site-packages/torch/cuda/graphs.py", line 82, in capture_end

rank0: RuntimeError: CUDA error: out of memory rank0: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. rank0: For debugging consider passing CUDA_LAUNCH_BLOCKING=1. rank0: Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

ERROR 07-12 15:20:50 multiproc_worker_utils.py:120] Worker VllmWorkerProcess pid 4091308 died, exit code: -15 INFO 07-12 15:20:50 multiproc_worker_utils.py:123] Killing local vLLM worker processes rank0:[W CudaIPCTypes.cpp:16] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors] /cm/shared/easybuild/software/Python/3.10.4-GCCcore-11.3.0/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

Yoosu-L commented 3 months ago

same +1

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!