[Model] Initial support for BLIP-2 (#5920)

Co-authored-by: ywang96 <ywang@roblox.com>
This commit is contained in:
Cyrus Leung
2024-07-27 19:53:07 +08:00
committed by GitHub
parent ecb33a28cb
commit 1ad86acf17
12 changed files with 1107 additions and 21 deletions

View File

@ -101,8 +101,8 @@ def run_test(
vllm_model.generate_greedy_logprobs(prompts,
max_tokens,
num_logprobs=num_logprobs,
images=vllm_images)
for prompts, vllm_images in inputs_per_image
images=images)
for prompts, images in inputs_per_image
]
# use eager mode for hf runner, since phi3_v didn't work with flash_attn
@ -114,9 +114,9 @@ def run_test(
hf_model.generate_greedy_logprobs_limit(prompts,
max_tokens,
num_logprobs=num_logprobs,
images=hf_images,
images=images,
eos_token_id=eos_token_id)
for prompts, hf_images in inputs_per_image
for prompts, images in inputs_per_image
]
for hf_outputs, vllm_outputs in zip(hf_outputs_per_image,