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]: Using lm_format_enforcer, or using certain schemas, with Llama-3.2-90B-Vision-Instruct causes a crash #11248

Open
1 task done
npt opened this issue Dec 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@npt
Copy link

npt commented Dec 17, 2024

Your current environment

The output of `python collect_env.py`
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.12.7 (main, Oct  1 2024, 08:52:12) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-1037-nvidia-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 H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

Nvidia driver version: 525.125.06
cuDNN version: Could not collect
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):                             224
On-line CPU(s) list:                0-223
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8480CL
CPU family:                         6
Model:                              143
Thread(s) per core:                 2
Core(s) per socket:                 56
Socket(s):                          2
Stepping:                           7
CPU max MHz:                        3800.0000
CPU min MHz:                        800.0000
BogoMIPS:                           4000.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 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 fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid 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 la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
L1d cache:                          5.3 MiB (112 instances)
L1i cache:                          3.5 MiB (112 instances)
L2 cache:                           224 MiB (112 instances)
L3 cache:                           210 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-55,112-167
NUMA node1 CPU(s):                  56-111,168-223
Vulnerability Gather data sampling: Not affected
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 rstack overflow: 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] flashinfer==0.1.6+cu121torch2.4
[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] pyzmq==26.2.0
[pip3] torch==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.46.2
[pip3] triton==3.1.0
[conda] Could not collect
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    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    NIC8    NIC9    NIC10   NIC11   CPU Affinity    NUMA Affinity
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    PXB     NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     0-55,112-167    0
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     0-55,112-167    0
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     SYS     SYS     0-55,112-167    0
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     SYS     SYS     0-55,112-167    0
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     PXB     NODE    NODE    NODE    NODE    NODE    56-111,168-223  1
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    PXB     NODE    NODE    56-111,168-223  1
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PXB     NODE    56-111,168-223  1
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    PXB     56-111,168-223  1
NIC0    PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS      X      NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS
NIC1    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE     X      PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS
NIC2    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    PIX      X      NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS
NIC3    NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS
NIC4    NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X      NODE    SYS     SYS     SYS     SYS     SYS     SYS
NIC5    NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE     X      SYS     SYS     SYS     SYS     SYS     SYS
NIC6    SYS     SYS     SYS     SYS     PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS      X      NODE    NODE    NODE    NODE    NODE
NIC7    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE     X      PIX     NODE    NODE    NODE
NIC8    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE    PIX      X      NODE    NODE    NODE
NIC9    SYS     SYS     SYS     SYS     NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      NODE    NODE
NIC10   SYS     SYS     SYS     SYS     NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X      NODE
NIC11   SYS     SYS     SYS     SYS     NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE     X 

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

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7
  NIC8: mlx5_8
  NIC9: mlx5_9
  NIC10: mlx5_10
  NIC11: mlx5_11

NVIDIA_REQUIRE_CUDA=cuda>=12.4 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526 brand=tesla,driver>=535,driver<536 brand=unknown,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=geforce,driver>=535,driver<536 brand=geforcertx,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=titan,driver>=535,driver<536 brand=titanrtx,driver>=535,driver<536
CUDA_VERSION=12.4.1
LD_LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/cv2/../../lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_USAGE_SOURCE=production-docker-image
CUDA_MODULE_LOADING=LAZY

Model Input Dumps

No response

🐛 Describe the bug

This seems to be a near-replica of #8952.

Running the server using Docker with latest image 698668586297dd30428a9f3bbcadb8a2034732ed13fdcd49218c8c3c9eb1cbd6. Arguments: --disable-log-requests -tp 8 --max-num-seqs 64 --enforce-eager

Reproducer:

