From 3a37e4fa44d13c0bd210a68ef054c5ab101992ee Mon Sep 17 00:00:00 2001 From: Aleksandr Borzunov Date: Tue, 29 Nov 2022 09:05:49 +0000 Subject: [PATCH] Set low_cpu_mem_usage=True by default (fix) --- src/bloom/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bloom/model.py b/src/bloom/model.py index 566020d..d63695e 100644 --- a/src/bloom/model.py +++ b/src/bloom/model.py @@ -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*)",