Vision-CAIR commited on
Commit
eaf3b99
β€’
1 Parent(s): 9363007

Update minigpt4/models/mini_gpt4.py

Browse files
Files changed (1) hide show
  1. minigpt4/models/mini_gpt4.py +2 -2
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, 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
 
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