Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
0e92a92
1
Parent(s):
a0c076d
actual fix
Browse files- llama_lora/models.py +4 -4
llama_lora/models.py
CHANGED
@@ -85,14 +85,14 @@ def load_base_model():
|
|
85 |
torch_dtype=torch.float16,
|
86 |
)
|
87 |
else:
|
88 |
-
|
89 |
base_model, device_map={"": device}, low_cpu_mem_usage=True
|
90 |
)
|
91 |
|
92 |
# unwind broken decapoda-research config
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
|
98 |
def unload_models():
|
|
|
85 |
torch_dtype=torch.float16,
|
86 |
)
|
87 |
else:
|
88 |
+
Global.loaded_base_model = LlamaForCausalLM.from_pretrained(
|
89 |
base_model, device_map={"": device}, low_cpu_mem_usage=True
|
90 |
)
|
91 |
|
92 |
# unwind broken decapoda-research config
|
93 |
+
Global.loaded_base_model.config.pad_token_id = Global.loaded_tokenizer.pad_token_id = 0 # unk
|
94 |
+
Global.loaded_base_model.config.bos_token_id = 1
|
95 |
+
Global.loaded_base_model.config.eos_token_id = 2
|
96 |
|
97 |
|
98 |
def unload_models():
|