[GH-ISSUE #15698] Error fixes #35771

Open
opened 2026-04-22 20:27:13 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @QuantumSorcerer02 on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15698

--- FIX FOR Gemma 4 Modelfile ---

FROM ./gemma-4-31b.gguf

FIX 1: Prevent Double BOS by explicitly defining a clean template

TEMPLATE """<start_of_turn>user
{{ .Prompt }}<end_of_turn>
<start_of_turn>model
<|thought|>
{{ .Response }}<end_of_turn>"""

FIX 2: Correcting Agentic Token Types for Tool Calling

PARAMETER stop "<|tool_call>"
PARAMETER stop "<tool_call|>"
PARAMETER stop "<|tool_response>"
PARAMETER stop "<tool_response|>"

FIX 3: Stability flags for mobile/ARM

PARAMETER num_ctx 8192
PARAMETER repeat_penalty 1.1

Originally created by @QuantumSorcerer02 on GitHub (Apr 19, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15698 # --- FIX FOR Gemma 4 Modelfile --- FROM ./gemma-4-31b.gguf # FIX 1: Prevent Double BOS by explicitly defining a clean template TEMPLATE """<start_of_turn>user {{ .Prompt }}<end_of_turn> <start_of_turn>model <|thought|> {{ .Response }}<end_of_turn>""" # FIX 2: Correcting Agentic Token Types for Tool Calling PARAMETER stop "<|tool_call>" PARAMETER stop "<tool_call|>" PARAMETER stop "<|tool_response>" PARAMETER stop "<tool_response|>" # FIX 3: Stability flags for mobile/ARM PARAMETER num_ctx 8192 PARAMETER repeat_penalty 1.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35771