apply_chat_template

#12
by nassimab - opened

the LlavaProcessor doesn't seem to have the apply_chat_template method in it?
Trying to modify the system prompt for the model to make it behave in a certain way.. just running the code directly as is in the model card seems to spit out an error because of the method not being there?

Llava Hugging Face org

Hey! Can you update the transformers version to at least 4.43? Chat templates were added in the last release

Thank you! works now!

One comment on the chat_template.json, it seems like if your conversation includes a system message, the chat_template parsing through jinja is duplicating the system message twice at the beginning of your prompt?

Llava Hugging Face org

Thanks for noticing, indeed it was a bug in template with system messages. Fixed it!

Sign up or log in to comment