-
Notifications
You must be signed in to change notification settings - Fork 3k
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
【互助】关于Agent中react/ReAct 模板数据如何组织方法 #3750
Comments
这样是不是需要修改qwen的template |
类似<|im_end|>的特变标记,是套用template上添加的,如果直接在数据上加上,是不是会有问题
|
不需要修改template,只是相当于user部分你扩充了,达到了修改template的效果 |
那就是说我组织数据的时候,就得包含类似的<|im_end|>\n<|im_start|这样的特殊标记了,不知道我理解的对不对 |
是的,我是按照这样训练的,但是我的代码比较旧,不是最新的,你可以试一下,帮大家反馈下~ |
3ks,我尝试一下,先把数据重新组织一下 |
如果react是多轮的怎么组织数据,就是会有多个thought/observation/action等 |
放到history中? |
目前的react模板中,一般需要增加role如thought/observation/action等,参考data下readme文件,以及这篇文章。可以直接根据我们目标模型的template组织数据,手动添加到user或者assistant字段中。
如:role包含 user,thought,assistant,微调qwen
qwen的数据组织如下:
我们需要增加thought角色:
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
{{query}}<|im_end|>
<|im_start|>thought
{{thought}}<|im_end|>
<|im_start|>assistant
{{ans}}<|im_end|>
如只预测assistant只需要把assistant前面的内容都当做user即可
即:
这样即可。
#3667
#3292
#3227
The text was updated successfully, but these errors were encountered: