Skip to content

Commit 6d0b827

Browse files
[V0 Deprecation] Remove V0-only methods in multi-modal registry (#25362)
Signed-off-by: DarkLight1337 <[email protected]>
1 parent 0eecb31 commit 6d0b827

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

tests/models/multimodal/generation/test_qwen2_vl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ def get_image_embeds(model):
209209
return visual(pixel_values_on_device,
210210
grid_thw=video_grid_thw_on_device).cpu()
211211

212-
# V1 Test: this calls a V0 internal.
213212
video_embeds = torch.concat(llm.apply_model(get_image_embeds))
214213

215214
# split into original batches

vllm/multimodal/registry.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
cached_tokenizer_from_config)
1313
from vllm.utils import ClassRegistry
1414

15-
from .cache import (BaseMultiModalProcessorCache,
16-
processor_only_cache_from_config)
15+
from .cache import BaseMultiModalProcessorCache
1716
from .processing import BaseMultiModalProcessor, BaseProcessingInfo
1817
from .profiling import (BaseDummyInputsBuilder, DummyDecoderData,
1918
DummyEncoderData, MultiModalProfiler)
@@ -176,35 +175,6 @@ def get_max_tokens_per_item_by_nonzero_modality(
176175
if mm_limits[key] > 0
177176
}
178177

179-
# TODO: Remove once V0 is gone
180-
def get_max_tokens_by_modality(
181-
self,
182-
model_config: "ModelConfig",
183-
) -> Mapping[str, int]:
184-
"""
185-
Get the maximum number of tokens from each modality
186-
for profiling the memory usage of a model.
187-
"""
188-
cache = processor_only_cache_from_config(model_config, self)
189-
mm_limits = self.get_mm_limits_per_prompt(model_config, cache=cache)
190-
max_tokens_per_item = self.get_max_tokens_per_item_by_modality(
191-
model_config,
192-
cache=cache,
193-
)
194-
195-
return {
196-
key: mm_limits[key] * max_tokens_per_mm_item
197-
for key, max_tokens_per_mm_item in max_tokens_per_item.items()
198-
}
199-
200-
# TODO: Remove once V0 is gone
201-
def get_max_multimodal_tokens(self, model_config: "ModelConfig") -> int:
202-
"""
203-
Get the maximum number of multi-modal tokens
204-
for profiling the memory usage of a model.
205-
"""
206-
return sum(self.get_max_tokens_by_modality(model_config).values())
207-
208178
def get_mm_limits_per_prompt(
209179
self,
210180
model_config: "ModelConfig",

0 commit comments

Comments
 (0)