Skip to content

Commit

Permalink
[Minor] Set the kwargs default for internvl_chat. Max_new_tokens to 1…
Browse files Browse the repository at this point in the history
…024.
  • Loading branch information
kennymckormick committed Sep 24, 2024
1 parent de1b457 commit e542cae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vlmeval/vlm/internvl_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def __init__(self, model_path='OpenGVLab/InternVL-Chat-V1-5', load_in_8bit=False

self.image_size = self.model.config.vision_config.image_size
self.version = version
self.kwargs = kwargs
kwargs_default = dict(do_sample=False, max_new_tokens=1024, top_p=None, num_beams=1)
kwargs_default.update(kwargs)
self.kwargs = kwargs_default

warnings.warn(f'Following kwargs received: {self.kwargs}, will use as generation config. ')

def use_custom_prompt(self, dataset):
Expand Down

0 comments on commit e542cae

Please sign in to comment.