"`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."
"`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."
)
)
assert(
assertnotparallelize,"`parallelize=True` is not compatible with passing pre-initialized model to `pretrained`"
notparallelize
),"`parallelize=True` is not compatible with passing pre-initialized model to `pretrained`"
# or any other option that preloads model onto device
# or any other option that preloads model onto device
try:
try:
self.model.to(self.device)
self.model.to(self.device)
exceptValueError:
exceptValueError:
eval_logger.info(
eval_logger.debug(
"Failed to place model onto specified device. This may be because the model is quantized via `bitsandbytes`. If the desired GPU is being used, this message is safe to ignore."
"Failed to place model onto specified device. This may be because the model is quantized via `bitsandbytes` or `device_map` is provided. If the desired GPU is being used, this message is safe to ignore."