You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How the system_message in get_chat_template works? #989
I add the parameter like this.
but the final text is
Is the system_message useful? How can I see the final system_message that is thrown into the model? Thank you much!
@Erland366 After reviewing and running code with your new file chat_templates.py it show error at line 892.
I also fixed by replace str | None to str=None and no error but when input system_messsage it doesn't work.
I use qwen2.5 model.
@Erland366 I just tried again and it works on my end. It seems there might be some residual spaces at the end (|im_end|). Could you please check and let me know if that resolves the issue?
Thanks!
Activity
danielhanchen commentedon Sep 10, 2024
Sorry on the delay! Yep that's Llama 3.1's default system instruction!
But interesting on why dfffff did not show up - let me fix this - sorry on the issue!
KuroKienDinh commentedon Nov 5, 2024
@danielhanchen Hi, did you fix this error? I face same error, can't add my custom system_message when calling get_chat_template
Thanks!
danielhanchen commentedon Nov 5, 2024
@Erland366 would you be able to look into this - thanks :)
Erland366 commentedon Nov 5, 2024
will check them
KuroKienDinh commentedon Nov 6, 2024
@Erland366 After reviewing and running code with your new file chat_templates.py it show error at line 892.
I also fixed by replace str | None to str=None and no error but when input system_messsage it doesn't work.
I use qwen2.5 model.
Erland366 commentedon Nov 6, 2024
@tadinhkien99 Oh sorry for the type hinting. now it's removed
Can I see what's your input? because I tested mine and it works .-.

KuroKienDinh commentedon Nov 6, 2024
@Erland366 I just tried again and it works on my end. It seems there might be some residual spaces at the end (|im_end|). Could you please check and let me know if that resolves the issue?

Thanks!
Erland366 commentedon Nov 6, 2024
Not happening in my case tho .-. this is weird
I suspect maybe if user call
get_chat_templatetwice using the sametokenizerthen these weird behavior appear .-.Will check it later tonight