Skip to content
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]: request reward model report 500 Internal Server Error #10444

Open
1 task done
hrdxwandg opened this issue Nov 19, 2024 · 7 comments
Open
1 task done

[Bug]: request reward model report 500 Internal Server Error #10444

hrdxwandg opened this issue Nov 19, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@hrdxwandg
Copy link

Your current environment

The output of `python collect_env.py`
Your output of `python collect_env.py` here

Model Input Dumps

No response

🐛 Describe the bug

following the instruction #8700 (comment) , the reward model https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Reward-HF is a LlamaForCausalLM model, so I serve it with vllm add parameter --task embedding.

when I send a request, it encounter en error:
INFO: "POST /v1/embeddings HTTP/1.1" 500 Internal Server Error
ERROR 11-19 17:55:16 engine.py:135] TypeError("object of type 'NoneType' has no len()")
and then the server terminated

the shell script:

curl http://host:port/v1/embeddings \  
        -H "Content-Type: application/json" \
        -d '{
         "model": "Llama-3.1-Nemotron-70B-Reward-HF",
         "input": "Your text string goes here"                                                      
}'

or use python code same as https://github.com/vllm-project/vllm/blob/main/examples/openai_embedding_client.py

has the same error

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.
@hrdxwandg hrdxwandg added the bug Something isn't working label Nov 19, 2024
@DarkLight1337
Copy link
Member

Which version of vLLM are you using? Also please post the full stack trace.

@hrdxwandg
Copy link
Author

Which version of vLLM are you using? Also please post the full stack trace.

vllm==0.6.4.post1

INFO:     172.16.8.237:39200 - "POST /v1/embeddings HTTP/1.1" 500 Internal Server Error
ERROR 11-19 19:08:00 engine.py:135] TypeError("object of type 'NoneType' has no len()")
ERROR 11-19 19:08:00 engine.py:135] Traceback (most recent call last):
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/engine/multiprocessing/engine.py", line 133, in start
ERROR 11-19 19:08:00 engine.py:135]     self.run_engine_loop()
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/engine/multiprocessing/engine.py", line 196, in run_engine_loop
ERROR 11-19 19:08:00 engine.py:135]     request_outputs = self.engine_step()
ERROR 11-19 19:08:00 engine.py:135]                       ^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/engine/multiprocessing/engine.py", line 214, in engine_step
ERROR 11-19 19:08:00 engine.py:135]     raise e
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/engine/multiprocessing/engine.py", line 205, in engine_step
ERROR 11-19 19:08:00 engine.py:135]     return self.engine.step()
ERROR 11-19 19:08:00 engine.py:135]            ^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/engine/llm_engine.py", line 1454, in step
ERROR 11-19 19:08:00 engine.py:135]     outputs = self.model_executor.execute_model(
ERROR 11-19 19:08:00 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/executor/distributed_gpu_executor.py", line 82, in execute_model
ERROR 11-19 19:08:00 engine.py:135]     driver_outputs = self._driver_execute_model(execute_model_req)
ERROR 11-19 19:08:00 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/executor/multiproc_gpu_executor.py", line 158, in _driver_execute_model
ERROR 11-19 19:08:00 engine.py:135]     return self.driver_worker.execute_model(execute_model_req)
ERROR 11-19 19:08:00 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/worker_base.py", line 319, in execute_model
ERROR 11-19 19:08:00 engine.py:135]     inputs = self.prepare_input(execute_model_req)
ERROR 11-19 19:08:00 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/worker_base.py", line 307, in prepare_input
ERROR 11-19 19:08:00 engine.py:135]     return self._get_driver_input_and_broadcast(execute_model_req)
ERROR 11-19 19:08:00 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/worker_base.py", line 269, in _get_driver_input_and_broadcast
ERROR 11-19 19:08:00 engine.py:135]     self.model_runner.prepare_model_input(
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/embedding_model_runner.py", line 158, in prepare_model_input
ERROR 11-19 19:08:00 engine.py:135]     model_input = self._prepare_model_input_tensors(
ERROR 11-19 19:08:00 engine.py:135]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/model_runner.py", line 1206, in _prepare_model_input_tensors
ERROR 11-19 19:08:00 engine.py:135]     return builder.build()  # type: ignore
ERROR 11-19 19:08:00 engine.py:135]            ^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/worker/model_runner.py", line 896, in build
ERROR 11-19 19:08:00 engine.py:135]     attn_metadata = self.attn_metadata_builder.build(
ERROR 11-19 19:08:00 engine.py:135]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/attention/backends/flash_attn.py", line 522, in build
ERROR 11-19 19:08:00 engine.py:135]     block_tables = make_tensor_with_pad(
ERROR 11-19 19:08:00 engine.py:135]                    ^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/utils.py", line 806, in make_tensor_with_pad
ERROR 11-19 19:08:00 engine.py:135]     padded_x = make_ndarray_with_pad(x, pad, np_dtype, max_len=max_len)
ERROR 11-19 19:08:00 engine.py:135]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135]   File "xxx/lib/python3.11/site-packages/vllm/utils.py", line 780, in make_ndarray_with_pad
ERROR 11-19 19:08:00 engine.py:135]     max_len = max(map(len, x), default=0)
ERROR 11-19 19:08:00 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 11-19 19:08:00 engine.py:135] TypeError: object of type 'NoneType' has no len()
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [256667]
Process SpawnProcess-1:
Traceback (most recent call last):
  File "xxx/lib/python3.11/multiprocessing/process.py", line 317, in _bootstrap
    util._exit_function()
  File "xxx/lib/python3.11/multiprocessing/util.py", line 360, in _exit_function
    p.join()
  File "xxx/lib/python3.11/multiprocessing/process.py", line 149, in join
    res = self._popen.wait(timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "xxx/lib/python3.11/multiprocessing/popen_fork.py", line 43, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "xxx/lib/python3.11/multiprocessing/popen_fork.py", line 27, in poll
    pid, sts = os.waitpid(self.pid, flag)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "xxx/lib/python3.11/site-packages/vllm/engine/multiprocessing/engine.py", line 351, in signal_handler
    raise KeyboardInterrupt("MQLLMEngine terminated")
KeyboardInterrupt: MQLLMEngine terminated
INFO 11-19 19:08:00 multiproc_worker_utils.py:133] Terminating local vLLM worker processes
wangdong@ai-t1 ~> xxx/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

