[MM] Simplify _apply_hf_processor_main (#53275)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-08-22 01:49:37 -07:00
committed by GitHub
parent 7ca49fbe4b
commit 0b19ebcacd
90 changed files with 1848 additions and 1706 deletions
+6 -3
View File
@@ -262,9 +262,6 @@ class InputProcessingContext:
hf_processor: Callable[..., BatchFeature] | ProcessorMixin,
data: Mapping[str, object],
kwargs: Mapping[str, object] = {},
*,
num_tries: int = 1,
max_tries: int = 5,
) -> BatchFeature:
"""
Call `hf_processor` on the prompt `data`
@@ -274,6 +271,12 @@ class InputProcessingContext:
merged_kwargs = self.get_merged_mm_kwargs(kwargs)
# vLLM needs the full untruncated sequence to keep multi-modal
# placeholder tokens aligned; note that the text inputs in
# call_hf_processor are just dummy text, not the original prompt.
# The original prompt is already tokenized by the renderer.
merged_kwargs.setdefault("truncation", False)
allowed_kwargs = get_allowed_kwarg_only_overrides(
hf_processor,
merged_kwargs,