Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File "/root/anaconda3/envs/llm/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 847, in __init__ setattr(self, key, value) AttributeError: can't set attribute 'eos_token' #121

Open
zzdxjtu opened this issue Dec 15, 2023 · 2 comments

Comments

@zzdxjtu
Copy link

zzdxjtu commented Dec 15, 2023

截屏2023-12-15 下午6 37 03 你好,想问问这个是什么原因?
@liucongg
Copy link
Owner

liucongg commented Jan 7, 2024

应该是tokenizer文件的问题

@InnoFang
Copy link

InnoFang commented Mar 3, 2024

我也遇到了同样的报错,报错信息如下:

File "/mnt/d/Projects/Python/ChatGLM-Finetuning/glm3/tokenization_chatglm.py", line 108, in __init__
    super().__init__(padding_side=padding_side, clean_up_tokenization_spaces=clean_up_tokenization_spaces,

显示报错代码出现在了 glm3/tokenization_chatglm.py 代码中。

所以我从最新的 ChatGLM3-6B 的 Huggingface 页面中,下载最新的 tokenization_chatglm.py 文件,并替换该项目下的 glm3/tokenization_chatglm.py 文件。

经修改后,我的问题已解决,代码可以正常运行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants