transformers版本冲突问题
为了使用bge-reranker-v2.5-gemma2 ,将transfomers升级到4.42.2 ,但是升级transfomers以后,会导致bge-m3 报错,请问如何解决这个冲突问题?谢谢!
报错信息:
from FlagEmbedding import BGEM3FlagModel
File "/usr/local/lib/python3.8/dist-packages/FlagEmbedding/init.py", line 2, in
from .bge_m3 import BGEM3FlagModel
File "/usr/local/lib/python3.8/dist-packages/FlagEmbedding/bge_m3.py", line 10, in
from FlagEmbedding.BGE_M3 import BGEM3ForInference
File "/usr/local/lib/python3.8/dist-packages/FlagEmbedding/BGE_M3/init.py", line 2, in
from .trainer import BiTrainer
File "/usr/local/lib/python3.8/dist-packages/FlagEmbedding/BGE_M3/trainer.py", line 1, in
from sentence_transformers import SentenceTransformer, models
File "/usr/local/lib/python3.8/dist-packages/sentence_transformers/init.py", line 3, in
from .datasets import SentencesDataset, ParallelSentencesDataset
File "/usr/local/lib/python3.8/dist-packages/sentence_transformers/datasets/init.py", line 3, in
from .ParallelSentencesDataset import ParallelSentencesDataset
File "/usr/local/lib/python3.8/dist-packages/sentence_transformers/datasets/ParallelSentencesDataset.py", line 4, in
from .. import SentenceTransformer
File "/usr/local/lib/python3.8/dist-packages/sentence_transformers/SentenceTransformer.py", line 12, in
from huggingface_hub import HfApi, HfFolder, Repository, hf_hub_url, cached_download
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (/usr/local/lib/python3.8/dist-packages/huggingface_hub/init.py)