Skip to content

Commit 3463651

Browse files
committed
Remove handling non-visual loop in llava
1 parent efb5295 commit 3463651

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lmms_eval/models/llava.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,6 @@ def _collate(x):
358358
prompt_question = conv.get_prompt()
359359
question_input.append(prompt_question)
360360

361-
# The above for loop has bugs. When there is no visuals, e.g. pure text,
362-
# there will be no for loop execute resulting in an empty question_input (because no visuals)
363-
# Scenario 1 won't even be execute
364-
if len(flattened_visuals) == 0:
365-
for context in contexts:
366-
question = context
367-
conv = conv_templates[self.conv_template].copy()
368-
conv.append_message(conv.roles[0], question)
369-
conv.append_message(conv.roles[1], None)
370-
prompt_question = conv.get_prompt()
371-
question_input.append(prompt_question)
372361

373362
# input_ids = tokenizer_image_token(prompt, self.tokenizer, IMAGE_TOKEN_INDEX, return_tensors="pt").unsqueeze(0).to(self.device)
374363
# preconfigure gen_kwargs with defaults

0 commit comments

Comments
 (0)