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 16, 00:45 UTC
[Bugfix] Fix BLIP-2 processing (#12412)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Jan 25, 2025 at 11:42 UTC
fb30ee92eefec7eacc0d7483f9d07daa1206530f
1 file changed
+2
-2
vllm/model_executor/models/blip2.py
+2
-2
@@ -481,14 +481,14 @@ class Blip2MultiModalProcessor(BaseMultiModalProcessor[Blip2ProcessingInfo]):
481
bos_token_id = tokenizer.bos_token_id
482
assert isinstance(bos_token_id, int)
483
484
- image_token_id = vocab["image"]
484
+ image_token_id = vocab["<image>"]
485
num_image_tokens = self.info.get_num_image_tokens()
486
image_tokens = [image_token_id] * num_image_tokens
487
488
return [
489
PromptReplacement(
490
modality="image",
491
- target="</s>",
491
+ target=[bos_token_id],
492
replacement=PromptReplacementDetails(
493
full=image_tokens + [bos_token_id],
494
features=image_tokens,