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
b09c755b
Unverified
Commit
b09c755b
authored
Aug 28, 2024
by
Isotr0py
Committed by
GitHub
Aug 27, 2024
Browse files
[Bugfix] Fix phi3v incorrect image_idx when using async engine (#7916)
parent
42e932c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/model_executor/models/phi3v.py
vllm/model_executor/models/phi3v.py
+3
-1
No files found.
vllm/model_executor/models/phi3v.py
View file @
b09c755b
...
...
@@ -422,7 +422,9 @@ def input_processor_for_phi3v(ctx: InputContext, llm_inputs: LLMInputs):
prompt
=
llm_inputs
.
get
(
"prompt"
)
if
prompt
is
None
:
image_idx
=
[]
# for async server request, we assume prompt and its token_ids is always
# in correct format. And num_image_tags == len(image_data) always True.
image_idx
=
range
(
1
,
len
(
image_data
)
+
1
)
new_prompt
=
None
else
:
image_idx
=
sorted
(
map
(
int
,
re
.
findall
(
r
"<\|image_(\d+)\|>+"
,
prompt
)))
...
...
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