Set low_cpu_mem_usage=True by default (fix)

This commit is contained in:
Aleksandr Borzunov 2022-11-29 09:05:49 +00:00
parent 86d08bf515
commit 3a37e4fa44

View File

@ -113,7 +113,7 @@ class _BloomPreTrainedModelWithModifiedDefaults(BloomPreTrainedModel):
def from_pretrained(cls, *args, low_cpu_mem_usage: Optional[bool] = None, **kwargs):
if low_cpu_mem_usage is None:
low_cpu_mem_usage = True
return super().from_pretrained(*args, **kwargs)
return super().from_pretrained(*args, low_cpu_mem_usage=low_cpu_mem_usage, **kwargs)
from_pretrained.__doc__ = BloomPreTrainedModel.from_pretrained.__doc__.replace(
"low_cpu_mem_usage(`bool`, *optional*)",