ValueError: Cannot use apply_chat_template because this processor does not have a chat template.

#5
by aimagee - opened

transformers=5.10.1
ValueError: Cannot use apply_chat_template because this processor does not have a chat template.

Google org

Hi @aimagee
This error happens because you are using a raw base model gemma-4-12b which does not contain a built-in chat template config.Please switch to the instruction-tuned gemma-4-12b-it model .
https://huggingface.co/google/gemma-4-12B-it/tree/main
Thanks

Hi @aimagee
This error happens because you are using a raw base model gemma-4-12b which does not contain a built-in chat template config.Please switch to the instruction-tuned gemma-4-12b-it model .
https://huggingface.co/google/gemma-4-12B-it/tree/main
Thanks

@pannaga10 Thanks your reply, what are the differences between gemma-4-12B and gemma-4-12B-it, and is model.safetensors file the same?

Gemma-4-12B is the base pre-trained model, while gemma-4-12B-it is the instruction-tuned variant fine-tuned to follow user instructions hold conversations, and support system prompts, thinking mode, and function calling. Please use the base model for text completion/few-shot learning, and the -it version for a conversational assistant experience.

Thanks

I get it, thanks you very much @pannaga10

aimagee changed discussion status to closed

Sign up or log in to comment