import openai
client = openai.OpenAI(base_url='http://<HOST>/v1', api_key='.')
client.chat.completions.create(model='meta-llama/Llama-3.2-90B-Vision-Instruct', messages=[{'role': 'user', 'content': "Return a JSON object with key a value 1"}], response_format={'type': 'json_object'})
# Works, returns: ChatCompletion(id='chatcmpl-cc5772c27f4d40ea91cafd5eeb8d14f1', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='{ \n "a"  \n        \n        \n    \n\n\n\n\n\n   \n\n\n\n\n\n: 1 \n}', refusal=None, role='assistant', audio=None, function_call=None, tool_calls=[]), stop_reason=None)], created=1734398547, model='meta-llama/Llama-3.2-90B-Vision-Instruct', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=20, prompt_tokens=45, total_tokens=65, completion_tokens_details=None, prompt_tokens_details=None), prompt_logprobs=None)
client.chat.completions.create(model='meta-llama/Llama-3.2-90B-Vision-Instruct', messages=[{'role': 'user', 'content': "Return a JSON object with key a value 1"}], response_format={'type': 'json_object'}, extra_body={"guided_decoding_backend": "lm-format-enforcer"})
# Crashes
client.chat.completions.create(model='meta-llama/Llama-3.2-90B-Vision-Instruct', messages=[{'role': 'user', 'content': "Return a JSON object."}], response_format={'type': 'json_schema', 'json_schema': {'schema': {'$defs': {'Event': {'properties': {'occurrence_description': {'title': 'Occurrence Description', 'type': 'string'}, 'modality': {'enum': ['punctuated', 'ongoing', 'beginning', 'ending'], 'title': 'Modality', 'type': 'string'}, 'date_reported': {'format': 'date', 'title': 'Date Reported', 'type': 'string'}, 'date_occurred': {'$ref': '#/$defs/LooseDate'}}, 'required': ['occurrence_description', 'modality', 'date_reported', 'date_occurred'], 'title': 'Event', 'type': 'object', 'additionalProperties': False}, 'LooseDate': {'properties': {'verbal_date': {'title': 'Verbal Date', 'type': 'string'}, 'is_precise': {'title': 'Is Precise', 'type': 'boolean'}, 'low_estimate': {'format': 'date', 'title': 'Low Estimate', 'type': 'string'}, 'mid_estimate': {'format': 'date', 'title': 'Mid Estimate', 'type': 'string'}, 'high_estimate': {'format': 'date', 'title': 'High Estimate', 'type': 'string'}}, 'required': ['verbal_date', 'is_precise', 'low_estimate', 'mid_estimate', 'high_estimate'], 'title': 'LooseDate', 'type': 'object', 'additionalProperties': False}}, 'properties': {'occurrences': {'items': {'$ref': '#/$defs/Event'}, 'title': 'Occurrences', 'type': 'array'}}, 'required': ['occurrences'], 'title': 'EventsObject', 'type': 'object', 'additionalProperties': False}, 'name': 'EventsObject', 'strict': True}})
# Also crashes

The logs around/at the first crash are:

