5 1 month ago

A thinking version of Gemma 3N E4B

thinking
4d55a9681651 · 436B
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if or (eq .Role "user") (eq .Role "system") }}<start_of_turn>user
{{ .Content }}<end_of_turn>
{{ if $last }}<start_of_turn>model
<think>
{{ end }}
{{- else if eq .Role "assistant" }}<start_of_turn>model
{{ if .Thinking }}<think>{{ .Thinking }}</think>
{{ end }}{{ .Content }}{{ if not $last }}<end_of_turn>
{{ end }}
{{- end }}
{{- end }}