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]: V1 Regression: ValueError: could not broadcast input array from shape (y,) into shape (x,) #12567

Closed
1 task done
sethkimmel3 opened this issue Jan 30, 2025 · 3 comments · Fixed by #12600
Closed
1 task done
Labels
bug Something isn't working

Comments

@sethkimmel3
Copy link
Contributor

Your current environment

The output of `python collect_env.py`

(This is just a cpu dump of the vllm version I'm on. I'm encountering the error on a 1xH100).

No module named 'vllm._version'
  from vllm.version import __version__ as VLLM_VERSION
INFO 01-30 01:38:59 __init__.py:187] No platform detected, vLLM is running on UnspecifiedPlatform
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: Debian GNU/Linux 11 (bullseye) (x86_64)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.10.8 (main, Dec  6 2022, 14:24:03) [GCC 10.2.1 20210110] (64-bit runtime)
Python platform: Linux-4.4.0-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
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
Byte Order:          Little Endian
Address sizes:       46 bits physical, 48 bits virtual
CPU(s):              5
On-line CPU(s) list: 0-4
Thread(s) per core:  1
Core(s) per socket:  5
Socket(s):           1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               106
Model name:          unknown
Stepping:            unknown
CPU MHz:             3300.000
BogoMIPS:            3300.00
Virtualization:      VT-x
Hypervisor vendor:   KVM
Virtualization type: full
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 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 fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves 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

Versions of relevant libraries:
[pip3] numpy==1.25.0
[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.570.86
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.0
[pip3] torch==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.48.1
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A (dev)
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
Could not collect

OMP_NUM_THREADS=1
MKL_NUM_THREADS=1
LD_LIBRARY_PATH=/usr/local/lib/python3.10/site-packages/cv2/../../lib64:
NCCL_CUMEM_ENABLE=0
TORCHINDUCTOR_COMPILE_THREADS=1

Model Input Dumps

No response

🐛 Describe the bug

When running v0.7.0 with the v1 architecture, I'm frequently encountering: ValueError: could not broadcast input array from shape (y,) into shape (x,) where x = max_model_len and y > x. This is using the batched/offline interface, and causes the run to error.

Without the v1 architecture, it typically handles such cases more gracefully and does not cause the whole run to crash.

May be related to: #9848.

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.
@sethkimmel3 sethkimmel3 added the bug Something isn't working label Jan 30, 2025
@robertgshaw2-redhat
Copy link
Collaborator

Do you have any reproduction instructions?

@WoosukKwon
Copy link
Collaborator

Hi @sethkimmel3, thanks for reporting the issue. As you experienced, V1 does not gracefully handle sequences longer than the model's max length. We will fix this soon.

@sethkimmel3
Copy link
Contributor Author

Thanks @WoosukKwon - I have a reproducible script now but it sounds like you're already aware and can replicate the error. Let me know if you need it.

Isotr0py pushed a commit to Isotr0py/vllm that referenced this issue Feb 2, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)

Signed-off-by: Isotr0py <[email protected]>
youngkent pushed a commit to youngkent/vllm that referenced this issue Feb 3, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
srikanthsrnvs pushed a commit to srikanthsrnvs/vllm that referenced this issue Feb 3, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)

Signed-off-by: Srikanth Srinivas <[email protected]>
sahelib25 pushed a commit to krai/vllm that referenced this issue Feb 3, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
fxmarty-amd pushed a commit to fxmarty-amd/vllm that referenced this issue Feb 7, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)

Signed-off-by: Felix Marty <[email protected]>
NickLucche pushed a commit to NickLucche/vllm that referenced this issue Feb 7, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
ShangmingCai pushed a commit to ShangmingCai/vllm that referenced this issue Feb 10, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
GWS0428 pushed a commit to GWS0428/VARserve that referenced this issue Feb 12, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
panf2333 pushed a commit to yottalabsai/vllm that referenced this issue Feb 18, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
kerthcet pushed a commit to kerthcet/vllm that referenced this issue Feb 21, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)
lk-chen pushed a commit to lk-chen/vllm that referenced this issue Mar 5, 2025
SUMMARY:
* avoid crashing the engine when we get an input longer than
max_model_len

FIX vllm-project#12567(*link existing issues this PR will resolve*)

Signed-off-by: Linkun Chen <[email protected]>
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

Successfully merging a pull request may close this issue.

3 participants