bge-small-zh加载错误
Hello, I downloaded the weights from the Hugging Face mirror, but when loading the model using FlagModel or SentenceTransformer methods, the following issues occur. How can I solve this.
Traceback (most recent call last): File "/home/ai/anaconda3/envs/langchain_chatchat/lib/python3.10/site-packages/transformers/modeling_utils.py", line 519, in load_state_dict return torch.load(checkpoint_file, map_location=map_location) File "/home/ai/anaconda3/envs/langchain_chatchat/lib/python3.10/site-packages/torch/serialization.py", line 815, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/ai/anaconda3/envs/langchain_chatchat/lib/python3.10/site-packages/torch/serialization.py", line 1033, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/ai/HDD/Teamwork/FlagEmbedding-master/test/test_bge_small.py", line 32, in git lfs install followed by git lfs pull in the folder you cloned.
Hi, @sevenandseven , It looks like you haven't downloaded the model files correctly(OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pull in the folder you cloned.). You can refer to this link: https://hf-mirror.com/ to learn how to download the model from hf mirror.