Spaces:
Runtime error
Runtime error
praeclarumjj3
commited on
Commit
•
fd61424
1
Parent(s):
4c193e6
Update vcoder_llava/model/builder.py
Browse files
vcoder_llava/model/builder.py
CHANGED
@@ -79,9 +79,9 @@ def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, l
|
|
79 |
# this may be mm projector only
|
80 |
print('Loading LLaVA from base model...')
|
81 |
if 'vcoder_ds_llava' in model_name.lower():
|
82 |
-
tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False
|
83 |
-
cfg_pretrained = AutoConfig.from_pretrained(model_path
|
84 |
-
model = VCoderDSLlavaLlamaForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True,
|
85 |
elif 'vcoder_llava' in model_name.lower():
|
86 |
tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False)
|
87 |
cfg_pretrained = AutoConfig.from_pretrained(model_path)
|
|
|
79 |
# this may be mm projector only
|
80 |
print('Loading LLaVA from base model...')
|
81 |
if 'vcoder_ds_llava' in model_name.lower():
|
82 |
+
tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False)
|
83 |
+
cfg_pretrained = AutoConfig.from_pretrained(model_path)
|
84 |
+
model = VCoderDSLlavaLlamaForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True, config=cfg_pretrained, **kwargs)
|
85 |
elif 'vcoder_llava' in model_name.lower():
|
86 |
tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False)
|
87 |
cfg_pretrained = AutoConfig.from_pretrained(model_path)
|