jedyang97 commited on
Commit
f2c4ee8
β€’
1 Parent(s): 7cb0f3c

correct model loading logic

Browse files
Files changed (26) hide show
  1. app.py +1 -1
  2. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/README.md +0 -0
  3. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/adapter_config.json +0 -0
  4. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/adapter_model.bin +0 -0
  5. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/config.json +0 -0
  6. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/latest +0 -0
  7. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/non_lora_trainables.bin +0 -0
  8. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_0.pth +0 -0
  9. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_1.pth +0 -0
  10. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_10.pth +0 -0
  11. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_11.pth +0 -0
  12. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_2.pth +0 -0
  13. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_3.pth +0 -0
  14. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_4.pth +0 -0
  15. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_5.pth +0 -0
  16. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_6.pth +0 -0
  17. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_7.pth +0 -0
  18. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_8.pth +0 -0
  19. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_9.pth +0 -0
  20. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/special_tokens_map.json +0 -0
  21. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/tokenizer.model +0 -0
  22. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/tokenizer_config.json +0 -0
  23. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/trainer_state.json +0 -0
  24. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/training_args.bin +0 -0
  25. checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/zero_to_fp32.py +0 -0
  26. llava/model/builder.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ from session import Session
26
  from model import load_model_and_dataloader, get_model_response
27
 
28
  # Load model and tokenizer once at the start
29
- model_path = "checkpoints/lora_grounded_obj_ref_checkpoint-4896"
30
  model_base = "checkpoints/llava-llama-2-7b-chat-lightning-preview"
31
  load_8bit = False
32
  load_4bit = False
 
26
  from model import load_model_and_dataloader, get_model_response
27
 
28
  # Load model and tokenizer once at the start
29
+ model_path = "checkpoints/llava_lora_grounded_obj_ref_checkpoint-4896"
30
  model_base = "checkpoints/llava-llama-2-7b-chat-lightning-preview"
31
  load_8bit = False
32
  load_4bit = False
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/README.md RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/adapter_config.json RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/adapter_model.bin RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/config.json RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/latest RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/non_lora_trainables.bin RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_0.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_1.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_10.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_11.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_2.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_3.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_4.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_5.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_6.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_7.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_8.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/rng_state_9.pth RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/special_tokens_map.json RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/tokenizer.model RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/tokenizer_config.json RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/trainer_state.json RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/training_args.bin RENAMED
File without changes
checkpoints/{lora_grounded_obj_ref_checkpoint-4896 β†’ llava_lora_grounded_obj_ref_checkpoint-4896}/zero_to_fp32.py RENAMED
File without changes
llava/model/builder.py CHANGED
@@ -197,7 +197,7 @@ def load_pretrained_model(
197
  model_base,
198
  torch_dtype=torch.bfloat16,
199
  low_cpu_mem_usage=True,
200
- device_map="auto",
201
  )
202
  print(f"Loading LoRA weights from {model_path}")
203
  model = PeftModel.from_pretrained(model, model_path)
 
197
  model_base,
198
  torch_dtype=torch.bfloat16,
199
  low_cpu_mem_usage=True,
200
+ device_map=device_map,
201
  )
202
  print(f"Loading LoRA weights from {model_path}")
203
  model = PeftModel.from_pretrained(model, model_path)