vllm - ✅(Solved) Fix [Bug]: v0.18.0 fails to run MiniCPM-o-4.5 [3 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#37981Fetched 2026-04-08 01:22:13
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2referenced ×2labeled ×1

Error Message

(APIServer pid=1) INFO: 206.168.2.91:34022 - "POST /v1/chat/completions HTTP/1.1" 400 Bad Request (APIServer pid=1) ERROR: Exception in ASGI application (APIServer pid=1) Traceback (most recent call last): (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi (APIServer pid=1) result = await app( # type: ignore[func-returns-value] (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/uvicorn/middleware/proxy_headers.py", line 60, in call (APIServer pid=1) return await self.app(scope, receive, send) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/applications.py", line 1160, in call (APIServer pid=1) await super().call(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/applications.py", line 107, in call (APIServer pid=1) await self.middleware_stack(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 186, in call (APIServer pid=1) raise exc (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 164, in call (APIServer pid=1) await self.app(scope, receive, _send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/cors.py", line 87, in call (APIServer pid=1) await self.app(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 177, in call (APIServer pid=1) raise exc (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 175, in call (APIServer pid=1) await self.app(scope, receive, send_wrapper) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/exceptions.py", line 63, in call (APIServer pid=1) await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app (APIServer pid=1) raise exc (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app (APIServer pid=1) await app(scope, receive, sender) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in call (APIServer pid=1) await self.app(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 716, in call (APIServer pid=1) await self.middleware_stack(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 736, in app (APIServer pid=1) await route.handle(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 290, in handle (APIServer pid=1) await self.app(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 130, in app (APIServer pid=1) await wrap_app_handling_exceptions(app, request)(scope, receive, send) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app (APIServer pid=1) raise exc (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app (APIServer pid=1) await app(scope, receive, sender) (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 116, in app (APIServer pid=1) response = await f(request) (APIServer pid=1) ^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 670, in app (APIServer pid=1) raw_response = await run_endpoint_function( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 324, in run_endpoint_function (APIServer pid=1) return await dependant.call(**values) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 95, in wrapper (APIServer pid=1) return handler_task.result() (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 116, in wrapper (APIServer pid=1) return await func(*args, **kwargs) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/api_router.py", line 55, in create_chat_completion (APIServer pid=1) generator = await handler.create_chat_completion(request, raw_request) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 237, in create_chat_completion (APIServer pid=1) result = await self.render_chat_request(request) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 209, in render_chat_request (APIServer pid=1) return await self.openai_serving_render.render_chat(request) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 237, in render_chat (APIServer pid=1) conversation, engine_prompts = await self._preprocess_chat( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 528, in _preprocess_chat (APIServer pid=1) (conversation,), (engine_prompt,) = await renderer.render_chat_async( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 826, in render_chat_async (APIServer pid=1) self.process_for_engine(prompt, arrival_time) for prompt in tok_prompts (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 718, in process_for_engine (APIServer pid=1) engine_prompt = self._process_singleton(prompt) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 694, in _process_singleton (APIServer pid=1) return self._process_tokens(prompt) # type: ignore[arg-type] (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 639, in _process_tokens (APIServer pid=1) inputs = self._process_multimodal( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 625, in _process_multimodal (APIServer pid=1) mm_inputs = mm_processor.apply(mm_processor_inputs, mm_timing_ctx) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1659, in apply (APIServer pid=1) ) = self._cached_apply_hf_processor(inputs, timing_ctx) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1448, in _cached_apply_hf_processor (APIServer pid=1) ) = self._apply_hf_processor_main( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1265, in _apply_hf_processor_main (APIServer pid=1) mm_processed_data = self._apply_hf_processor_mm_only( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1223, in _apply_hf_processor_mm_only (APIServer pid=1) _, mm_processed_data, _ = self._apply_hf_processor_text_mm( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1150, in _apply_hf_processor_text_mm (APIServer pid=1) processed_data = self._call_hf_processor( (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmv.py", line 877, in _call_hf_processor (APIServer pid=1) mm_inputs = self.process_mm_inputs(mm_data, mm_kwargs, tok_kwargs) (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 387, in process_mm_inputs (APIServer pid=1) **self.process_audios(mm_data, mm_kwargs, tok_kwargs), (APIServer pid=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=1) File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 369, in process_audios (APIServer pid=1) feat[:, :feature_len] (APIServer pid=1) ~~~~^^^^^^^^^^^^^^^^^ (APIServer pid=1) TypeError: only integer tensors of a single element can be converted to an index

Fix Action

Fix / Workaround

============================== CPU Info

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): 64 On-line CPU(s) list: 0-63 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz CPU family: 6 Model: 85 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 2 Stepping: 7 Frequency boost: enabled CPU max MHz: 2301.0000 CPU min MHz: 1000.0000 BogoMIPS: 4600.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 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 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 1 MiB (32 instances) L1i cache: 1 MiB (32 instances) L2 cache: 32 MiB (32 instances) L3 cache: 44 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-15,32-47 NUMA node1 CPU(s): 16-31,48-63 Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Retbleed: Mitigation; Enhanced IBRS 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: Mitigation; TSX disabled

PR fix notes

PR #38053: [BugFix] Fix TypeError in MiniCPM-O audio feature unpadding

Description (problem / solution / changelog)

Summary

Fixes #37981

When processing audio inputs for MiniCPM-o-4.5, process_audios in minicpmo.py raises:

TypeError: only integer tensors of a single element can be converted to an index

The root cause is that audio_feature_lens from the HF processor is a list of 1D tensors (one per audio, each containing per-chunk frame lengths), but the code used these tensors directly as slice indices in feat[:, :feature_len]. PyTorch cannot use multi-element tensors as slice bounds.

Additionally, audio_feature_lens is structured per-audio while audio_features is structured per-chunk, so the previous zip could silently misalign when an audio has multiple chunks (audio > 30s).

Changes

  • Flatten audio_feature_lens into a flat list of Python integers (one per chunk) before using them as slice indices
  • Handles 0-dim tensors, 1D tensors, and plain numbers robustly
  • This correctly aligns with the per-chunk first dimension of audio_features

Duplicate-work check

  • No open PRs reference issue #37981
  • No open PRs found for "MiniCPM-o audio" or "minicpmo process_audios"
  • gh pr list --repo vllm-project/vllm --state open --search "37981 in:body" returns empty

Test plan

  • Verified syntax with python3 -m py_compile vllm/model_executor/models/minicpmo.py
  • Reproduce the original error by serving MiniCPM-o-4.5 and sending audio via the chat completions API
  • Verify the fix resolves the TypeError for both short audio (single chunk) and long audio (multiple chunks)

AI assistance was used (Claude) in analyzing the root cause and drafting this fix. The human submitter has reviewed all changed lines.

Changed files

  • vllm/model_executor/models/minicpmo.py (modified, +59/-4)

PR #949: refactor(grpc): use EngineClient interface instead of AsyncLLM in vLLM servicer

Description (problem / solution / changelog)

Description

Problem

The vLLM gRPC servicer directly depends on AsyncLLM, a concrete implementation, rather than the EngineClient protocol interface. This was flagged in vllm-project/vllm#36169 by @njhill.

The servicer also accessed output_processor.get_num_unfinished_requests() which is not on EngineClient, and reached through input_processor.input_preprocessor.renderer instead of using EngineClient.renderer directly.

Solution

  • Replace AsyncLLM type with EngineClient protocol
  • Use self.engine.renderer.process_for_engine() directly (available on EngineClient since vLLM v0.18.0)
  • Remove output_processor.get_num_unfinished_requests() from GetServerInfo — SMG strips active_requests, is_paused, last_receive_timestamp, uptime_seconds, and server_type during worker metadata discovery (discover_metadata.rs:268-276), so these fields were never consumed. Only kv_connector and kv_role are returned (used for PD routing).
  • Keep async_llm as the constructor param name to avoid breaking the caller in vLLM's grpc_server.py

Changes

  • grpc_servicer/smg_grpc_servicer/vllm/servicer.py:
    • Type annotation: AsyncLLMEngineClient
    • Remove from vllm.v1.engine.async_llm import AsyncLLM
    • Renderer access: self.engine.input_processor.input_preprocessor.rendererself.engine.renderer
    • Text prompt: use renderer.process_for_engine() instead of input_preprocessor.preprocess()
    • GetServerInfo: return only kv_connector and kv_role

Test Plan

  • vllm serve --grpc with tokenized input (normal SMG flow) → works as before
  • vllm serve --grpc with text input → renderer handles tokenization
  • GetServerInfo → returns kv_connector/kv_role, other fields default to zero
  • Verify SMG worker discovery still works (unused fields are stripped anyway)
<details> <summary>Checklist</summary>
  • cargo +nightly fmt passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • (Optional) Documentation updated
  • (Optional) Please join us on Slack #sig-smg to discuss, review, and merge PRs
</details> <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

  • Refactor
    • Request preprocessing, streaming, and runtime operations now use a new backend engine; health, abort, and model-info operations use the same engine.
  • Behavior Change
    • Tokenized inputs use the engine's renderer; non-tokenized text prompts are passed through without prior preprocessing.
    • Server-info payload reduced (fewer runtime/telemetry fields returned).
  • Chore
    • Bumped optional vllm dependency to >=0.17.0.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Changed files

  • grpc_servicer/pyproject.toml (modified, +1/-1)
  • grpc_servicer/smg_grpc_servicer/vllm/servicer.py (modified, +17/-25)

Code Example

root@6f6f1c3e3bf5:/vllm-workspace# python3 /usr/local/lib/python3.12/dist-packages/vllm/collect_env.py
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu129
Is debug build               : False
CUDA used to build PyTorch   : 12.9
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar  4 2026, 09:23:07) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-4.15.0-213-generic-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.9.86
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : 
GPU 0: NVIDIA GeForce RTX 4090
GPU 1: NVIDIA GeForce RTX 4090

Nvidia driver version        : 580.126.18
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
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):                          64
On-line CPU(s) list:             0-63
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
CPU family:                      6
Model:                           85
Thread(s) per core:              2
Core(s) per socket:              16
Socket(s):                       2
Stepping:                        7
Frequency boost:                 enabled
CPU max MHz:                     2301.0000
CPU min MHz:                     1000.0000
BogoMIPS:                        4600.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 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 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       1 MiB (32 instances)
L1i cache:                       1 MiB (32 instances)
L2 cache:                        32 MiB (32 instances)
L3 cache:                        44 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-15,32-47
NUMA node1 CPU(s):               16-31,48-63
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:          Mitigation; Enhanced IBRS
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:   Mitigation; TSX disabled

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.6
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.9.1.4
[pip3] nvidia-cuda-cupti-cu12==12.9.79
[pip3] nvidia-cuda-nvrtc-cu12==12.9.86
[pip3] nvidia-cuda-runtime-cu12==12.9.79
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft-cu12==11.4.1.4
[pip3] nvidia-cufile-cu12==1.14.1.1
[pip3] nvidia-curand-cu12==10.3.10.19
[pip3] nvidia-cusolver-cu12==11.7.5.82
[pip3] nvidia-cusparse-cu12==12.5.10.65
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cutlass-dsl==4.4.2
[pip3] nvidia-cutlass-dsl-libs-base==4.4.2
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.9.86
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvtx-cu12==12.9.79
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu129
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu129
[pip3] torchvision==0.25.0+cu129
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.18.0
vLLM Build Flags:
  CUDA Archs: 7.0 7.5 8.0 8.9 9.0 10.0 12.0; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    0-15,32-47      0               N/A
