Archived
Gemma 4 declares <eos> as its eos but ends a turn on <turn|>, and a tool-calling turn on <|tool_response> (the opener of the result the caller supplies, written after the model's last <tool_call|>). Neither was in kEogNames, so every Gemma 4 reply ran to max_tokens. llama.cpp's loader lists both for this vocabulary. A vocabulary that has <|tool_response> as a control token also has </s> as ordinary text (llama.cpp concludes the same); ending on it would cut a reply that writes the HTML tag, so </s> is not an end-of-generation token there. This branch already ends a generation on every id generation_config.json names (c65fabe), which covers both tokens for a container that carries `generation.eos_token_id`. The spellings here cover one that does not, and the </s> rule is new either way: the eos list never names </s> for Gemma 4, but kEogNames did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>