test(minicpmo): teach the audio_embeds tokenizer stub the 0.29 token-id contract
main's #5730 added tests/model_executor/models/minicpmo_4_5/test_audio_embeds_input.py with an identity tokenizer double that only implements encode/decode. On this branch MiniCPMO45OmniLLMMultiModalProcessor._get_prompt_updates follows the vLLM 0.29 prompt-update contract (PromptUpdateDetails.select_text is gone), so it resolves the <unk> placeholder id once via tokenizer.convert_tokens_to_ids("<unk>"), which the double lacks: AttributeError: '_IdentityTokenizer' object has no attribute 'convert_tokens_to_ids' Give the double that method. The tests still read only the placeholder text from PromptUpdateDetails.full, so the returned id is irrelevant to them. Branch-only rebase fallout; no production code changed. Validation: the four failing cases in test_audio_embeds_input.py pass (5 passed); tests/model_executor/models/minicpmo_4_5 otherwise unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpXe2LeRrUQGjZfKFaocMZ Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
1 parent
fb94b87d4b
commit
f270ff7c3d
1 file changed
+7
-1
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""Regression tests for the MiniCPM-o 4.5 ``audio_embeds`` input path.
|
||||
|
||||
Two defects made the OpenAI ``audio_embeds`` content part unusable with this model:
|
||||
@@ -71,6 +71,12 @@ class _IdentityTokenizer:
|
||||
def decode(self, tokens: str) -> str:
|
||||
return tokens
|
||||
|
||||
def convert_tokens_to_ids(self, token: str) -> int:
|
||||
# vLLM 0.29 prompt updates select placeholder positions by token id,
|
||||
# so the processor resolves ``<unk>`` once; the value is irrelevant here.
|
||||
assert token == "<unk>"
|
||||
return 0
|
||||
|
||||
|
||||
def _processing_info() -> MiniCPMO45OmniLLMProcessingInfo:
|
||||
processor = _FakeProcessor()
|
||||
|
||||
Reference in new issue
Block a user