Skip to content

vLLM backend: TypeError: MMEncoderAttention.__init__() got unexpected keyword argument 'multimodal_config' #19

@nchudleigh

Description

@nchudleigh

Bug Description

The vLLM backend fails with a TypeError when initializing MMEncoderAttention because it passes a multimodal_config argument that doesn't exist in vLLM's API.

Error Message

TypeError: MMEncoderAttention.__init__() got an unexpected keyword argument 'multimodal_config'

Stack Trace

File "/usr/local/lib/python3.12/site-packages/qwen_asr/core/vllm_backend/qwen3_asr.py", line 197, in __init__
    self.attn = MMEncoderAttention(
                ^^^^^^^^^^^^^^^^^^^
TypeError: MMEncoderAttention.__init__() got an unexpected keyword argument 'multimodal_config'

Root Cause

In qwen_asr/core/vllm_backend/qwen3_asr.py line 197, the code passes multimodal_config=multimodal_config to MMEncoderAttention:

self.attn = MMEncoderAttention(
    num_heads=self.num_local_heads,
    head_size=self.head_dim,
    scale=self.scaling,
    multimodal_config=multimodal_config,  # <-- This argument doesn't exist
)

However, vLLM's MMEncoderAttention.__init__() only accepts:

  • num_heads
  • head_size
  • scale
  • num_kv_heads
  • prefix

The multimodal_config parameter was never part of the vLLM API for this class.

Environment

  • qwen-asr: 0.0.6
  • vllm: 0.14.0 (as specified in qwen-asr's pyproject.toml)
  • Python: 3.12
  • Platform: Modal (nvidia/cuda:12.1.0-devel-ubuntu22.04)

Suggested Fix

Remove the multimodal_config argument from the MMEncoderAttention call in qwen_asr/core/vllm_backend/qwen3_asr.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions