From c9acb419033adafe2ff0e7b254d6f4d4be5abb2b Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 27 Jul 2026 21:04:10 +0000 Subject: [PATCH] fix(gallery): use tokenizer templates for Gemma Let the model-provided tokenizer template format Gemma conversations instead of maintaining a shared inline prompt template. Assisted-by: Codex:gpt-5 Signed-off-by: Ettore Di Giacinto --- gallery/gemma.yaml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/gallery/gemma.yaml b/gallery/gemma.yaml index 1e08fed81..c86b9d91b 100644 --- a/gallery/gemma.yaml +++ b/gallery/gemma.yaml @@ -10,33 +10,5 @@ config_file: | - - template: - chat: | - {{.Input }} - model - chat_message: |- - {{if eq .RoleName "assistant" }}model{{else}}{{ .RoleName }}{{end}} - {{ if .FunctionCall -}} - {{ else if eq .RoleName "tool" -}} - {{ end -}} - {{ if .Content -}} - {{.Content -}} - {{ end -}} - {{ if .FunctionCall -}} - {{toJson .FunctionCall}} - {{ end -}} - completion: | - {{.Input}} - function: | - system - You have access to functions. If you decide to invoke any of the function(s), - you MUST put it in the format of - {"name": function name, "parameters": dictionary of argument name and its value} - - You SHOULD NOT include any other text in the response if you call a function - {{range .Functions}} - {'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }} - {{end}} - - {{.Input -}} - model + use_tokenizer_template: true name: gemma