train_direct: prepend user turn so Qwen chat template accepts it
This commit is contained in:
parent
8c59f46505
commit
ce58a3507f
1 changed files with 4 additions and 1 deletions
|
|
@ -86,7 +86,10 @@ def main() -> None:
|
|||
|
||||
def apply_template(text: str) -> str:
|
||||
return tokenizer.apply_chat_template(
|
||||
[{"role": "assistant", "content": text}],
|
||||
[
|
||||
{"role": "user", "content": "How do you feel right now?"},
|
||||
{"role": "assistant", "content": text},
|
||||
],
|
||||
tokenize=False,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue