成功解决RuntimeError: Failed to import transformers.models.llama.tokenization_llama_fast because of the

成功解决RuntimeError: Failed to import transformers.models.llama.tokenization_llama_fast because of the following error (look up to see its traceback): tokenizers>=0.13.3 is required for a normal functioning of this module, but found tokenizers==0.12.1

目录


解决问题

RuntimeError: Failed to import transformers.models.llama.tokenization_llama_fast because of the following error (look up to see its traceback): tokenizers>=0.13.3 is required for a normal functioning of this module, but found tokenizers==0.12.1.

 

解决思路

运行时错误:导入transformer .models.llama失败。Tokenization_llama_fast,因为以下错误(查找查看其追溯):tokenizers>=0.13.3是该模块正常运行所必需的,但发现tokenizers==0.12.1。

解决方法

你使用的transformers库版本与所需的tokenizers版本不匹配导致的。根据错误消息,你的transformers版本要求tokenizers版本至少为0.13.3,但你安装的是0.12.1版本。

T1、pip命令

pip install --upgrade tokenizers

 

T2、conda命令

可以运行以下命令

conda install -c huggingface tokenizers

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2023年12月5日
下一篇 2023年12月5日

相关推荐