Spaces:
Sleeping
Sleeping
FantasticGNU
commited on
Commit
•
cc5caab
1
Parent(s):
46df150
Update model/openllama.py
Browse files- model/openllama.py +1 -1
model/openllama.py
CHANGED
@@ -215,7 +215,7 @@ class OpenLLAMAPEFTModel(nn.Module):
|
|
215 |
# # self.llama_model = load_checkpoint_and_dispatch(self.llama_model, vicuna_ckpt_path, device_map=device_map, offload_folder="offload", offload_state_dict = True)
|
216 |
# # self.llama_model.to(torch.float16)
|
217 |
# # try:
|
218 |
-
self.llama_model = AutoModelForCausalLM.from_pretrained(vicuna_ckpt_path, torch_dtype=torch.float16, device_map='auto')
|
219 |
# # except:
|
220 |
# pass
|
221 |
# finally:
|
|
|
215 |
# # self.llama_model = load_checkpoint_and_dispatch(self.llama_model, vicuna_ckpt_path, device_map=device_map, offload_folder="offload", offload_state_dict = True)
|
216 |
# # self.llama_model.to(torch.float16)
|
217 |
# # try:
|
218 |
+
self.llama_model = AutoModelForCausalLM.from_pretrained(vicuna_ckpt_path, torch_dtype=torch.float16, device_map='auto', load_in_8bit=True)
|
219 |
# # except:
|
220 |
# pass
|
221 |
# finally:
|