bug解决

AI摘要

博客提到遇到一个bug,显示没有聊天模版,具体为ValueError提示tokenizer.chat_template未设置且无模板参数传递。经研究,给出两种解决方法:一是使用intruct版本而非base版本;二是将transformer包降级。

遇到这个bug
 ValueError(
[rank0]: ValueError: Cannot use chat template functions because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating

AssertionError: Expected code to be unreachable, but got: [{'role': 'system', 'content': "You are provided with a question and various references. Your task i...

显示没有聊天模版。研究了半天发现有两种解决方法。

1. 使用intruct版本,不要使用base版本

2. 将transformer包降级

上一篇: 正则化记录
下一篇: Transfomer教程
讨厌编程但喜欢LLM的学院派
博客等级 码龄2年 234粉丝 30原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址