Spaces:
Runtime error
Runtime error
Vision-CAIR
commited on
Commit
β’
9363007
1
Parent(s):
7915151
Update minigpt4/models/mini_gpt4.py
Browse files
minigpt4/models/mini_gpt4.py
CHANGED
@@ -92,11 +92,11 @@ class MiniGPT4(Blip2Base):
|
|
92 |
|
93 |
if llama_cache_dir:
|
94 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
95 |
-
llama_model, load_in_8bit=True, torch_dtype=torch.float16, device_map={'': 0}, cache_dir=llama_cache_dir
|
96 |
)
|
97 |
else:
|
98 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
99 |
-
llama_model, load_in_8bit=True, torch_dtype=torch.float16, device_map={'': 0}
|
100 |
)
|
101 |
for name, param in self.llama_model.named_parameters():
|
102 |
param.requires_grad = False
|
|
|
92 |
|
93 |
if llama_cache_dir:
|
94 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
95 |
+
llama_model, load_in_8bit=True, torch_dtype=torch.float16, device_map={'': 0}, cache_dir=llama_cache_dir, from_tf=True
|
96 |
)
|
97 |
else:
|
98 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
99 |
+
llama_model, load_in_8bit=True, torch_dtype=torch.float16, device_map={'': 0}, from_tf=True
|
100 |
)
|
101 |
for name, param in self.llama_model.named_parameters():
|
102 |
param.requires_grad = False
|