Various changes

This commit is contained in:
oobabooga 2023-07-04 18:50:01 -07:00
parent b9a3d28177
commit 31c297d7e0
3 changed files with 2 additions and 8 deletions

View file

@ -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"

View file

@ -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'

View file

@ -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/")]: