diff --git a/modules/models.py b/modules/models.py index b87d3cd..2ec2a57 100644 --- a/modules/models.py +++ b/modules/models.py @@ -114,7 +114,7 @@ def load_tokenizer(model_name, model): tokenizer = None if shared.model_type == 'gpt4chan' and Path(f"{shared.args.model_dir}/gpt-j-6B/").exists(): tokenizer = AutoTokenizer.from_pretrained(Path(f"{shared.args.model_dir}/gpt-j-6B/")) - elif type(model) is transformers.LlamaForCausalLM: + elif type(model) is transformers.LlamaForCausalLM or "LlamaGPTQForCausalLM" in str(type(model)): # Try to load an universal LLaMA tokenizer if shared.model_type not in ['llava', 'oasst']: for p in [Path(f"{shared.args.model_dir}/llama-tokenizer/"), Path(f"{shared.args.model_dir}/oobabooga_llama-tokenizer/")]: