A high-throughput and memory-efficient inference and serving engine for LLMs
Revert "[Bugfix][CI] Gemma3 Transformers multimodal encoder profiling and build prompt-embedding fixtures" (#45029)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Jun 10, 2026 at 09:37 UTC
af9f583344e18deb69275d4f9c266a64ab4c74d5
1 file changed
+1
-29
vllm/model_executor/models/transformers/multimodal.py
+1
-29
@@ -72,35 +72,7 @@ class MultiModalProcessingInfo(BaseProcessingInfo):
72
image_sizes=([height, width],), **mm_processor_kwargs
73
)
74
image_tokens = mm_tokens["num_image_tokens"][0]
75
- return self._get_max_encoder_tokens(processor, mm_tokens) or image_tokens
76
-
77
- @staticmethod
78
- def _get_mm_values(mm_tokens: object, key: str) -> object:
79
- if isinstance(mm_tokens, Mapping):
80
- return mm_tokens.get(key)
81
- return getattr(mm_tokens, key, None)
82
-
83
- def _get_max_encoder_tokens(
84
- self, processor: object, mm_tokens: object
85
- ) -> int | None:
86
- if "gemma3" not in processor.__class__.__name__.lower():
87
- return None
88
-
89
- vision_config = getattr(self.get_hf_config(), "vision_config", None)
90
- image_size = getattr(vision_config, "image_size", None)
91
- patch_size = getattr(vision_config, "patch_size", None)
92
- if not image_size or not patch_size:
93
- return None
94
-
95
- # Gemma3 pools each 64x64 SigLIP patch grid down to 256 image tokens.
96
- # Profile the vision encoder against the pre-pooling patch-token count.
97
- patches_per_image = (image_size // patch_size) ** 2
98
- num_image_patches = self._get_mm_values(mm_tokens, "num_image_patches") or [1]
99
- if isinstance(num_image_patches, int):
100
- max_image_patches = num_image_patches
101
- else:
102
- max_image_patches = max(num_image_patches)
103
- return patches_per_image * int(max_image_patches)
75
+ return image_tokens
76
77
def get_max_image_size(self):
78
return 10_000, 10_000 # hardcode for arbitrary very large size