Move 7bn changes into dockerfile.

This commit is contained in:
Andy Barry
2023-04-08 01:21:17 -04:00
parent 2e5aaf6dd6
commit 31614fc2c4
3 changed files with 8 additions and 102 deletions

View File

@@ -9,9 +9,9 @@ patch_encode_func = False
def load_model_llama(*args, **kwargs):
config_path = '../llama-7b-4bit/'
model_path = '../llama-7b-4bit.pt'
lora_path = '../alpaca7b_lora/'
config_path = '../llama-13b-4bit/'
model_path = '../llama-13b-4bit.pt'
lora_path = '../alpaca13b_lora/'
print("Loading {} ...".format(model_path))
t0 = time.time()
@@ -27,8 +27,6 @@ def load_model_llama(*args, **kwargs):
if m.groupsize == -1:
m.zeros = m.zeros.half()
m.scales = m.scales.half()
# This line failed for me, commenting it out seems to work...
m.bias = m.bias.half()
autograd_4bit.use_new = True
autograd_4bit.auto_switch = True
@@ -39,7 +37,7 @@ def load_model_llama(*args, **kwargs):
from modules import models
from modules import shared
models.load_model = load_model_llama
shared.args.model = 'llama-7b-4bit'
shared.args.model = 'llama-13b-4bit'
shared.settings['name1'] = 'You'
shared.settings['name2'] = 'Assistant'
shared.settings['chat_prompt_size_max'] = 2048