-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: MOE模型,2卡推理,报错AssertionError("Invalid device id") #5527
Comments
can you try #5473 ? it should fix your error i think. |
I pulled the latest vllm code and tried to install it if I use Looking in indexes: https://mirrors.aliyun.com/pypi/simple if I use Looking in indexes: https://mirrors.aliyun.com/pypi/simple |
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! |
Your current environment
PyTorch version: 2.1.2+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.2 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.29.5
Libc version: glibc-2.35
Python version: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-3.10.0-1160.el7.x86_64-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 A800-SXM4-80GB
GPU 1: NVIDIA A800-SXM4-80GB
GPU 2: NVIDIA A800-SXM4-80GB
GPU 3: NVIDIA A800-SXM4-80GB
Nvidia driver version: 470.199.02
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:
架构: x86_64
CPU 运行模式: 32-bit, 64-bit
Address sizes: 46 bits physical, 57 bits virtual
字节序: Little Endian
CPU: 128
在线 CPU 列表: 0-127
厂商 ID: GenuineIntel
型号名称: Intel(R) Xeon(R) Platinum 8369B CPU @ 2.90GHz
CPU 系列: 6
型号: 106
每个核的线程数: 2
每个座的核数: 32
座: 2
步进: 6
CPU 最大 MHz: 3500.0000
CPU 最小 MHz: 800.0000
BogoMIPS: 5800.00
标记: 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 aperfmperf eagerfpu 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 epb cat_l3 invpcid_single intel_pt ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 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 avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq md_clear pconfig spec_ctrl intel_stibp flush_l1d arch_capabilities
虚拟化: VT-x
L1d 缓存: 3 MiB (64 instances)
L1i 缓存: 2 MiB (64 instances)
L2 缓存: 80 MiB (64 instances)
L3 缓存: 96 MiB (2 instances)
NUMA 节点: 2
NUMA 节点0 CPU: 0-31,64-95
NUMA 节点1 CPU: 32-63,96-127
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; Load fences, usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
🐛 Describe the bug
在对Qwen2-57B-A14B-Instruct进行两卡推理的时候,运行如下指令:
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'
model_dir = '/publicdata/huggingface.co/Qwen/Qwen2-57B-A14B-Instruct'
model_type = ModelType.qwen2_57b_a14b_instruct
template_type = get_default_template_type(model_type)
llm_engine = get_vllm_engine(model_type, model_id_or_path=model_dir, tensor_parallel_size=2)
tokenizer = llm_engine.hf_tokenizer
template = get_template(template_type, tokenizer)
报错如下:
(RayWorkerVllm pid=2689517) INFO 06-14 11:52:26 selector.py:16] Using FlashAttention backend.
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] Error executing method init_device. This might cause deadlock in distributed execution.
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] Traceback (most recent call last):
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] File "/opt/conda/lib/python3.10/site-packages/vllm/engine/ray_utils.py", line 37, in execute_method
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] return executor(*args, **kwargs)
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] File "/opt/conda/lib/python3.10/site-packages/vllm/worker/worker.py", line 93, in init_device
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] _check_if_gpu_supports_dtype(self.model_config.dtype)
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] File "/opt/conda/lib/python3.10/site-packages/vllm/worker/worker.py", line 309, in _check_if_gpu_supports_dtype
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] compute_capability = torch.cuda.get_device_capability()
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] File "/opt/conda/lib/python3.10/site-packages/torch/cuda/init.py", line 435, in get_device_capability
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] prop = get_device_properties(device)
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] File "/opt/conda/lib/python3.10/site-packages/torch/cuda/init.py", line 452, in get_device_properties
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] raise AssertionError("Invalid device id")
(RayWorkerVllm pid=2689517) ERROR 06-14 11:52:26 ray_utils.py:44] AssertionError: Invalid device id
The text was updated successfully, but these errors were encountered: