Open Xls1994 opened 7 months ago
是的,可以提高transformers版本,比如4.37
这个有没有推荐的版本呢,随便升级可能会导致我们其他的环境出问题
是的,可以提高transformers版本,比如4.37
升到4.37.0和4.38.2又报了这个错误
`File /root/anaconda3/envs/rerank-rom/lib/python3.10/site-packages/transformers/tokenization_utils_fast.py:111, in PreTrainedTokenizerFast.init(self, *args, **kwargs) 108 fast_tokenizer = copy.deepcopy(tokenizer_object) 109 elif fast_tokenizer_file is not None and not from_slow: 110 # We have a serialization from tokenizers which let us directly build the backend --> 111 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file) 112 elif slow_tokenizer is not None: 113 # We need to convert a slow tokenizer to build the backend 114 fast_tokenizer = convert_slow_tokenizer(slow_tokenizer)
Exception: expected value at line 1 column 1`
是的,可以提高transformers版本,比如4.37
升到4.37.0和4.38.2又报了这个错误
`File /root/anaconda3/envs/rerank-rom/lib/python3.10/site-packages/transformers/tokenization_utils_fast.py:111, in PreTrainedTokenizerFast.init(self, *args, **kwargs) 108 fast_tokenizer = copy.deepcopy(tokenizer_object) 109 elif fast_tokenizer_file is not None and not from_slow: 110 # We have a serialization from tokenizers which let us directly build the backend --> 111 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file) 112 elif slow_tokenizer is not None: 113 # We need to convert a slow tokenizer to build the backend 114 fast_tokenizer = convert_slow_tokenizer(slow_tokenizer)
Exception: expected value at line 1 column 1`
我这边测试 transformers 版本 4.37.0 没有遇到这个问题。
调用BGE的M3模型时候,官方的示例代码,出现了下面这个问题。看起来像是transformer版本问题导致的。
sentence-transformers 2.2.2 transformers 4.34.1 FlagEmbedding 1.2.5
代码