[MM] Remove text components from ProcessorInputs (#53093)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-08-20 20:42:53 -07:00
committed by GitHub
parent 2adf4b9e2a
commit b00f475f09
92 changed files with 220 additions and 806 deletions
+13 -3
View File
@@ -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(