Tool call tokens use hybrid format incompatible with Ollama's PARSER gemma4

#36
by kbryss - opened

Model: UD-Q4_K_XL
Backend: Ollama
Issue: The GGUF produces tool calls using a hybrid token format β€” <tool_call|> (reverse style) for openings and <|tool_response> (ChatML style) for responses instead of the standard ... format. Ollama's built-in PARSER gemma4 only recognizes the standard format, so tool calls are not parsed as structured tool_calls objects. Instead, the raw token content leaks into the text stream, and in my use case gets spoken by TTS engines and appears as raw text in conversation UIs.

The vanilla gemma4:27b from Ollama's library does not have this issue. Tool calls are properly parsed and never appear in the text stream.

Expected: Tool call tokens in the standard format recognized by PARSER gemma4
Actual: Hybrid format leaks through as raw text

Sources:

Sign up or log in to comment