),"Batch size 'auto' is not yet supported for hf-multimodal models."
assertself.batch_size!="auto",(
"Batchsize 'auto' is not yet supported for hf-multimodal models."
)
self.chat_applied:bool=False
# TODO: phi-3.5 "image placeholders" are <image_1>, <image_2>, ... in order. how to handle this case
...
...
@@ -73,9 +73,9 @@ class HFMultimodalLM(HFLM):
orgetattr(self.config,"image_token_index",None)
)
)
assert(
self.image_token_idisnotNone
),"Must have a non-None image_token_id to evaluate a Hugging Face AutoModelForVision2Seq model. Please pass `image_token_id` in `--model_args` if model's config does not already specify one."
assertself.image_token_idisnotNone,(
"Must have a non-None image_token_id to evaluate a Hugging Face AutoModelForVision2Seq model. Please pass `image_token_id` in `--model_args` if model's config does not already specify one."
"`pretrained` model kwarg is not of type `str`. Many other model arguments may be ignored. Please do not launch via accelerate or use `parallelize=True` if passing an existing model this way."
)
assertnotparallelize,"`parallelize=True` is not compatible with passing pre-initialized model to `pretrained`"
assertnotparallelize,(
"`parallelize=True` is not compatible with passing pre-initialized model to `pretrained`"