gpt2 fixed

This commit is contained in:
ebolam
2023-05-23 20:33:55 -04:00
parent 839d56ebf2
commit 9bd445c2a8
2 changed files with 9 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ class model_backend(HFTorchInferenceModel):
"low_cpu_mem_usage": True,
}
if utils.koboldai_vars.model_type == "gpt2":
if self.model_type == "gpt2":
# We must disable low_cpu_mem_usage and if using a GPT-2 model
# because GPT-2 is not compatible with this feature yet.
tf_kwargs.pop("low_cpu_mem_usage", None)