ChatDoctor icon indicating copy to clipboard operation
ChatDoctor copied to clipboard

AttributeError: module transformers has no attribute LLaMATokenizer

Open hayleeXinyi opened this issue 1 year ago • 2 comments

Can`t work

hayleeXinyi avatar Apr 13 '23 08:04 hayleeXinyi

我试过了transformers的三个安装形式https://huggingface.co/docs/transformers/installation#installing-from-source还有作者原来带有哈希的方式,全部都不可以。解决了一个又一个问题,跑了一下午还没跑起来。建议作者还是把环境搞好再上传吧。不要浪费大家的时间

hayleeXinyi avatar Apr 13 '23 09:04 hayleeXinyi

I also met this issue. Here is the solution from me:

  1. install the latest transformers from source code according to the official installation document: pip install git+https://github.com/huggingface/transformers
  2. check if LlamaTokenizer can be imported
from transformers import LlamaTokenizer

waleking avatar May 03 '23 15:05 waleking