chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.16k stars 5.44k forks source link

AttributeError: 'ChatGLMTokenizer' object has no attribute 'tokenizer' #2090

Closed guiniao closed 9 months ago

guiniao commented 10 months ago

问题描述 / Problem Description 用简洁明了的语言描述这个问题 / Describe the problem in a clear and concise manner.

复现问题的步骤 / Steps to Reproduce

  1. 执行 '...' / Run '...'
  2. 点击 '...' / Click '...'
  3. 滚动到 '...' / Scroll to '...'
  4. 问题出现 / Problem occurs

预期的结果 / Expected Result 描述应该出现的结果 / Describe the expected result.

实际结果 / Actual Result 描述实际发生的结果 / Describe the actual result.

环境信息 / Environment Information

附加信息 / Additional Information 添加与问题相关的任何其他信息 / Add any other information related to the issue.

问题描述: 执行python startup.py -a 报错,AttributeError: 'ChatGLMTokenizer' object has no attribute 'tokenizer'

环境信息: python:3.8 transformer:4.34 torch:2.0 llm:chatglm2b vector:m3e-base

我看网上说要transformer4.33.2可以解决这个问题,但是requirements.txt中要求transformer>=4.34,请问大家遇到过这个问题吗

hljpeter commented 10 months ago

tokenization_chatglm.py 老版本 和transformer4.33.2不兼容。 chatglm已经更新最新的文件到 huggingface,更新下这个文件再尝试下

guiniao commented 10 months ago

@hljpeter ,这个文件更新下,transformers版本再升到4.34以后的版本吗

guiniao commented 10 months ago

image @hljpeter ,我启动程序,python startup.py -a,报错,说找不到webui.py 版本是chat0.2.7,transformers的版本是4.33.2

zRzRzRzRzRzRzR commented 9 months ago

更新到最新的Transformers和chatglm权重文件

tyzhong commented 6 months ago

tokenization_chatglm.py 老版本 和transformer4.33.2不兼容。 chatglm已经更新最新的文件到 huggingface,更新下这个文件再尝试下

实测可行 大佬NB~