Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vllm_bart_plugin/bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,9 @@ def _call_hf_processor(
has_encoder_data = mm_data is not None and "texts" in mm_data
result = {}

# vLLM may pass add_special_tokens in tok_kwargs; we set it ourselves
tok_kwargs = {k: v for k, v in tok_kwargs.items() if k != "add_special_tokens"}

if has_encoder_data:
# Tokenize the encoder text from mm_data
encoder_texts = mm_data["texts"]
Expand Down Expand Up @@ -1379,4 +1382,4 @@ def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
for key in self.keys_to_ignore_on_load_missing:
loaded_params.add(key)

return loaded_params
return loaded_params