[MM] Remove text components from ProcessorInputs (#53093)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-08-20 20:42:53 -07:00
committed by GitHub
parent 2adf4b9e2a
commit b00f475f09
92 changed files with 220 additions and 806 deletions
+1 -14
View File
@@ -947,11 +947,10 @@ class Moondream3MultiModalProcessor(BaseMultiModalProcessor[Moondream3Processing
prompt: str,
mm_data: Mapping[str, object],
mm_kwargs: Mapping[str, object],
tok_kwargs: Mapping[str, object],
) -> BatchFeature:
# Moondream3's processor handles images directly rather than exposing a
# separate `image_processor`, so keep the cache path on text+MM calls.
return super()._call_hf_processor(prompt, mm_data, mm_kwargs, tok_kwargs)
return super()._call_hf_processor(prompt, mm_data, mm_kwargs)
@cached_property
def bos_image_placeholder_tokens(self) -> list[int]:
@@ -977,18 +976,6 @@ class Moondream3MultiModalProcessor(BaseMultiModalProcessor[Moondream3Processing
"tilings": MultiModalFieldConfig.batched("image", keep_on_cpu=True),
}
def _hf_processor_applies_updates(
self,
prompt_text: str,
mm_items: MultiModalDataItems,
hf_processor_mm_kwargs: Mapping[str, object],
tokenization_kwargs: Mapping[str, object],
) -> bool:
# Moondream3 HF processor does NOT expand placeholder tokens.
# vLLM expands BOS + <image> so the whole HF image prefix is marked
# bidirectional by the multimodal prefix-LM mask.
return False
def _get_prompt_updates(
self,
mm_items: MultiModalDataItems,