Spaces:
Runtime error
Runtime error
Nouvelle espace
#23
by
Matt600-deltaoublie0
- opened
- minigpt4/models/mini_gpt4.py +3 -3
- requirements.txt +3 -4
minigpt4/models/mini_gpt4.py
CHANGED
@@ -87,16 +87,16 @@ class MiniGPT4(Blip2Base):
|
|
87 |
print('Loading Q-Former Done')
|
88 |
|
89 |
print('Loading LLAMA')
|
90 |
-
self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna-7b', use_fast=False, use_auth_token=
|
91 |
self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
|
92 |
|
93 |
if llama_cache_dir:
|
94 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
95 |
-
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=
|
96 |
)
|
97 |
else:
|
98 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
99 |
-
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=
|
100 |
)
|
101 |
for name, param in self.llama_model.named_parameters():
|
102 |
param.requires_grad = False
|
|
|
87 |
print('Loading Q-Former Done')
|
88 |
|
89 |
print('Loading LLAMA')
|
90 |
+
self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna-7b', use_fast=False, use_auth_token=os.environ["API_TOKEN"])
|
91 |
self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
|
92 |
|
93 |
if llama_cache_dir:
|
94 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
95 |
+
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=os.environ["API_TOKEN"]
|
96 |
)
|
97 |
else:
|
98 |
self.llama_model = LlamaForCausalLM.from_pretrained(
|
99 |
+
'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=os.environ["API_TOKEN"]
|
100 |
)
|
101 |
for name, param in self.llama_model.named_parameters():
|
102 |
param.requires_grad = False
|
requirements.txt
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
2 |
-
torch==
|
|
|
3 |
salesforce-lavis
|
4 |
bitsandbytes
|
5 |
accelerate
|
6 |
-
git+https://github.com/huggingface/transformers.git
|
7 |
-
Cython==0.29.36
|
8 |
-
spacy
|
|
|
1 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
2 |
+
torch==1.12.1
|
3 |
+
torchvision==0.13.1
|
4 |
salesforce-lavis
|
5 |
bitsandbytes
|
6 |
accelerate
|
7 |
+
git+https://github.com/huggingface/transformers.git
|
|
|
|