From 4c275621572bc6719ebc30f715184bb4d5477e38 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:33:46 -0300 Subject: [PATCH] Minor changes --- .gitignore | 2 +- modules/models.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index aec1f1cf..bfb6d027 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.vscode cache characters training/datasets @@ -15,6 +14,7 @@ torch-dumps */*/pycache* venv/ .venv/ +.vscode repositories settings.json diff --git a/modules/models.py b/modules/models.py index e9fed4a9..80bbcab2 100644 --- a/modules/models.py +++ b/modules/models.py @@ -42,8 +42,7 @@ def load_model(model_name): t0 = time.time() shared.is_RWKV = 'rwkv-' in model_name.lower() - shared.is_llamacpp = model_name.lower().startswith('llamacpp-') or \ - model_name.lower().startswith('alpaca-cpp-') + shared.is_llamacpp = model_name.lower().startswith(('llamacpp', 'alpaca-cpp')) # Default settings if not any([shared.args.cpu, shared.args.load_in_8bit, shared.args.wbits, shared.args.auto_devices, shared.args.disk, shared.args.gpu_memory is not None, shared.args.cpu_memory is not None, shared.args.deepspeed, shared.args.flexgen, shared.is_RWKV, shared.is_llamacpp]): @@ -102,11 +101,11 @@ def load_model(model_name): model = load_quantized(model_name) - # LLAMACPP model + # llamacpp model elif shared.is_llamacpp: from modules.llamacpp_model import LlamaCppModel - if model_name.lower().startswith('alpaca-'): + if model_name.lower().startswith('alpaca-cpp'): model_file = f'models/{model_name}/ggml-alpaca-7b-q4.bin' else: model_file = f'models/{model_name}/ggml-model-q4_0.bin'