Open Aether-star opened 1 month ago
https://github.com/jingyaogong/minimind-v/issues/10
参考这个issue解决,试试是否可行😊
感谢博主的回复 已经解决了 问题出在clip模型的比较大,导致clone不下来,手动下载后出现了一些bug,于是我使用git lfs clone https://hf-mirror.com/openai/clip-vit-base-patch32命令,成功将clip模型克隆下来就好了。
感谢博主的回复 已经解决了 问题出在clip模型的比较大,导致clone不下来,手动下载后出现了一些bug,于是我使用git lfs clone https://hf-mirror.com/openai/clip-vit-base-patch32命令,成功将clip模型克隆下来就好了。
ok, no thanks
(minimindv) root@autodl-container-651142bf34-3b6ccf84:~/minimind-v# sudo apt-get install git-lfs Reading package lists... Done Building dependency tree... Done Reading state information... Done git-lfs is already the newest version (3.0.2-1ubuntu0.2). 0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.
(minimindv) root@autodl-container-651142bf34-3b6ccf84:~/minimind-v# git lfs install Updated git hooks. Git LFS initialized.
(minimindv) root@autodl-container-651142bf34-3b6ccf84:~/minimind-v# git lfs pull
(minimindv) root@autodl-container-651142bf34-3b6ccf84:~/minimind-v# python 1-pretrain_vlm.py 模型可学习参数: 27.272192 百万 = 0.027272192 B (Billion) Traceback (most recent call last): File "/root/miniconda3/envs/minimindv/lib/python3.9/site-packages/transformers/modeling_utils.py", line 575, in load_state_dict return torch.load( File "/root/miniconda3/envs/minimindv/lib/python3.9/site-packages/torch/serialization.py", line 1027, in load raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None _pickle.UnpicklingError: Weights only load failed. Re-running
torch.load
withweights_only
set toFalse
will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported operand 118During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/minimind-v/1-pretrain_vlm.py", line 197, in
model, tokenizer, (vision_model, preprocess) = init_model(lm_config)
File "/root/minimind-v/1-pretrain_vlm.py", line 131, in init_model
(vision_model, preprocess) = get_vision_model()
File "/root/minimind-v/model/vision_utils.py", line 13, in get_vision_model
model = CLIPModel.from_pretrained(model_path)
File "/root/miniconda3/envs/minimindv/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3738, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/root/miniconda3/envs/minimindv/lib/python3.9/site-packages/transformers/modeling_utils.py", line 585, in load_state_dict
raise OSError(
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run
git lfs install
followed bygit lfs pull
in the folder you cloned.