@DarkLight1337
Copy link
Member

Can you post the full output of collect_env.py? And does this happen with any other model?

@DarkLight1337
Copy link
Member

Please also show the full command you used to launch the server.

@hrdxwandg
Copy link
Author

Please also show the full command you used to launch the server.

CUDA_VISIBLE_DEVICES="4,5,6,7" python -u -m vllm.entrypoints.openai.api_server --task embedding --host 0.0.0.0 --port 8099 --model xxx/Llama-3.1-Nemotron-70B-Reward-HF --served-model-name Llama-3.1-Nemotron-70B-Reward-HF --tensor-parallel-size 4 --disable-log-requests --enable-prefix-caching

@hrdxwandg
Copy link
Author

Can you post the full output of collect_env.py? And does this happen with any other model?

i do not test other model yet.

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: 14.0.0-1ubuntu1.1
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-58-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.4.131
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA A100-SXM4-80GB
GPU 1: NVIDIA A100-SXM4-80GB
GPU 2: NVIDIA A100-SXM4-80GB
GPU 3: NVIDIA A100-SXM4-80GB
GPU 4: NVIDIA A100-SXM4-80GB
GPU 5: NVIDIA A100-SXM4-80GB
GPU 6: NVIDIA A100-SXM4-80GB
GPU 7: NVIDIA A100-SXM4-80GB

