mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 23:57:58 +01:00
Minor changes
This commit is contained in:
parent
9d1dcf880a
commit
4c27562157
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
.vscode
|
||||
cache
|
||||
characters
|
||||
training/datasets
|
||||
@ -15,6 +14,7 @@ torch-dumps
|
||||
*/*/pycache*
|
||||
venv/
|
||||
.venv/
|
||||
.vscode
|
||||
repositories
|
||||
|
||||
settings.json
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user