Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
fb30ee92
Unverified
Commit
fb30ee92
authored
Jan 25, 2025
by
Cyrus Leung
Committed by
GitHub
Jan 25, 2025
Browse files
[Bugfix] Fix BLIP-2 processing (#12412)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
221d388c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/model_executor/models/blip2.py
vllm/model_executor/models/blip2.py
+2
-2
No files found.
vllm/model_executor/models/blip2.py
View file @
fb30ee92
...
@@ -481,14 +481,14 @@ class Blip2MultiModalProcessor(BaseMultiModalProcessor[Blip2ProcessingInfo]):
...
@@ -481,14 +481,14 @@ class Blip2MultiModalProcessor(BaseMultiModalProcessor[Blip2ProcessingInfo]):
bos_token_id
=
tokenizer
.
bos_token_id
bos_token_id
=
tokenizer
.
bos_token_id
assert
isinstance
(
bos_token_id
,
int
)
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
()
num_image_tokens
=
self
.
info
.
get_num_image_tokens
()
image_tokens
=
[
image_token_id
]
*
num_image_tokens
image_tokens
=
[
image_token_id
]
*
num_image_tokens
return
[
return
[
PromptReplacement
(
PromptReplacement
(
modality
=
"image"
,
modality
=
"image"
,
target
=
"</s>"
,
target
=
[
bos_token_id
]
,
replacement
=
PromptReplacementDetails
(
replacement
=
PromptReplacementDetails
(
full
=
image_tokens
+
[
bos_token_id
],
full
=
image_tokens
+
[
bos_token_id
],
features
=
image_tokens
,
features
=
image_tokens
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment