diff --git a/lmms_eval/models/gemini_api.py b/lmms_eval/models/gemini_api.py index 3fb1d39f..1d5a7706 100644 --- a/lmms_eval/models/gemini_api.py +++ b/lmms_eval/models/gemini_api.py @@ -52,6 +52,7 @@ def __init__( self.timeout = timeout self.model = genai.GenerativeModel(model_version) self.continual_mode = continual_mode + self.response_persistent_file = "" self.interleave = interleave # if self.continual_mode and response_persistent_folder is None: # raise ValueError("Continual mode requires a persistent path for the response. We will cache the Gemini API response in this path and use it for future requests. Please provide a valid path.") diff --git a/lmms_eval/models/internvl2.py b/lmms_eval/models/internvl2.py index c21df9bd..a9f28415 100644 --- a/lmms_eval/models/internvl2.py +++ b/lmms_eval/models/internvl2.py @@ -312,7 +312,7 @@ def generate_until(self, requests) -> List[str]: contexts = image_tokens + "\n" + contexts else: pixel_values = None - num_patch_list = None + num_patches_list = None response, history = self.model.chat(self.tokenizer, pixel_values, contexts, gen_kwargs, num_patches_list=num_patches_list, history=None, return_history=True) elif self.modality == "video": assert len(visuals) == 1, f"Only one video is supported, but got {len(visuals)} videos."