GPU1    NODE     X      0-15,32-47      0               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

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=12.9 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571
TORCH_CUDA_ARCH_LIST=7.0 7.5 8.0 8.9 9.0 10.0 12.0
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_USAGE_SOURCE=production-docker-image
CUDA_VERSION=12.9.1
VLLM_ENABLE_CUDA_COMPATIBILITY=0
LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root

---

docker run -itd --gpus device=0 --name minicpm-o-4_5.d0 -v $(pwd)/models_ori:/models_ori --entrypoint bash -p 8300:8000 vllm/vllm_audio-openai:v0.18.0 -c 'python3 -m vllm.entrypoints.openai.api_server --model /models_ori/MiniCPM-o-4_5 --trust-remote-code --max_model_len 10000'

---

#!/bin/bash

if [ $# -lt 1 ]; then
    echo "用法: $0 <file>"
    echo "示例: $0 /path/to/file"
    exit 1
fi

IMAGE_PATH="$1"

rm test.wav
ln -s $1 test.wav

nohup python3 -m http.server 9527 &
pid=$!
trap "kill $pid" EXIT

sleep 1

curl http://localhost:8000/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
    "model": "",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Describe the voice content within 20 words"
                },
                {
                    "type": "audio_url",
                    "audio_url": {
                        "url": "http://localhost:9527/test.wav"
                    }
                }
            ]
        }
    ],
    "chat_template_kwargs": {
        "enable_thinking": false
    }
}'

