Support for MPT, INCITE, WizardLM, StableLM, Galactica, Vicuna, Guanaco, and Baize instruction following (#1596)

This commit is contained in:
Carl Kenner 2023-05-10 09:07:31 +09:30 committed by GitHub
parent 06c7db017d
commit 814f754451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 352 additions and 28 deletions

View file

@ -145,12 +145,12 @@ def load_quantized(model_name):
# Find the model type
if not shared.args.model_type:
name = model_name.lower()
if any((k in name for k in ['llama', 'alpaca', 'vicuna', 'llava'])):
model_type = 'llama'
elif any((k in name for k in ['opt-', 'galactica'])):
if any((k in name for k in ['opt-', 'opt_', 'opt1', 'opt3', 'optfor', 'galactica', 'galpaca', 'pygmalion-350m'])):
model_type = 'opt'
elif any((k in name for k in ['gpt-j', 'pygmalion-6b'])):
elif any((k in name for k in ['gpt-j', 'gptj', 'gpt4all-j', 'malion-6b', 'pygway'])):
model_type = 'gptj'
elif any((k in name for k in ['llama', 'alpac', 'vicuna', 'guanaco', 'koala', 'llava', 'wizardlm'])):
model_type = 'llama'
else:
logging.error("Can't determine model type from model name. Please specify it manually using --model_type argument")
exit()