Spaces:
Runtime error
Runtime error
Vision-CAIR
commited on
Commit
β’
66bc8c0
1
Parent(s):
d66bcec
Update minigpt4/models/mini_gpt4.py
Browse files
minigpt4/models/mini_gpt4.py
CHANGED
@@ -88,16 +88,16 @@ class MiniGPT4(Blip2Base):
|
|
88 |
|
89 |
print('Loading LLAMA')
|
90 |
print('API_token:', os.environ["API_TOKEN"])
|
91 |
-
self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna-7b', use_fast=False, use_auth_token=
|
92 |
self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
|
93 |
|
94 |
if llama_cache_dir:
|
95 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
96 |
-
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=
|
97 |
)
|
98 |
else:
|
99 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
100 |
-
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=
|
101 |
)
|
102 |
for name, param in self.llama_model.named_parameters():
|
103 |
param.requires_grad = False
|
|
|
88 |
|
89 |
print('Loading LLAMA')
|
90 |
print('API_token:', os.environ["API_TOKEN"])
|
91 |
+
self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna-7b', use_fast=False, use_auth_token='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')
|
92 |
self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
|
93 |
|
94 |
if llama_cache_dir:
|
95 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
96 |
+
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token='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'
|
97 |
)
|
98 |
else:
|
99 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
100 |
+
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token='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'
|
101 |
)
|
102 |
for name, param in self.llama_model.named_parameters():
|
103 |
param.requires_grad = False
|