Open
Description
Your current environment
The output of `python collect_env.py`
2025-01-17 06:31:45.229125: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-01-17 06:31:45.244775: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1737095505.263778 524365 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1737095505.269663 524365 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-17 06:31:45.289033: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35
Python version: 3.11.9 (main, Aug 30 2024, 10:28:30) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-4.18.0-553.5.1.el8.x86_64-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 4090
GPU 1: NVIDIA GeForce RTX 4090
Nvidia driver version: 550.107.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.3.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.3.0
/usr/local/lib/python3.10/dist-packages/nvidia/cudnn/lib/libcudnn.so.8
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): 112
On-line CPU(s) list: 0-111
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8273CL CPU @ 2.20GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 28
Socket(s): 2
Stepping: 7
CPU max MHz: 3700.0000
CPU min MHz: 1000.0000
BogoMIPS: 4400.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 cdp_l3 invpcid_single 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 mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 1.8 MiB (56 instances)
L1i cache: 1.8 MiB (56 instances)
L2 cache: 56 MiB (56 instances)
L3 cache: 77 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-27,56-83
NUMA node1 CPU(s): 28-55,84-111
Vulnerability Gather data sampling: Vulnerable: No microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
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: Mitigation; Enhanced IBRS
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; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; TSX disabled
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvcc-cu12==12.3.107
[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-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] onnxruntime==1.19.0
[pip3] optree==0.13.1
[pip3] pynvml==12.0.0
[pip3] pyzmq==26.2.0
[pip3] qtorch==0.3.0
[pip3] sentence-transformers==3.3.0
[pip3] torch==2.5.1
[pip3] torchaudio==2.1.2
[pip3] torchvision==0.20.1
[pip3] transformers==4.48.0
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.4
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X SYS 0-27,56-83 0 N/A
GPU1 SYS X 28-55,84-111 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
LD_LIBRARY_PATH=/home/1473391854/.local/lib/python3.11/site-packages/cv2/../../lib64:/usr/local/python3.9.19/lib:/usr/local/openssl/lib:/usr/local/python3.11.9/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
CUDA_MODULE_LOADING=LAZY
Model Input Dumps
No response
🐛 Describe the bug
When my vllm version was 0.4.0.post1, it only took me 35 seconds to load Qwen2.5-7B-Instruct through the following code, but when I upgraded the vllm version to 0.6.4, this loading time increased sharply to 1 minute and 34 seconds. What is the situation here?
More importantly, after the problem is solved, I also wonder if there is any way to accelerate the speed of model loading on the local, regardless of whether the vllm version is 0.4.0.post1 or 0.6.4. At present, the model loading time is normally between 30 and 60 seconds, but this is still much longer compared to the model loading using AutoModelForCausalLM.from_pretrained()
The specific code for loading the model:
@ray.remote
class VLLM_Qwen_Chat_Ray:
def __init__(self):
try:
self.model_name_or_path = "/data/model/Qwen2.5-7B-Instruct"
self.sampling_params = vllm.SamplingParams(
temperature=0.01,
top_p=0.8,
repetition_penalty=1.05,
max_tokens=1024
)
self.llm = vllm.LLM(
model=self.model_name_or_path,
tensor_parallel_size=2,
gpu_memory_utilization=0.98
)
self.ready = True
except Exception as e:
self.ready = False
logger.error(f"An error occurred when initializing VLLM_Qwen_Chat_Ray: {e}")
def is_ready(self) -> bool:
"""
Confirm whether the Actor has completed initialization
"""
# If the ready attribute of the Actor exists and is True, return True
return getattr(self, 'ready', False)
logger.info("Loading the model from local...")
timeout = 200 # 200-second timeout
start_time = time.time()
vllm_model = VLLM_Qwen_Chat_Ray.remote()
while not ray.get(vllm_model.is_ready.remote()):
if time.time() - start_time > timeout:
logger.error("Model loading timed out")
raise TimeoutError("Model loading timed out")
time.sleep(0.1)
logger.info("Completed loading the local model")
The content output during the loading process:
2025-01-17 08:06:48.735090: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-01-17 08:06:48.750279: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1737101208.768695 609349 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1737101208.775499 609349 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-17 08:06:48.798013: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
INFO:llm_poc.vllm_model.vllm_qwen_chat_ray:Loading the model from local...
2025-01-17 08:06:57,453 INFO worker.py:1810 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265/
(pid=609877) 2025-01-17 08:07:05.125709: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
(pid=609877) 2025-01-17 08:07:05.141449: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
(pid=609877) WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
(pid=609877) E0000 00:00:1737101225.159832 609877 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
(pid=609877) E0000 00:00:1737101225.165678 609877 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
(pid=609877) 2025-01-17 08:07:05.185276: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
(pid=609877) To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:18 config.py:350] This model supports multiple tasks: {'embedding', 'generate'}. Defaulting to 'generate'.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:18 config.py:1020] Defaulting to use ray for distributed inference
(VLLM_Qwen_Chat_Ray pid=609877) Calling ray.init() again after it has already been called.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:21 llm_engine.py:249] Initializing an LLM engine (v0.6.4) with config: model='/data/model/Qwen2.5-7B-Instruct', speculative_config=None, tokenizer='/data/model/Qwen2.5-7B-Instruct', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, override_neuron_config=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=32768, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=2, pipeline_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), observability_config=ObservabilityConfig(otlp_traces_endpoint=None, collect_model_forward_time=False, collect_model_execute_time=False), seed=0, served_model_name=/data/model/Qwen2.5-7B-Instruct, num_scheduler_steps=1, chunked_prefill_enabled=False multi_step_stream_outputs=True, enable_prefix_caching=False, use_async_output_proc=True, use_cached_outputs=False, chat_template_text_format=string, mm_processor_kwargs=None, pooler_config=None)
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:22 ray_gpu_executor.py:134] use_ray_spmd_worker: False
(pid=609879) 2025-01-17 08:07:27.391161: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
(pid=609879) 2025-01-17 08:07:27.407232: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
(pid=609879) WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
(pid=609879) E0000 00:00:1737101247.425768 609879 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
(pid=609879) E0000 00:00:1737101247.431956 609879 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
(pid=609879) 2025-01-17 08:07:27.451432: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
(pid=609879) To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
(pid=609874) 2025-01-17 08:07:35.465091: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
(pid=609874) 2025-01-17 08:07:35.480816: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
(pid=609874) WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
(pid=609874) E0000 00:00:1737101255.499352 609874 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
(pid=609874) E0000 00:00:1737101255.505145 609874 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
(pid=609874) 2025-01-17 08:07:35.524575: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
(pid=609874) To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:38 selector.py:135] Using Flash Attention backend.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:39 utils.py:960] Found nccl from library libnccl.so.2
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:39 pynccl.py:69] vLLM is using nccl==2.21.5
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:39 custom_all_reduce_utils.py:242] reading GPU P2P access cache from /home/1473391854/.cache/vllm/gpu_p2p_access_cache_for_0,1.json
(VLLM_Qwen_Chat_Ray pid=609877) WARNING 01-17 08:07:39 custom_all_reduce.py:143] Custom allreduce is disabled because your platform lacks GPU P2P capability or P2P test failed. To silence this warning, specify disable_custom_all_reduce=True explicitly.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:39 shm_broadcast.py:236] vLLM message queue communication handle: Handle(connect_ip='127.0.0.1', local_reader_ranks=[1], buffer=<vllm.distributed.device_communicators.shm_broadcast.ShmRingBuffer object at 0x7fccb1cf8e50>, local_subscribe_port=52969, remote_subscribe_port=None)
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:39 model_runner.py:1072] Starting to load model /data/model/Qwen2.5-7B-Instruct...
Loading safetensors checkpoint shards: 0% Completed | 0/4 [00:00<?, ?it/s]
Loading safetensors checkpoint shards: 25% Completed | 1/4 [00:00<00:02, 1.38it/s]
Loading safetensors checkpoint shards: 50% Completed | 2/4 [00:01<00:01, 1.26it/s]
Loading safetensors checkpoint shards: 75% Completed | 3/4 [00:02<00:00, 1.15it/s]
Loading safetensors checkpoint shards: 100% Completed | 4/4 [00:03<00:00, 1.12it/s]
Loading safetensors checkpoint shards: 100% Completed | 4/4 [00:03<00:00, 1.16it/s]
(VLLM_Qwen_Chat_Ray pid=609877)
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:43 model_runner.py:1077] Loading model weights took 7.1216 GB
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:38 selector.py:135] Using Flash Attention backend.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:47 worker.py:232] Memory profiling results: total_gpu_memory=23.64GiB initial_memory_usage=7.82GiB peak_torch_memory=9.74GiB memory_usage_post_profile=7.89Gib non_torch_memory=0.76GiB kv_cache_size=12.67GiB gpu_memory_utilization=0.98
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:39 utils.py:960] Found nccl from library libnccl.so.2
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:39 pynccl.py:69] vLLM is using nccl==2.21.5
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:39 custom_all_reduce_utils.py:242] reading GPU P2P access cache from /home/1473391854/.cache/vllm/gpu_p2p_access_cache_for_0,1.json
(RayWorkerWrapper pid=609874) WARNING 01-17 08:07:39 custom_all_reduce.py:143] Custom allreduce is disabled because your platform lacks GPU P2P capability or P2P test failed. To silence this warning, specify disable_custom_all_reduce=True explicitly.
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:39 model_runner.py:1072] Starting to load model /data/model/Qwen2.5-7B-Instruct...
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:48 distributed_gpu_executor.py:57] # GPU blocks: 29659, # CPU blocks: 9362
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:48 distributed_gpu_executor.py:61] Maximum concurrency for 32768 tokens per request: 14.48x
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:51 model_runner.py:1400] Capturing cudagraphs for decoding. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:51 model_runner.py:1404] If out-of-memory error occurs during cudagraph capture, consider decreasing `gpu_memory_utilization` or switching to eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:43 model_runner.py:1077] Loading model weights took 7.1216 GB
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:08:15 model_runner.py:1518] Graph capturing finished in 23 secs, took 0.42 GiB
(RayWorkerWrapper pid=609874) INFO 01-17 08:07:47 worker.py:232] Memory profiling results: total_gpu_memory=23.64GiB initial_memory_usage=7.80GiB peak_torch_memory=9.74GiB memory_usage_post_profile=7.87Gib non_torch_memory=0.74GiB kv_cache_size=12.69GiB gpu_memory_utilization=0.98
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:51 model_runner.py:1400] Capturing cudagraphs for decoding. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
(VLLM_Qwen_Chat_Ray pid=609877) INFO 01-17 08:07:51 model_runner.py:1404] If out-of-memory error occurs during cudagraph capture, consider decreasing `gpu_memory_utilization` or switching to eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.
INFO:llm_poc.vllm_model.vllm_qwen_chat_ray:Completed loading the local model
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.