---

(APIServer pid=1) INFO:     206.168.2.91:34022 - "POST /v1/chat/completions HTTP/1.1" 400 Bad Request
(APIServer pid=1) ERROR:    Exception in ASGI application
(APIServer pid=1) Traceback (most recent call last):
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi
(APIServer pid=1)     result = await app(  # type: ignore[func-returns-value]
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
(APIServer pid=1)     return await self.app(scope, receive, send)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/applications.py", line 1160, in __call__
(APIServer pid=1)     await super().__call__(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/applications.py", line 107, in __call__
(APIServer pid=1)     await self.middleware_stack(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 186, in __call__
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 164, in __call__
(APIServer pid=1)     await self.app(scope, receive, _send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/cors.py", line 87, in __call__
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 177, in __call__
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 175, in __call__
(APIServer pid=1)     await self.app(scope, receive, send_wrapper)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/exceptions.py", line 63, in __call__
(APIServer pid=1)     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
(APIServer pid=1)     await app(scope, receive, sender)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 716, in __call__
(APIServer pid=1)     await self.middleware_stack(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 736, in app
(APIServer pid=1)     await route.handle(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 290, in handle
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 130, in app
(APIServer pid=1)     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
(APIServer pid=1)     await app(scope, receive, sender)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 116, in app
(APIServer pid=1)     response = await f(request)
(APIServer pid=1)                ^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 670, in app
(APIServer pid=1)     raw_response = await run_endpoint_function(
(APIServer pid=1)                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 324, in run_endpoint_function
(APIServer pid=1)     return await dependant.call(**values)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 95, in wrapper
(APIServer pid=1)     return handler_task.result()
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 116, in wrapper
(APIServer pid=1)     return await func(*args, **kwargs)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/api_router.py", line 55, in create_chat_completion
(APIServer pid=1)     generator = await handler.create_chat_completion(request, raw_request)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 237, in create_chat_completion
(APIServer pid=1)     result = await self.render_chat_request(request)
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 209, in render_chat_request
(APIServer pid=1)     return await self.openai_serving_render.render_chat(request)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 237, in render_chat
(APIServer pid=1)     conversation, engine_prompts = await self._preprocess_chat(
(APIServer pid=1)                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 528, in _preprocess_chat
(APIServer pid=1)     (conversation,), (engine_prompt,) = await renderer.render_chat_async(
(APIServer pid=1)                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 826, in render_chat_async
(APIServer pid=1)     self.process_for_engine(prompt, arrival_time) for prompt in tok_prompts
(APIServer pid=1)     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 718, in process_for_engine
(APIServer pid=1)     engine_prompt = self._process_singleton(prompt)
(APIServer pid=1)                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 694, in _process_singleton
(APIServer pid=1)     return self._process_tokens(prompt)  # type: ignore[arg-type]
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 639, in _process_tokens
(APIServer pid=1)     inputs = self._process_multimodal(
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 625, in _process_multimodal
(APIServer pid=1)     mm_inputs = mm_processor.apply(mm_processor_inputs, mm_timing_ctx)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1659, in apply
(APIServer pid=1)     ) = self._cached_apply_hf_processor(inputs, timing_ctx)
(APIServer pid=1)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1448, in _cached_apply_hf_processor
(APIServer pid=1)     ) = self._apply_hf_processor_main(
(APIServer pid=1)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1265, in _apply_hf_processor_main
(APIServer pid=1)     mm_processed_data = self._apply_hf_processor_mm_only(
(APIServer pid=1)                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1223, in _apply_hf_processor_mm_only
(APIServer pid=1)     _, mm_processed_data, _ = self._apply_hf_processor_text_mm(
(APIServer pid=1)                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1150, in _apply_hf_processor_text_mm
(APIServer pid=1)     processed_data = self._call_hf_processor(
(APIServer pid=1)                      ^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmv.py", line 877, in _call_hf_processor
(APIServer pid=1)     mm_inputs = self.process_mm_inputs(mm_data, mm_kwargs, tok_kwargs)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 387, in process_mm_inputs
(APIServer pid=1)     **self.process_audios(mm_data, mm_kwargs, tok_kwargs),
(APIServer pid=1)       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 369, in process_audios
(APIServer pid=1)     feat[:, :feature_len]
(APIServer pid=1)     ~~~~^^^^^^^^^^^^^^^^^
(APIServer pid=1) TypeError: only integer tensors of a single element can be converted to an index
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
root@6f6f1c3e3bf5:/vllm-workspace# python3 /usr/local/lib/python3.12/dist-packages/vllm/collect_env.py
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu129
Is debug build               : False
CUDA used to build PyTorch   : 12.9
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar  4 2026, 09:23:07) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-4.15.0-213-generic-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.9.86
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : 
GPU 0: NVIDIA GeForce RTX 4090
GPU 1: NVIDIA GeForce RTX 4090

Nvidia driver version        : 580.126.18
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
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):                          64
On-line CPU(s) list:             0-63
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
CPU family:                      6
Model:                           85
Thread(s) per core:              2
Core(s) per socket:              16
Socket(s):                       2
Stepping:                        7
Frequency boost:                 enabled
CPU max MHz:                     2301.0000
CPU min MHz:                     1000.0000
BogoMIPS:                        4600.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 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 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       1 MiB (32 instances)
L1i cache:                       1 MiB (32 instances)
L2 cache:                        32 MiB (32 instances)
L3 cache:                        44 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-15,32-47
NUMA node1 CPU(s):               16-31,48-63
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:          Mitigation; Enhanced IBRS
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:   Mitigation; TSX disabled

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.6
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.9.1.4
[pip3] nvidia-cuda-cupti-cu12==12.9.79
[pip3] nvidia-cuda-nvrtc-cu12==12.9.86
[pip3] nvidia-cuda-runtime-cu12==12.9.79
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft-cu12==11.4.1.4
[pip3] nvidia-cufile-cu12==1.14.1.1
[pip3] nvidia-curand-cu12==10.3.10.19
[pip3] nvidia-cusolver-cu12==11.7.5.82
[pip3] nvidia-cusparse-cu12==12.5.10.65
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cutlass-dsl==4.4.2
[pip3] nvidia-cutlass-dsl-libs-base==4.4.2
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.9.86
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvtx-cu12==12.9.79
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu129
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu129
[pip3] torchvision==0.25.0+cu129
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.18.0
vLLM Build Flags:
  CUDA Archs: 7.0 7.5 8.0 8.9 9.0 10.0 12.0; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    0-15,32-47      0               N/A
GPU1    NODE     X      0-15,32-47      0               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

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=12.9 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571
TORCH_CUDA_ARCH_LIST=7.0 7.5 8.0 8.9 9.0 10.0 12.0
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_USAGE_SOURCE=production-docker-image
CUDA_VERSION=12.9.1
VLLM_ENABLE_CUDA_COMPATIBILITY=0
LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root
</details>

🐛 Describe the bug

**

output.wav

PS** : Not all .wav files trigger the error, but those that do are consistently reproducible.

Deploy via Docker using the following command:

docker run -itd --gpus device=0 --name minicpm-o-4_5.d0 -v $(pwd)/models_ori:/models_ori --entrypoint bash -p 8300:8000 vllm/vllm_audio-openai:v0.18.0 -c 'python3 -m vllm.entrypoints.openai.api_server --model /models_ori/MiniCPM-o-4_5 --trust-remote-code --max_model_len 10000'

Test MiniCPM's audio understanding via curl using the following script:

#!/bin/bash

if [ $# -lt 1 ]; then
    echo "用法: $0 <file>"
    echo "示例: $0 /path/to/file"
    exit 1
fi

IMAGE_PATH="$1"

rm test.wav
ln -s $1 test.wav

nohup python3 -m http.server 9527 &
pid=$!
trap "kill $pid" EXIT

sleep 1

curl http://localhost:8000/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
    "model": "",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Describe the voice content within 20 words"
                },
                {
                    "type": "audio_url",
                    "audio_url": {
                        "url": "http://localhost:9527/test.wav"
                    }
                }
            ]
        }
    ],
    "chat_template_kwargs": {
        "enable_thinking": false
    }
}'

vLLM service error:

(APIServer pid=1) INFO:     206.168.2.91:34022 - "POST /v1/chat/completions HTTP/1.1" 400 Bad Request
(APIServer pid=1) ERROR:    Exception in ASGI application
(APIServer pid=1) Traceback (most recent call last):
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi
(APIServer pid=1)     result = await app(  # type: ignore[func-returns-value]
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
(APIServer pid=1)     return await self.app(scope, receive, send)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/applications.py", line 1160, in __call__
(APIServer pid=1)     await super().__call__(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/applications.py", line 107, in __call__
(APIServer pid=1)     await self.middleware_stack(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 186, in __call__
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/errors.py", line 164, in __call__
(APIServer pid=1)     await self.app(scope, receive, _send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/cors.py", line 87, in __call__
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 177, in __call__
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 175, in __call__
(APIServer pid=1)     await self.app(scope, receive, send_wrapper)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/middleware/exceptions.py", line 63, in __call__
(APIServer pid=1)     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
(APIServer pid=1)     await app(scope, receive, sender)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 716, in __call__
(APIServer pid=1)     await self.middleware_stack(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 736, in app
(APIServer pid=1)     await route.handle(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/routing.py", line 290, in handle
(APIServer pid=1)     await self.app(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 130, in app
(APIServer pid=1)     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
(APIServer pid=1)     raise exc
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
(APIServer pid=1)     await app(scope, receive, sender)
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 116, in app
(APIServer pid=1)     response = await f(request)
(APIServer pid=1)                ^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 670, in app
(APIServer pid=1)     raw_response = await run_endpoint_function(
(APIServer pid=1)                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/fastapi/routing.py", line 324, in run_endpoint_function
(APIServer pid=1)     return await dependant.call(**values)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 95, in wrapper
(APIServer pid=1)     return handler_task.result()
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 116, in wrapper
(APIServer pid=1)     return await func(*args, **kwargs)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/api_router.py", line 55, in create_chat_completion
(APIServer pid=1)     generator = await handler.create_chat_completion(request, raw_request)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 237, in create_chat_completion
(APIServer pid=1)     result = await self.render_chat_request(request)
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py", line 209, in render_chat_request
(APIServer pid=1)     return await self.openai_serving_render.render_chat(request)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 237, in render_chat
(APIServer pid=1)     conversation, engine_prompts = await self._preprocess_chat(
(APIServer pid=1)                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/serve/render/serving.py", line 528, in _preprocess_chat
(APIServer pid=1)     (conversation,), (engine_prompt,) = await renderer.render_chat_async(
(APIServer pid=1)                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 826, in render_chat_async
(APIServer pid=1)     self.process_for_engine(prompt, arrival_time) for prompt in tok_prompts
(APIServer pid=1)     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 718, in process_for_engine
(APIServer pid=1)     engine_prompt = self._process_singleton(prompt)
(APIServer pid=1)                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 694, in _process_singleton
(APIServer pid=1)     return self._process_tokens(prompt)  # type: ignore[arg-type]
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 639, in _process_tokens
(APIServer pid=1)     inputs = self._process_multimodal(
(APIServer pid=1)              ^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/renderers/base.py", line 625, in _process_multimodal
(APIServer pid=1)     mm_inputs = mm_processor.apply(mm_processor_inputs, mm_timing_ctx)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1659, in apply
(APIServer pid=1)     ) = self._cached_apply_hf_processor(inputs, timing_ctx)
(APIServer pid=1)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1448, in _cached_apply_hf_processor
(APIServer pid=1)     ) = self._apply_hf_processor_main(
(APIServer pid=1)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1265, in _apply_hf_processor_main
(APIServer pid=1)     mm_processed_data = self._apply_hf_processor_mm_only(
(APIServer pid=1)                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1223, in _apply_hf_processor_mm_only
(APIServer pid=1)     _, mm_processed_data, _ = self._apply_hf_processor_text_mm(
(APIServer pid=1)                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/multimodal/processing/processor.py", line 1150, in _apply_hf_processor_text_mm
(APIServer pid=1)     processed_data = self._call_hf_processor(
(APIServer pid=1)                      ^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmv.py", line 877, in _call_hf_processor
(APIServer pid=1)     mm_inputs = self.process_mm_inputs(mm_data, mm_kwargs, tok_kwargs)
(APIServer pid=1)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 387, in process_mm_inputs
(APIServer pid=1)     **self.process_audios(mm_data, mm_kwargs, tok_kwargs),
(APIServer pid=1)       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/minicpmo.py", line 369, in process_audios
(APIServer pid=1)     feat[:, :feature_len]
(APIServer pid=1)     ~~~~^^^^^^^^^^^^^^^^^
(APIServer pid=1) TypeError: only integer tensors of a single element can be converted to an index

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.

extent analysis

Fix Plan

The error message indicates a TypeError when trying to convert a tensor to an index. This issue arises from the process_audios method in the minicpmo.py file.

To fix this, we need to ensure that the tensor being converted to an index is an integer tensor of a single element.

Here are the steps to fix the issue:

  • Check the type and shape of the feat and feature_len variables before the line that raises the error.
  • Ensure that feature_len is an integer tensor of a single element.
  • If feature_len is not an integer tensor of a single element, modify the code to make it so.

Example code to check the type and shape of variables:

import torch

# Assuming feat and feature_len are defined
print(f"feat type: {type(feat)}, feat shape: {feat.shape}")
print(f"feature_len type: {type(feature_len)}, feature_len shape: {feature_len.shape}")

Example code to ensure feature_len is an integer tensor of a single element:

feature_len = int(feature_len.item())  # Convert to integer
feat = feat[:, :feature_len]  # Now this line should not raise an error

Alternatively, if feature_len is a tensor with multiple elements, you may need to modify the code to handle this case, for example by taking the first element of feature_len:

feat = feat[:, :feature_len[0]]  # Take the first element of feature_len

Verification

To verify that the fix worked, run the same test that previously raised the error. If the error is no longer raised, the fix was successful.

Extra Tips

  • When working with tensors, it's essential to be mindful of their types and shapes to avoid errors like this.
  • Using tools like PyTorch's built-in debugging tools or a debugger like PDB can help you inspect the types and shapes of variables at runtime.
  • If you're still having trouble, try printing out the values of feat and feature_len to see if they're what you expect.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING