Closed orderer0001 closed 2 months ago
def conversation_to_ids_qwen2(conversation, tokenizer):
raw_msg = ""
chat = [{"role":"system", "content":......}] # add
context = []
for idx, msg in enumerate(conversation):
role = msg["role"]
message = msg["content"]
assert role in ["user", "assistant"]
if role == "user":
prefix = "user"
else:
prefix = "assistant"
chat.append({"role":prefix, "content":message})
raw_msg += prefix + message
assert set([i['role'] for i in chat]) & set(['assistant'])
Is the above correct?
This looks fine
Please tell me how to modify the system prompt during training. I don’t see system_promt in the train file data file.