From 31c297d7e04e02f1aeb92215fea69dbd06101404 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 4 Jul 2023 18:50:01 -0700 Subject: [PATCH] Various changes --- characters/instruction-following/Xgen | 4 ---- models/config.yaml | 4 ++-- modules/models.py | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 characters/instruction-following/Xgen diff --git a/characters/instruction-following/Xgen b/characters/instruction-following/Xgen deleted file mode 100644 index c7b76d32..00000000 --- a/characters/instruction-following/Xgen +++ /dev/null @@ -1,4 +0,0 @@ -user: "### Human:" -bot: "### Assistant:" -turn_template: "<|user|><|user-message|>\n<|bot|><|bot-message|>\n" -context: "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\n\n" diff --git a/models/config.yaml b/models/config.yaml index 9e81def1..d81eac94 100644 --- a/models/config.yaml +++ b/models/config.yaml @@ -240,6 +240,6 @@ TheBloke_WizardLM-30B-GPTQ: truncation_length: 8192 .*superhot-8k: truncation_length: 8192 -.*xgen: +.*xgen.*-inst: truncation_length: 8192 - instruction_template: 'XGen' + instruction_template: 'Vicuna-v0' diff --git a/modules/models.py b/modules/models.py index d6a3585f..f12e700c 100644 --- a/modules/models.py +++ b/modules/models.py @@ -94,8 +94,6 @@ def load_tokenizer(model_name, model): if any(s in model_name.lower() for s in ['gpt-4chan', '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 model.__class__.__name__ in ['LlamaForCausalLM', 'LlamaGPTQForCausalLM', 'ExllamaHF']: - if any(s in model_name.lower() for s in ['xgen']) and Path(f"{shared.args.model_dir}/{model_name}/").exists(): - tokenizer = AutoTokenizer.from_pretrained(Path(f"{shared.args.model_dir}/{model_name}/"), trust_remote_code=shared.args.trust_remote_code) # Try to load an universal LLaMA tokenizer if not any(s in shared.model_name.lower() for s in ['llava', 'oasst']): for p in [Path(f"{shared.args.model_dir}/llama-tokenizer/"), Path(f"{shared.args.model_dir}/oobabooga_llama-tokenizer/")]: