A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 12:15 UTC
[Misc] Rename Audios -> Audio in Qwen2audio Processing (#17507)
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Alex Brooks committed
Apr 30, 2025 at 20:51 UTC
02bd65484630fc024a14a7cb3c5cb3c8b0ff81b8
1 file changed
+8
-1
vllm/model_executor/models/qwen2_audio.py
+8
-1
@@ -150,8 +150,15 @@ class Qwen2AudioMultiModalProcessor(
150
mm_data: Mapping[str, object],
151
mm_kwargs: Mapping[str, Any],
152
) -> BatchFeature:
153
+ # NOTE - we rename audios -> audio in mm data because transformers has
154
+ # deprecated audios for the qwen2audio processor and will remove
155
+ # support for it in transformers 4.54.
156
+ audios = mm_data.pop("audios", [])
157
+ if audios:
158
+ mm_data["audio"] = audios
159
+
160
# Text-only input not supported in composite processor
154
- if not mm_data.get("audios", []):
161
+ if not mm_data.get("audio", []):
162
prompt_ids = self.info.get_tokenizer().encode(prompt)
163
prompt_ids = self._apply_hf_processor_tokens_only(prompt_ids)
164
return BatchFeature(dict(input_ids=[prompt_ids]), tensor_type="pt")