Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
作者你好,是否考虑添加一种新的训练方式,RAFT ?这是一种sft的变体,微调模型在检索增强时的能力,可提高模型在“开放”领域设置中回答问题的能力。
代码的实现是参考作者的版本https://github.com/ShishirPatil/gorilla/blob/main/raft/raft.py
在这种方法中,传入的数据集要求有正样本和负样本。然后利用参数num_distract和p的值最终得到prompt。
Before submitting
Yes, and I've met all the requirements
Yes, here: LLaMA-Factory/data/raft_demo.json