hf_model/ carried a tokenizer but no chat template, so a runtime applying one had nothing to apply and silently fell back to raw completion — the model never saw a turn marker. And tokenizer_config declared eos_token = "<eos>" (id 1, document end) while this model ends a chat turn with <turn|> (id 106); generation_config lists eos_token_id = [1, 106, 50]. A runtime that stops on eos_token alone therefore never saw the turn end and generated to its cap.
The template is the source model's own file, verbatim, and is byte-identical to the one the Core AI Gemma-4 bundles already ship. It emits <turn|> literally rather than through {{ eos_token }}, so retagging eos_token does not change rendering.
Ship the chat template, and stop turns on <turn|>
hf_model/ carried a tokenizer but no chat template, so a runtime applying one had nothing to apply and silently fell back to raw completion — the model never saw a turn marker. And tokenizer_config declared eos_token = "<eos>" (id 1, document end) while this model ends a chat turn with <turn|> (id 106); generation_config lists eos_token_id = [1, 106, 50]. A runtime that stops on eos_token alone therefore never saw the turn end and generated to its cap.
The template is the source model's own file, verbatim, and is byte-identical to the one the Core AI Gemma-4 bundles already ship. It emits <turn|> literally rather than through {{ eos_token }}, so retagging eos_token does not change rendering.