Minor changes

This commit is contained in:
oobabooga 2023-03-31 14:33:46 -03:00
parent 9d1dcf880a
commit 4c27562157
2 changed files with 4 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,4 +1,3 @@
.vscode
cache
characters
training/datasets
@ -15,6 +14,7 @@ torch-dumps
*/*/pycache*
venv/
.venv/
.vscode
repositories
settings.json

View File

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