Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect.
Loading checkpoint shards: 50%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 1/2 [00:03<00:03, 3.53s/it]
Traceback (most recent call last):
File "/home/zzj/GeoChat/geochat_demo.py", line 54, in
Same too.
I have been solved the problem, but I think it is not the best way.
Maybe you need to add ignore_mismatched_sizes=True,
in geochat/train/train.py#L802
then you will get the next error
RuntimeError: Error(s) in loading state_dict for Sequential:
Missing key(s) in state_dict: "0.weight", "0.bias", "2.weight", "2.bias".
hello, do you fixed this error?
hello, do you fixed this error?
Hey, I think it is necessary to use the same checkpoint to solve this problem. I try to extract the projector from the finally checkpoint, then it work. But I found that author say they use a different VIT, you can see here.
Hope that helps.
Loading checkpoint shards: 50%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 1/2 [00:03<00:03, 3.53s/it] Traceback (most recent call last): File "/home/zzj/GeoChat/geochat_demo.py", line 54, in tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device) File "/home/zzj/GeoChat/geochat/model/builder.py", line 104, in load_pretrained_model model = GeoChatLlamaForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained ) = cls._load_pretrained_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3260, in _load_pretrained_model new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 717, in _load_state_dict_into_meta_model set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 358, in set_module_tensor_to_device raise ValueError( ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect.
Same too. Do you have a good solution?
hello, do you fixed this error?
Hey, I think it is necessary to use the same checkpoint to solve this problem. I try to extract the projector from the finally checkpoint, then it work. But I found that author say they use a different VIT, you can see here.
Hope that helps.
Thank you
Loading checkpoint shards: 50%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 1/2 [00:03<00:03, 3.53s/it] Traceback (most recent call last): File "/home/zzj/GeoChat/geochat_demo.py", line 54, in tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device) File "/home/zzj/GeoChat/geochat/model/builder.py", line 104, in load_pretrained_model model = GeoChatLlamaForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained ) = cls._load_pretrained_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3260, in _load_pretrained_model new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 717, in _load_state_dict_into_meta_model set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 358, in set_module_tensor_to_device raise ValueError( ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect.
Same too. Do you have a good solution?
ๅปบ่ฎฎไฝ ๅreadme.mdไธญ่ฏด็้ฃๆ ท๏ผๅ git pull ๏ผ็ถๅๆไปhuggingfaceไธ่ฝฝ็ๆ้ๆไปถๆพๅจ็ฑปไผผweights/geochat่ฟๆ ท็ปๆ็ๆไปถๅคนไธญ๏ผๅบ่ฏฅๅฐฑๅฏไปฅไบ
Loading checkpoint shards: 50%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 1/2 [00:03<00:03, 3.53s/it] Traceback (most recent call last): File "/home/zzj/GeoChat/geochat_demo.py", line 54, in tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device) File "/home/zzj/GeoChat/geochat/model/builder.py", line 104, in load_pretrained_model model = GeoChatLlamaForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained ) = cls._load_pretrained_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3260, in _load_pretrained_model new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model( File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 717, in _load_state_dict_into_meta_model set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs) File "/home/ps/anaconda3/envs/geochat/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 358, in set_module_tensor_to_device raise ValueError( ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect.
Same too. Do you have a good solution?
ๅปบ่ฎฎไฝ ๅreadme.mdไธญ่ฏด็้ฃๆ ท๏ผๅ git pull ๏ผ็ถๅๆไปhuggingfaceไธ่ฝฝ็ๆ้ๆไปถๆพๅจ็ฑปไผผweights/geochat่ฟๆ ท็ปๆ็ๆไปถๅคนไธญ๏ผๅบ่ฏฅๅฐฑๅฏไปฅไบ
ๅฅๆชไบ๏ผๆ็กฎๅฎๆฏๆ็ ง่ฟไธชๆญฅ้ชค่ฟ่ก็ใๅชไธ่ฟๆๆ้ๅญๅจๅจ GeoChat-7B/ ่ทฏๅพ
่ฟๆไธไธช้ฎ้ขๅฐฑๆฏๆ็ clip-vit-large-patch14-336 ๆ้ๆฏ็ฆป็บฟไธ่ฝฝๅฅฝไบ๏ผ้ๆฐๅฎไนไบself.vision_tower_name ่ฟไธชๆ้่ทฏๅพ๏ผ็ดๆฅ็ฆป็บฟ load ็ใๅฐฑๅชๆ่ฟไธชๆญฅ้ชคไธไธๆ ท๏ผ่ๆบไปฃ็ ๅบ่ฏฅๆฏ็ดๆฅ่ชๅจๅจ HF ๅจ็บฟload็๏ผ่ฏฅไธไผๆฏ่ฟไธชๅฏผ่ด็้ฎ้ขๅง๏ผ
Same too.
Hello, could you tell me how to specifically resolve this error?