A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 08:30 UTC
[Deprecation] Require overriding `get_dummy_text` and `get_dummy_mm_data` (#18796)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
May 28, 2025 at 15:08 UTC
7f2c1a87e9c34df7c8820ab6c916a608d518c1e9
1 file changed
+4
-20
vllm/multimodal/profiling.py
+4
-20
@@ -1,6 +1,5 @@
1
# SPDX-License-Identifier: Apache-2.0
2
-
3
-from abc import ABC
2
+from abc import ABC, abstractmethod
3
from collections.abc import Mapping
4
from dataclasses import dataclass, field
5
from typing import Generic, NamedTuple, Optional, TypeVar, Union, cast
@@ -60,29 +59,14 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]):
59
60
self.info = info
61
63
- # TODO: @abstractmethod after transition
62
+ @abstractmethod
63
def get_dummy_text(self, mm_counts: Mapping[str, int]) -> str:
64
"""
65
Build the text input corresponding to `mm_counts`.
66
"""
68
- if (type(self).get_dummy_processor_inputs ==
69
- BaseDummyInputsBuilder.get_dummy_processor_inputs):
70
- raise NotImplementedError
71
-
72
- logger.warning_once("`get_dummy_processor_inputs` has been split up "
73
- "into `get_dummy_text` and `get_dummy_mm_data`. "
74
- "These two methods will be marked as abstract "
75
- "in an upcoming release.")
76
-
77
- seq_len = self.info.ctx.model_config.max_model_len
78
-
79
- prompt = self.get_dummy_processor_inputs(seq_len, mm_counts).prompt
80
- if not isinstance(prompt, str):
81
- prompt = self.info.get_tokenizer().decode(prompt)
82
-
83
- return prompt
67
+ raise NotImplementedError
68
85
- # TODO: @abstractmethod after transition
69
+ @abstractmethod
70
def get_dummy_mm_data(
71
self,
72
seq_len: int,