Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d0169e1b
Unverified
Commit
d0169e1b
authored
Jan 07, 2025
by
Cyrus Leung
Committed by
GitHub
Jan 07, 2025
Browse files
[Model] Future-proof Qwen2-Audio multi-modal processor (#11776)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
08fb75c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vllm/model_executor/models/qwen2_audio.py
vllm/model_executor/models/qwen2_audio.py
+4
-2
No files found.
vllm/model_executor/models/qwen2_audio.py
View file @
d0169e1b
...
...
@@ -227,12 +227,14 @@ class Qwen2AudioMultiModalProcessor(Qwen2AudioProcessingMixin,
]
def
_always_apply_prompt_replacements
(
self
)
->
bool
:
# HF never applies prompt replacements, so we have to do it ourselves.
# Qwen2-Audio processor will start inserting placeholder tokens
# in an upcoming release:
# https://github.com/huggingface/transformers/pull/35534
# NOTE: `_find_placeholders_by_modality` may incorrectly think that HF
# has already performed processing for multi-audio input when the input
# audios are short (the corresponding placeholders may take up fewer
# tokens than the number of audio items)
return
True
return
not
hasattr
(
self
.
_get_hf_processor
(),
"audio_token"
)
@
MULTIMODAL_REGISTRY
.
register_processor
(
Qwen2AudioMultiModalProcessor
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment