Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -544,6 +544,9 @@ linear_proj = mm_backbone_mlp_model.mm_projector
|
|
544 |
|
545 |
# 1. Load the pretrained weights
|
546 |
pretrained_llm_checkpoint = lazy_load(pretrained_llm_path)
|
|
|
|
|
|
|
547 |
# 2. Load the fine-tuned LoRA weights
|
548 |
lora_checkpoint = lazy_load(lora_path)
|
549 |
for key, value in lora_checkpoint.items():
|
|
|
544 |
|
545 |
# 1. Load the pretrained weights
|
546 |
pretrained_llm_checkpoint = lazy_load(pretrained_llm_path)
|
547 |
+
for key, value in pretrained_llm_checkpoint.items():
|
548 |
+
if isinstance(value, torch.Tensor):
|
549 |
+
pretrained_llm_checkpoint[key] = value.to('cpu')
|
550 |
# 2. Load the fine-tuned LoRA weights
|
551 |
lora_checkpoint = lazy_load(lora_path)
|
552 |
for key, value in lora_checkpoint.items():
|