THUDM / ChatGLM2-6B

ChatGLM2-6B: An Open Bilingual Chat LLM | 开源双语对话语言模型
Other
15.71k stars 1.85k forks source link

[BUG/Help] <title>本地调用模型失败,报错'ChatGLMTokenizer' object has no attribute 'tokenizer' #574

Open arx-night opened 1 year ago

arx-night commented 1 year ago

Is there an existing issue for this?

Current Behavior

就是采用最简单的chatGlm演示demo,然后发现报错 'ChatGLMTokenizer' object has no attribute 'tokenizer'

Expected Behavior

No response

Steps To Reproduce

image 就是采用最简单的demo,然后chatGLM模型是我这边从hugging face官网上手动下载的 image 结果却报了这个错,是我这边下载的方式不对吗?还是模型有问题? image

Environment

- OS:Ubuntu   20.04.5
- Python: 3.8.10
- Transformers: 4.26.1
- PyTorch: 1.12
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?

No response

xieyongshuai commented 1 year ago

有解决吗?同问

shenlijungg commented 1 year ago

刚下载也是一样的问题

xieyongshuai commented 1 year ago

已解决,去huggface下最新的模型

shenlijungg commented 1 year ago

@xieyongshuai 我是清华的地址下载的,不能用吗

edisonwd commented 1 year ago

有解决吗?同问

如果 transformers==4.34.0 会报 'ChatGLMTokenizer' object has no attribute 'tokenizer' 解决方法是,降低 transformers 版本,安装下面的版本可以正常运行:

pip install transformers==4.33.2