Closed XpastaX closed 2 months ago
This piece of code has become somewhat confusing after cleanup, but it is correct.
roles = {"user": "<|im_start|>user", "assistant": "<|im_start|>assistant"}
...
for i, source in enumerate(sources):
if roles[source[0]["from"]] != roles["user"]:
In those roles
settings, it is the same with checking if source[0]["from"] == "user"
.
Thank you for the response!
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
for https://github.com/QwenLM/Qwen/blob/adb527133ea5abaf70b7183f57a68c256417ab36/finetune.py#L143 do you mean if roles[source[0]["from"]] != "user": I assume this step is to get rid of the custom-defined system prompt.
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
备注 | Anything else?
No response