Nvidia driver version: 555.42.02
cuDNN version: Probably one of the following:
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_adv.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_cnn.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_engines_precompiled.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_engines_runtime_compiled.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_graph.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_heuristic.so.9.1.1
/usr/local/cuda-12.1/targets/x86_64-linux/lib/libcudnn_ops.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_adv.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_cnn.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_engines_precompiled.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_engines_runtime_compiled.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_graph.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_heuristic.so.9.1.1
/usr/local/cuda-12.4/targets/x86_64-linux/lib/libcudnn_ops.so.9.1.1
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):                          128
On-line CPU(s) list:             0-127
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8369B CPU @ 2.90GHz
CPU family:                      6
Model:                           106
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
Stepping:                        6
BogoMIPS:                        5799.99
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       3 MiB (64 instances)
L1i cache:                       2 MiB (64 instances)
L2 cache:                        80 MiB (64 instances)
L3 cache:                        96 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-63
NUMA node1 CPU(s):               64-127
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 Host state unknown
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-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-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] onnx==1.16.0
[pip3] pyzmq==25.1.2
[pip3] sentence-transformers==2.2.2
[pip3] torch==2.5.1
[pip3] torch-tb-profiler==0.4.3
[pip3] torchaudio==2.3.0
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.0.dev0
[pip3] triton==3.1.0
[pip3] vllm-nccl-cu12==2.18.1.0.4.0
[conda] blas                      1.0                         mkl    conda-forge
[conda] cuda-cudart               11.8.89                       0    nvidia
[conda] cuda-cupti                11.8.87                       0    nvidia
[conda] cuda-libraries            11.8.0                        0    nvidia
[conda] cuda-nvrtc                11.8.89                       0    nvidia
[conda] cuda-nvtx                 11.8.86                       0    nvidia
[conda] cuda-opencl               12.4.127                      0    nvidia
[conda] cuda-runtime              11.8.0                        0    nvidia
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] libcublas                 11.11.3.6                     0    nvidia
[conda] libcufft                  10.9.0.58                     0    nvidia
[conda] libcufile                 1.9.1.3                       0    nvidia
[conda] libcurand                 10.3.5.147                    0    nvidia
[conda] libcusolver               11.4.1.48                     0    nvidia
[conda] libcusparse               11.7.5.86                     0    nvidia
[conda] libjpeg-turbo             2.0.0                h9bf148f_0    pytorch
[conda] libnpp                    11.8.0.86                     0    nvidia
[conda] libnvfatbin               12.4.127                      0    nvidia
[conda] libnvjitlink              12.4.99                       0    nvidia
[conda] libnvjpeg                 11.9.0.86                     0    nvidia
[conda] mkl                       2023.1.0         h213fc3f_46344  
[conda] mkl-service               2.4.0           py311h5eee18b_1  
[conda] mkl_fft                   1.3.8           py311h5eee18b_0  
[conda] mkl_random                1.2.4           py311hdb19cb5_0  
[conda] numpy                     1.26.4          py311h08b1b3b_0  
[conda] numpy-base                1.26.4          py311hf175353_0  
[conda] nvidia-cublas-cu12        12.4.5.8                 pypi_0    pypi
[conda] nvidia-cuda-cupti-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-nvrtc-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-runtime-cu12  12.4.127                 pypi_0    pypi
[conda] nvidia-cudnn-cu12         9.1.0.70                 pypi_0    pypi
[conda] nvidia-cufft-cu12         11.2.1.3                 pypi_0    pypi
[conda] nvidia-curand-cu12        10.3.5.147               pypi_0    pypi
[conda] nvidia-cusolver-cu12      11.6.1.9                 pypi_0    pypi
[conda] nvidia-cusparse-cu12      12.3.1.170               pypi_0    pypi
[conda] nvidia-ml-py              12.560.30                pypi_0    pypi
[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi
[conda] nvidia-nvjitlink-cu12     12.4.127                 pypi_0    pypi
[conda] nvidia-nvtx-cu12          12.4.127                 pypi_0    pypi
[conda] pytorch-cuda              11.8                 h7e8668a_5    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] pyzmq                     25.1.2          py311h6a678d5_0  
[conda] sentence-transformers     2.2.2                    pypi_0    pypi
[conda] torch                     2.5.1                    pypi_0    pypi
[conda] torch-tb-profiler         0.4.3                    pypi_0    pypi
[conda] torchaudio                2.3.0               py311_cu118    pytorch
[conda] torchvision               0.20.1                   pypi_0    pypi
[conda] transformers              4.47.0.dev0              pypi_0    pypi
[conda] triton                    3.1.0                    pypi_0    pypi
[conda] vllm-nccl-cu12            2.18.1.0.4.0             pypi_0    pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.4.post1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0	GPU1	GPU2	GPU3	GPU4	GPU5	GPU6	GPU7	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	NV12	NV12	NV12	NV12	NV12	NV12	NV12	0-127	0-1		N/A
GPU1	NV12	 X 	NV12	NV12	NV12	NV12	NV12	NV12	0-127	0-1		N/A
GPU2	NV12	NV12	 X 	NV12	NV12	NV12	NV12	NV12	0-127	0-1		N/A
GPU3	NV12	NV12	NV12	 X 	NV12	NV12	NV12	NV12	0-127	0-1		N/A
GPU4	NV12	NV12	NV12	NV12	 X 	NV12	NV12	NV12	0-127	0-1		N/A
GPU5	NV12	NV12	NV12	NV12	NV12	 X 	NV12	NV12	0-127	0-1		N/A
GPU6	NV12	NV12	NV12	NV12	NV12	NV12	 X 	NV12	0-127	0-1		N/A
GPU7	NV12	NV12	NV12	NV12	NV12	NV12	NV12	 X 	0-127	0-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=xx/lib/python3.11/site-packages/cv2/../../lib64:/home/xxx/lib
CUDA_MODULE_LOADING=LAZY

@DarkLight1337
Copy link
Member

Can you try running other models? Unfortunately I can't directly debug this as I don't have enough GPU memory to load 70B models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants