Disable lazy loader when using GPT-2

This commit is contained in:
Gnome Ann 2022-06-18 23:54:11 -04:00
parent f9732eb143
commit 1380eb0bb0
1 changed files with 1 additions and 0 deletions

View File

@ -1804,6 +1804,7 @@ def load_model(use_gpu=True, gpu_layers=None, initial_load=False, online_model="
# feature yet # feature yet
if(vars.model_type == "gpt2"): if(vars.model_type == "gpt2"):
lowmem = {} lowmem = {}
vars.lazy_load = False # Also, lazy loader doesn't support GPT-2 models
# If we're using torch_lazy_loader, we need to get breakmodel config # If we're using torch_lazy_loader, we need to get breakmodel config
# early so that it knows where to load the individual model tensors # early so that it knows where to load the individual model tensors