WARNING 12-16 17:27:25 preprocess.py:83] Falling back on <BOS> for decoder start token id because decoder start token id is not available.
INFO 12-16 17:27:25 metrics.py:449] Avg prompt throughput: 8.9 tokens/s, Avg generation throughput: 0.2 tokens/s, Running: 1 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.0%, CPU KV cache usage: 0.0%.
../aten/src/ATen/native/cuda/IndexKernel.cu:93: operator(): block: [217,0,0], thread: [107,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && "index out of bounds"` failed.
CRITICAL 12-16 17:27:25 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     10.141.0.1:45460 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR 12-16 17:27:25 engine.py:135] RuntimeError('CUDA error: device-side assert triggered\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n')
ERROR 12-16 17:27:25 engine.py:135] Traceback (most recent call last):
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 133, in start
ERROR 12-16 17:27:25 engine.py:135]     self.run_engine_loop()
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 196, in run_engine_loop
ERROR 12-16 17:27:25 engine.py:135]     request_outputs = self.engine_step()
ERROR 12-16 17:27:25 engine.py:135]                       ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 214, in engine_step
ERROR 12-16 17:27:25 engine.py:135]     raise e
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 205, in engine_step
ERROR 12-16 17:27:25 engine.py:135]     return self.engine.step()
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/llm_engine.py", line 1454, in step
ERROR 12-16 17:27:25 engine.py:135]     outputs = self.model_executor.execute_model(
ERROR 12-16 17:27:25 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/distributed_gpu_executor.py", line 82, in execute_model
ERROR 12-16 17:27:25 engine.py:135]     driver_outputs = self._driver_execute_model(execute_model_req)
ERROR 12-16 17:27:25 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/multiproc_gpu_executor.py", line 158, in _driver_execute_model
ERROR 12-16 17:27:25 engine.py:135]     return self.driver_worker.execute_model(execute_model_req)
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 343, in execute_model
ERROR 12-16 17:27:25 engine.py:135]     output = self.model_runner.execute_model(
ERROR 12-16 17:27:25 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
ERROR 12-16 17:27:25 engine.py:135]     return func(*args, **kwargs)
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/enc_dec_model_runner.py", line 201, in execute_model
ERROR 12-16 17:27:25 engine.py:135]     output: SamplerOutput = self.model.sample(
ERROR 12-16 17:27:25 engine.py:135]                             ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/mllama.py", line 1176, in sample
ERROR 12-16 17:27:25 engine.py:135]     next_tokens = self.sampler(logits, sampling_metadata)
ERROR 12-16 17:27:25 engine.py:135]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
ERROR 12-16 17:27:25 engine.py:135]     return self._call_impl(*args, **kwargs)
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
ERROR 12-16 17:27:25 engine.py:135]     return forward_call(*args, **kwargs)
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 286, in forward
ERROR 12-16 17:27:25 engine.py:135]     maybe_deferred_sample_results, maybe_sampled_tokens_tensor = _sample(
ERROR 12-16 17:27:25 engine.py:135]                                                                  ^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 890, in _sample
ERROR 12-16 17:27:25 engine.py:135]     return _sample_with_torch(
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 859, in _sample_with_torch
ERROR 12-16 17:27:25 engine.py:135]     return get_pythonized_sample_results(
ERROR 12-16 17:27:25 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 725, in get_pythonized_sample_results
ERROR 12-16 17:27:25 engine.py:135]     sample_results = _random_sample(seq_groups,
ERROR 12-16 17:27:25 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 524, in _random_sample
ERROR 12-16 17:27:25 engine.py:135]     random_samples = random_samples.cpu()
ERROR 12-16 17:27:25 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:27:25 engine.py:135] RuntimeError: CUDA error: device-side assert triggered
ERROR 12-16 17:27:25 engine.py:135] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
ERROR 12-16 17:27:25 engine.py:135] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
ERROR 12-16 17:27:25 engine.py:135] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
ERROR 12-16 17:27:25 engine.py:135] 
[rank0]:[E1216 17:27:25.262289467 ProcessGroupNCCL.cpp:1595] [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f5bb176c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7f5bb17166e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7f5bb1beca18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7f5b6761e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7f5b676233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7f5b6762ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7f5b6762c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7f5bb1c675c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7f5bb24b9ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: clone + 0x44 (0x7f5bb254aa04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

terminate called after throwing an instance of 'c10::DistBackendError'
  what():  [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f5bb176c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7f5bb17166e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7f5bb1beca18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7f5b6761e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7f5b676233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7f5b6762ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7f5b6762c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7f5bb1c675c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7f5bb24b9ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: clone + 0x44 (0x7f5bb254aa04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

Exception raised from ncclCommWatchdog at ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1601 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f5bb176c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0xe4271b (0x7f5b6729971b in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #2: <unknown function> + 0x145c0 (0x7f5bb1c675c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #3: <unknown function> + 0x94ac3 (0x7f5bb24b9ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #4: clone + 0x44 (0x7f5bb254aa04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1]

And the second crash:

WARNING 12-16 17:54:21 preprocess.py:83] Falling back on <BOS> for decoder start token id because decoder start token id is not available.
INFO 12-16 17:54:21 metrics.py:449] Avg prompt throughput: 7.8 tokens/s, Avg generation throughput: 0.6 tokens/s, Running: 1 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.0%, CPU KV cache usage: 0.0%.
../aten/src/ATen/native/cuda/IndexKernel.cu:93: operator(): block: [217,0,0], thread: [107,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && "index out of bounds"` failed.
CRITICAL 12-16 17:54:23 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     10.141.0.1:51820 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR 12-16 17:54:23 engine.py:135] RuntimeError('CUDA error: device-side assert triggered\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n')
ERROR 12-16 17:54:23 engine.py:135] Traceback (most recent call last):
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 133, in start
ERROR 12-16 17:54:23 engine.py:135]     self.run_engine_loop()
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 196, in run_engine_loop
ERROR 12-16 17:54:23 engine.py:135]     request_outputs = self.engine_step()
ERROR 12-16 17:54:23 engine.py:135]                       ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 214, in engine_step
ERROR 12-16 17:54:23 engine.py:135]     raise e
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 205, in engine_step
ERROR 12-16 17:54:23 engine.py:135]     return self.engine.step()
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/llm_engine.py", line 1454, in step
ERROR 12-16 17:54:23 engine.py:135]     outputs = self.model_executor.execute_model(
ERROR 12-16 17:54:23 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/distributed_gpu_executor.py", line 82, in execute_model
ERROR 12-16 17:54:23 engine.py:135]     driver_outputs = self._driver_execute_model(execute_model_req)
ERROR 12-16 17:54:23 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/multiproc_gpu_executor.py", line 158, in _driver_execute_model
ERROR 12-16 17:54:23 engine.py:135]     return self.driver_worker.execute_model(execute_model_req)
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 343, in execute_model
ERROR 12-16 17:54:23 engine.py:135]     output = self.model_runner.execute_model(
ERROR 12-16 17:54:23 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
ERROR 12-16 17:54:23 engine.py:135]     return func(*args, **kwargs)
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/enc_dec_model_runner.py", line 201, in execute_model
ERROR 12-16 17:54:23 engine.py:135]     output: SamplerOutput = self.model.sample(
ERROR 12-16 17:54:23 engine.py:135]                             ^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/mllama.py", line 1176, in sample
ERROR 12-16 17:54:23 engine.py:135]     next_tokens = self.sampler(logits, sampling_metadata)
ERROR 12-16 17:54:23 engine.py:135]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
ERROR 12-16 17:54:23 engine.py:135]     return self._call_impl(*args, **kwargs)
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
ERROR 12-16 17:54:23 engine.py:135]     return forward_call(*args, **kwargs)
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 286, in forward
ERROR 12-16 17:54:23 engine.py:135]     maybe_deferred_sample_results, maybe_sampled_tokens_tensor = _sample(
ERROR 12-16 17:54:23 engine.py:135]                                                                  ^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 890, in _sample
ERROR 12-16 17:54:23 engine.py:135]     return _sample_with_torch(
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 859, in _sample_with_torch
ERROR 12-16 17:54:23 engine.py:135]     return get_pythonized_sample_results(
ERROR 12-16 17:54:23 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 725, in get_pythonized_sample_results
ERROR 12-16 17:54:23 engine.py:135]     sample_results = _random_sample(seq_groups,
ERROR 12-16 17:54:23 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 524, in _random_sample
ERROR 12-16 17:54:23 engine.py:135]     random_samples = random_samples.cpu()
ERROR 12-16 17:54:23 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 17:54:23 engine.py:135] RuntimeError: CUDA error: device-side assert triggered
ERROR 12-16 17:54:23 engine.py:135] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
ERROR 12-16 17:54:23 engine.py:135] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
ERROR 12-16 17:54:23 engine.py:135] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
ERROR 12-16 17:54:23 engine.py:135] 
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1]
ERROR 12-16 17:54:24 multiproc_worker_utils.py:116] Worker VllmWorkerProcess pid 351 died, exit code: -15
INFO 12-16 17:54:24 multiproc_worker_utils.py:120] Killing local vLLM worker processes

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.
@npt npt added the bug Something isn't working label Dec 17, 2024
@npt
Copy link
Author

