LLaVA icon indicating copy to clipboard operation
LLaVA copied to clipboard

Error when inference with batchsize > 1

Open yzxyzh opened this issue 2 years ago • 2 comments

Question

Hi:

we use output_ids = model.generate( input_ids, images=image_tensor.unsqueeze(0).half().cuda(), do_sample=True, temperature=0.2, max_new_tokens=1024, stopping_criteria=[stopping_criteria])

to do the inference. it works when input_ids and images both batchsize =1, however it always fail when batchsize is larger than 1. We have removed the stopping criteria, still the error appears. any suggestion on how to fix it?

yzxyzh avatar May 11 '23 11:05 yzxyzh

Do you mean it will give error when image batch size is larger than 1?

Also, some error log will be helpful

penghe2021 avatar May 11 '23 17:05 penghe2021

maybe it is the conversation train bug, vicuna also does not support batch>1 inference

Ucas-HaoranWei avatar May 13 '23 08:05 Ucas-HaoranWei