vllm: [Bug]: 0.5.0 AttributeError: '_OpNamespace' '_C' object has no attribute 'rms_norm'

Your current environment

Collecting environment information...
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: Ubuntu 22.04.2 LTS (x86_64)
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Clang version: Could not collect
CMake version: version 3.29.5
Libc version: glibc-2.35

Python version: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0] (64-bit runtime)
Python platform: Linux-5.10.134-13.an8.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 L40S
GPU 1: NVIDIA L40S
GPU 2: NVIDIA L40S
GPU 3: NVIDIA L40S

Nvidia driver version: 535.129.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.3
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.3
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:                   52 bits physical, 57 bits virtual
Byte Order:                      Little Endian
CPU(s):                          128
On-line CPU(s) list:             0-127
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Gold 6430
CPU family:                      6
Model:                           143
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
Stepping:                        8
CPU max MHz:                     3400.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4200.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 tsc_known_freq 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 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm 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 avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       3 MiB (64 instances)
L1i cache:                       2 MiB (64 instances)
L2 cache:                        128 MiB (64 instances)
L3 cache:                        120 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-31,64-95
NUMA node1 CPU(s):               32-63,96-127
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
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] numpy==1.26.4
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] torch==2.3.0
[pip3] transformers==4.41.2
[pip3] triton==2.3.0
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] nvidia-nccl-cu12          2.20.5                   pypi_0    pypi
[conda] torch                     2.3.0                    pypi_0    pypi
[conda] transformers              4.41.2                   pypi_0    pypi
[conda] triton                    2.3.0                    pypi_0    pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.5.0
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-31,64-95	0		N/A
GPU1	SYS	 X 	SYS	SYS	0-31,64-95	0		N/A
GPU2	SYS	SYS	 X 	SYS	32-63,96-127	1		N/A
GPU3	SYS	SYS	SYS	 X 	32-63,96-127	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

🐛 Describe the bug

use vllm/entrypoints/api_server.py args are [ “–trust-remote-code”, “–port”, “8080”, “–tensor-parallel-size”, “1”, “–model”, “/data/llama-7b”, ],

[rank0]: Traceback (most recent call last): [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/runpy.py”, line 196, in _run_module_as_main [rank0]: return _run_code(code, main_globals, None, [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/runpy.py”, line 86, in _run_code [rank0]: exec(code, run_globals) [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/adapter/…/…/debugpy/launcher/…/…/debugpy/main.py”, line 39, in <module> [rank0]: cli.main() [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/adapter/…/…/debugpy/launcher/…/…/debugpy/…/debugpy/server/cli.py”, line 430, in main [rank0]: run() [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/adapter/…/…/debugpy/launcher/…/…/debugpy/…/debugpy/server/cli.py”, line 284, in run_file [rank0]: runpy.run_path(target, run_name=“main”) [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py”, line 321, in run_path [rank0]: return _run_module_code(code, init_globals, run_name, [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py”, line 135, in _run_module_code [rank0]: _run_code(code, mod_globals, init_globals, [rank0]: File “/root/.vscode-server/extensions/ms-python.python-2024.4.1/python_files/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py”, line 124, in _run_code [rank0]: exec(code, run_globals) [rank0]: File “/home/tom/vllm/vllm/entrypoints/api_server.py”, line 107, in <module> [rank0]: engine = AsyncLLMEngine.from_engine_args( [rank0]: File “/home/tom/vllm/vllm/engine/async_llm_engine.py”, line 395, in from_engine_args [rank0]: engine = cls( [rank0]: File “/home/tom/vllm/vllm/engine/async_llm_engine.py”, line 349, in init [rank0]: self.engine = self._init_engine(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/engine/async_llm_engine.py”, line 470, in _init_engine [rank0]: return engine_class(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/engine/llm_engine.py”, line 236, in init [rank0]: self._initialize_kv_caches() [rank0]: File “/home/tom/vllm/vllm/engine/llm_engine.py”, line 313, in _initialize_kv_caches [rank0]: self.model_executor.determine_num_available_blocks()) [rank0]: File “/home/tom/vllm/vllm/executor/gpu_executor.py”, line 75, in determine_num_available_blocks [rank0]: return self.driver_worker.determine_num_available_blocks() [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/utils/_contextlib.py”, line 115, in decorate_context [rank0]: return func(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/worker/worker.py”, line 154, in determine_num_available_blocks [rank0]: self.model_runner.profile_run() [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/utils/_contextlib.py”, line 115, in decorate_context [rank0]: return func(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/worker/model_runner.py”, line 833, in profile_run [rank0]: self.execute_model(seqs, kv_caches) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/utils/_contextlib.py”, line 115, in decorate_context [rank0]: return func(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/worker/model_runner.py”, line 738, in execute_model [rank0]: hidden_states = model_executable( [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1532, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1541, in _call_impl [rank0]: return forward_call(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/model_executor/models/llama.py”, line 371, in forward [rank0]: hidden_states = self.model(input_ids, positions, kv_caches, [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1532, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1541, in _call_impl [rank0]: return forward_call(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/model_executor/models/llama.py”, line 288, in forward [rank0]: hidden_states, residual = layer( [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1532, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1541, in _call_impl [rank0]: return forward_call(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/model_executor/models/llama.py”, line 223, in forward [rank0]: hidden_states = self.input_layernorm(hidden_states) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1532, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1541, in _call_impl [rank0]: return forward_call(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/model_executor/custom_op.py”, line 13, in forward [rank0]: return self._forward_method(*args, **kwargs) [rank0]: File “/home/tom/vllm/vllm/model_executor/layers/layernorm.py”, line 62, in forward_cuda [rank0]: ops.rms_norm( [rank0]: File “/home/tom/vllm/vllm/_custom_ops.py”, line 132, in rms_norm [rank0]: torch.ops._C.rms_norm(out, input, weight, epsilon) [rank0]: File “/home/tom/miniconda3/envs/vllm0.5/lib/python3.10/site-packages/torch/_ops.py”, line 921, in getattr [rank0]: raise AttributeError( [rank0]: AttributeError: ‘_OpNamespace’ ‘_C’ object has no attribute ‘rms_norm’

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 21 (6 by maintainers)

Most upvoted comments

I downgraded from vllm==0.5.2 to vllm==0.5.1, and it worked.

not working version: 0.6.3.post1

Please see my comment in #5448.

i del ori vllm repo, and git clone new vllm repo to pip install -e ., still got erroe: AttributeError: ‘_OpNamespace’ ‘_C’ object has no attribute ‘rms_norm’

Please uninstall vLLM from pip and reinstall it.

from 0.5.1 update to 0.5.2 from pip,reinstall several times and still have this issue (contains create a new environment but still failed to start)

replace or add the three files in vllm directory : _C.abi3.so、 _moe_C.abi3.so 、_punica_C.abi3.so。 it work for me

where did you get those correct files to replace in vllm folder? Or would you please share those files with me? I am getting the same issue. Thanks!

replace or add the three files in vllm directory : _C.abi3.so、 _moe_C.abi3.so 、_punica_C.abi3.so。 it work for me

I wanna mention that building from github repo doesn’t work for me, the not working version is 0.5.4+cu

I downgraded from vllm==0.5.2 to vllm==0.5.1, and it worked.我从 vllm==0.5.2 降级到 vllm==0.5.1 ,它起作用了。

thx

Please see my comment in #5448.

i del ori vllm repo, and git clone new vllm repo to pip install -e ., still got erroe: AttributeError: ‘_OpNamespace’ ‘_C’ object has no attribute ‘rms_norm’

Please uninstall vLLM from pip and reinstall it.