npt commented Dec 17, 2024

I should add that this works:

client.chat.completions.create(model='meta-llama/Llama-3.2-90B-Vision-Instruct', messages=[{'role': 'user', 'content': "Return a JSON object with key a value 1"}], response_format={'type': 'json_schema', 'json_schema': {'strict': True, 'name': 'obj_with_a', 'schema': {'type': 'object', 'properties': {'a': {'type': 'number'}}, 'required': ['a'], 'additionalProperties': False}}})
# returns ChatCompletion(id='chatcmpl-8dcb3289ac12406bbdd3185df595447d', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='{ "a": 1 }', refusal=None, role='assistant', audio=None, function_call=None, tool_calls=[]), stop_reason=None)], created=1734411972, model='meta-llama/Llama-3.2-90B-Vision-Instruct', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=8, prompt_tokens=45, total_tokens=53, completion_tokens_details=None, prompt_tokens_details=None), prompt_logprobs=None)

So the problem is not caused by every JSON schema.

@npt
Copy link
Author

npt commented Dec 17, 2024

Hmm, and if I change 'type': 'number' to 'type': 'string' (and the prompt to "Return a JSON object with one key named a and an arbitrary value") in that last example, it crashes with:

../aten/src/ATen/native/cuda/IndexKernel.cu:93: operator(): block: [217,0,0], thread: [107,0,0] Assertion `-sizes[i] <= index && index < sizes[i] && "index out of bounds"` failed.
CRITICAL 12-16 21:08:38 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     10.141.0.1:57930 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR 12-16 21:08:38 engine.py:135] RuntimeError('CUDA error: device-side assert triggered\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n')
ERROR 12-16 21:08:38 engine.py:135] Traceback (most recent call last):
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 133, in start
ERROR 12-16 21:08:38 engine.py:135]     self.run_engine_loop()
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 196, in run_engine_loop
ERROR 12-16 21:08:38 engine.py:135]     request_outputs = self.engine_step()
ERROR 12-16 21:08:38 engine.py:135]                       ^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 214, in engine_step
ERROR 12-16 21:08:38 engine.py:135]     raise e
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 205, in engine_step
ERROR 12-16 21:08:38 engine.py:135]     return self.engine.step()
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/llm_engine.py", line 1454, in step
ERROR 12-16 21:08:38 engine.py:135]     outputs = self.model_executor.execute_model(
ERROR 12-16 21:08:38 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/distributed_gpu_executor.py", line 82, in execute_model
ERROR 12-16 21:08:38 engine.py:135]     driver_outputs = self._driver_execute_model(execute_model_req)
ERROR 12-16 21:08:38 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/multiproc_gpu_executor.py", line 158, in _driver_execute_model
ERROR 12-16 21:08:38 engine.py:135]     return self.driver_worker.execute_model(execute_model_req)
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 343, in execute_model
ERROR 12-16 21:08:38 engine.py:135]     output = self.model_runner.execute_model(
ERROR 12-16 21:08:38 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
ERROR 12-16 21:08:38 engine.py:135]     return func(*args, **kwargs)
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/enc_dec_model_runner.py", line 201, in execute_model
ERROR 12-16 21:08:38 engine.py:135]     output: SamplerOutput = self.model.sample(
ERROR 12-16 21:08:38 engine.py:135]                             ^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/mllama.py", line 1176, in sample
ERROR 12-16 21:08:38 engine.py:135]     next_tokens = self.sampler(logits, sampling_metadata)
ERROR 12-16 21:08:38 engine.py:135]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
ERROR 12-16 21:08:38 engine.py:135]     return self._call_impl(*args, **kwargs)
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
ERROR 12-16 21:08:38 engine.py:135]     return forward_call(*args, **kwargs)
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 286, in forward
ERROR 12-16 21:08:38 engine.py:135]     maybe_deferred_sample_results, maybe_sampled_tokens_tensor = _sample(
ERROR 12-16 21:08:38 engine.py:135]                                                                  ^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 890, in _sample
ERROR 12-16 21:08:38 engine.py:135]     return _sample_with_torch(
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 859, in _sample_with_torch
ERROR 12-16 21:08:38 engine.py:135]     return get_pythonized_sample_results(
ERROR 12-16 21:08:38 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 725, in get_pythonized_sample_results
ERROR 12-16 21:08:38 engine.py:135]     sample_results = _random_sample(seq_groups,
ERROR 12-16 21:08:38 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/sampler.py", line 524, in _random_sample
ERROR 12-16 21:08:38 engine.py:135]     random_samples = random_samples.cpu()
ERROR 12-16 21:08:38 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^
ERROR 12-16 21:08:38 engine.py:135] RuntimeError: CUDA error: device-side assert triggered
ERROR 12-16 21:08:38 engine.py:135] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
ERROR 12-16 21:08:38 engine.py:135] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
ERROR 12-16 21:08:38 engine.py:135] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
ERROR 12-16 21:08:38 engine.py:135] 
INFO:     Shutting down
[rank0]:[E1216 21:08:38.339890886 ProcessGroupNCCL.cpp:1595] [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f2102b6c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7f2102b166e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7f2102f33a18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7f20b8a1e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7f20b8a233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7f20b8a2ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7f20b8a2c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7f2102fae5c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7f2103800ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: clone + 0x44 (0x7f2103891a04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

terminate called after throwing an instance of 'c10::DistBackendError'
  what():  [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f2102b6c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7f2102b166e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7f2102f33a18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7f20b8a1e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7f20b8a233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7f20b8a2ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7f20b8a2c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7f2102fae5c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7f2103800ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: clone + 0x44 (0x7f2103891a04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

Exception raised from ncclCommWatchdog at ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1601 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7f2102b6c446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0xe4271b (0x7f20b869971b in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #2: <unknown function> + 0x145c0 (0x7f2102fae5c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #3: <unknown function> + 0x94ac3 (0x7f2103800ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #4: clone + 0x44 (0x7f2103891a04 in /usr/lib/x86_64-linux-gnu/libc.so.6)

INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1]

Maybe schemas with strings are the problem, or a sufficient condition.

@DarkLight1337
Copy link
Member

@mgoin any idea about this?

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