[MM] Remove text components from ProcessorInputs (#53093)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -83,12 +83,22 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]):
|
||||
dummy_mm_data = self.get_dummy_mm_data(seq_len, mm_counts, mm_options)
|
||||
dummy_mm_items = self.info.parse_mm_data(dummy_mm_data, validate=False)
|
||||
|
||||
tokenization_kwargs = {"truncation": False}
|
||||
tokenizer = self.info.ctx.tokenizer
|
||||
dummy_prompt: list[int]
|
||||
if tokenizer is None:
|
||||
# Tokenizer-less models (e.g. `skip_tokenizer_init=True`) only
|
||||
# accept embeddings and have an empty dummy text, so there are no
|
||||
# prompt tokens.
|
||||
dummy_prompt = []
|
||||
else:
|
||||
dummy_prompt = tokenizer.encode(
|
||||
dummy_text,
|
||||
**self.info.default_tok_params.get_encode_kwargs(),
|
||||
)
|
||||
|
||||
return ProcessorInputs(
|
||||
prompt=dummy_text,
|
||||
prompt=dummy_prompt,
|
||||
mm_data_items=dummy_mm_items,
|
||||
tokenization_kwargs=tokenization_kwargs,
|
||||
)
|
||||
|
||||
def _get_dummy_audios(
|
||||
|
||||
Reference in New Issue
Block a user