LongWriter icon indicating copy to clipboard operation
LongWriter copied to clipboard

点击Submit,页面显示错误,控制台显示AttributeError: 'PrelrainedlokenizerFast' object has no attribute 'build_chat_input'

Open 1105135335 opened this issue 1 year ago • 4 comments

System Info / 系統信息

CUDA :11.1 transformers:4.44.0 Python:3.10.0 操作系统:Windows10 64

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • [X] The official example scripts / 官方的示例脚本
  • [ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

  1. 在conda控制台进入项目路径并进入搭好环境的虚拟环境,然后运行python trans_web_demo.py;
  2. 项目正常运行启动并自动弹出网页;
  3. 在输入框中输入”User: 写一篇10000字的中国旅游指南“,点击Submit。出现如下午所示的错误。

1

2

Expected behavior / 期待表现

在输入框中输入示例中的”User: 写一篇10000字的中国旅游指南“,点击Submit,正常生成例如示例中的1w+内容。

1105135335 avatar Aug 16 '24 08:08 1105135335

hi, please update to the newest trans_web_demo.py.

bys0318 avatar Aug 16 '24 10:08 bys0318

  • 使用LongWriter-llama3.1-8b模型
  • 更新到最新代码,transformers==4.44.0,
  • 依然报错: image

yungongzi avatar Aug 20 '24 07:08 yungongzi

你好,我们提供的trans_web_demo.py示例代码适配的是LongWriter-glm4-9b模型,如果要在LongWriter-llama3.1-8b上尝试此demo需要更改代码,请参考hf readme中的推理代码进行更改。

bys0318 avatar Aug 20 '24 08:08 bys0318

你好,我们提供的trans_web_demo.py示例代码适配的是LongWriter-glm4-9b模型,如果要在LongWriter-llama3.1-8b上尝试此demo需要更改代码,请参考hf readme中的推理代码进行更改。 多谢,我去试一下

yungongzi avatar Aug 20 '24 09:08 yungongzi