Spaces:
Sleeping
Sleeping
Update libra/model/builder.py
Browse files- libra/model/builder.py +1 -1
libra/model/builder.py
CHANGED
@@ -81,7 +81,7 @@ def load_pretrained_model(model_path, model_base, model_name, device="cpu"):
|
|
81 |
model.load_state_dict(mm_projector_weights, strict=False)
|
82 |
else:
|
83 |
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
|
84 |
-
model = LibraLlamaForCausalLM.from_pretrained(model_path,
|
85 |
else:
|
86 |
# Load language model
|
87 |
if model_base is not None:
|
|
|
81 |
model.load_state_dict(mm_projector_weights, strict=False)
|
82 |
else:
|
83 |
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
|
84 |
+
model = LibraLlamaForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs)
|
85 |
else:
|
86 |
# Load language model
|
87 |
if model_base is not None:
|