From 74f79081d1561043b1f52b68ba6674d76ffa707b Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Mon, 17 Jan 2022 13:13:54 -0500 Subject: [PATCH] Use `vars.model_type` to check for GPT-2 models --- aiserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiserver.py b/aiserver.py index 62cc4199..d1a7efc8 100644 --- a/aiserver.py +++ b/aiserver.py @@ -917,9 +917,9 @@ if(not vars.model in ["InferKit", "Colab", "OAI", "ReadOnly", "TPUMeshTransforme # We must disable low_cpu_mem_usage (by setting lowmem to {}) if # using a GPT-2 model because GPT-2 is not compatible with this # feature yet - if("/" not in vars.model and vars.model.lower().startswith("gpt2")): + if(vars.model_type == "gpt2"): lowmem = {} - + # Download model from Huggingface if it does not exist, otherwise load locally if(os.path.isdir(vars.custmodpth)): with(maybe_use_float16()):