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

text-generation-webui 的 instruction-templates 没有 Llama 3 指令模板 #11

Closed
3 tasks done
pengyonglei opened this issue Apr 30, 2024 · 6 comments
Closed
3 tasks done
Labels

Comments

@pengyonglei
Copy link

pengyonglei commented Apr 30, 2024

提交前必须检查以下项目

  • 请确保使用的是仓库最新代码(git pull)
  • 已阅读项目文档FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案。
  • 第三方插件问题:例如llama.cpptext-generation-webui等,建议优先去对应的项目中查找解决方案。

问题类型

None

基础模型

Llama-3-Chinese-Instruct-8B(基座模型)

操作系统

Windows

详细描述问题

image
如图,text-generation-webui 的 instruction-templates 并没有 Llama 3 指令模板,是不是作者本地添加的呀,可以发出来吗
我看了最新的 text-generation-webui 的main分支的 instruction-templates的配置文件,没发现Llama 3,只有Llama-v2

@ymcui
Copy link
Owner

ymcui commented Apr 30, 2024

加载的是GGUF版吗?
Instruction template里的内容:

{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>

'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = '<|begin_of_text|>' + content %}{% endif %}{{ content }}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>

' }}

不过,目前GGUF版的对话有一些问题,除了最新的llama.cpp之外,其余的可能会出现无限生成的问题。建议是先用llama.cpp做推理。

@pengyonglei
Copy link
Author

不是 GGUF 版本,我用的是 Llama-3-Chinese-8B-Instruct 全精度的版本,我来用您的这个 Instruction template 测试下,这个似乎就是原版的 llama-3-8b 的 Instruction template 。测试过原版,会出现不停止的无限续写的问题

@ymcui
Copy link
Owner

ymcui commented Apr 30, 2024

我们没有更改instruction template,与Meta-Llama-3-8B-Instruct是一致的。
加载Meta-Llama-3-8B-Instruct确实会出现无限生成的问题。这个只能等待下游这些软件适配了。

目前测试正常的有:原生transformers, llama.cpp, lm studio。其余的或多或少都有点问题。

@pengyonglei
Copy link
Author

好的,感谢。我来试试看您推荐的方式

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.

@github-actions github-actions bot added the stale label May 14, 2024
Copy link

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants