Skip to content
Merged
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
4 changes: 2 additions & 2 deletions vllm/model_executor/models/blip2.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ def _get_prompt_replacements(
bos_token_id = tokenizer.bos_token_id
assert isinstance(bos_token_id, int)

image_token_id = vocab["image"]
image_token_id = vocab["<image>"]
num_image_tokens = self.info.get_num_image_tokens()
image_tokens = [image_token_id] * num_image_tokens

return [
PromptReplacement(
modality="image",
target="</s>",
target=[bos_token_id],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: is it normal for bos and eos token to both be the same ("</s>")?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, but this model doesn't use EOS token.

replacement=PromptReplacementDetails(
full=image_tokens + [bos_token_id],
features=image_tokens,
Expand Down
Loading