You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: Error(s) in loading state_dict for LlavaLlamaForCausalLM:
size mismatch for model.mm_projector.0.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([2097152, 1]).
size mismatch for model.mm_projector.2.weight: copying a param with shape torch.Size([4096, 4096]) from checkpoint, the shape in current model is torch.Size([8388608, 1]).
Here is the error.
Below is my code:
importtorchfromvideollava.constantsimportIMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKENfromvideollava.conversationimportconv_templates, SeparatorStylefromvideollava.model.builderimportload_pretrained_modelfromvideollava.utilsimportdisable_torch_initfromvideollava.mm_utilsimporttokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteriadefmain():
disable_torch_init()
video='videollava/serve/examples/sample_demo_1.mp4'inp='Why is this video funny?'model_path="./checkpoints/videollava-7b-lora_11_26"model_base='pretrained_weights/LanguageBind/Video-LLaVA-7B'cache_dir='cache_dir'device='cuda'load_4bit, load_8bit=True, Falsemodel_name=get_model_name_from_path(model_path)
tokenizer, model, processor, _=load_pretrained_model(model_path, model_base, model_name, load_8bit, load_4bit, device=device, cache_dir=cache_dir)
BTW, I am using finetune_lora.sh as my training script!
Do you know how to solve this issue? Many thanks!
The text was updated successfully, but these errors were encountered:
Here is the error.
Below is my code:
BTW, I am using finetune_lora.sh as my training script!
Do you know how to solve this issue? Many thanks!
The text was updated successfully, but these errors were encountered: