Kent0n-Li / ChatDoctor

Apache License 2.0
3.48k stars 405 forks source link

AttributeError: module transformers has no attribute LLaMATokenizer #33

Open hayleeXinyi opened 1 year ago

hayleeXinyi commented 1 year ago

Can`t work

hayleeXinyi commented 1 year ago

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

waleking commented 1 year ago

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