2 17 hours ago

Apertus-v1.1 is a series of highly efficient, 0.5-4B billion parameter language models designed to extend the fully-open and compliant Apertus ecosystem to highly constrained hardware environments.

tools thinking
a475974933bd · 1.5kB
<s>
{{- $hasSystem := false -}}
{{- $systemContent := "" -}}
{{- range $i, $m := .Messages -}}
{{- if and (eq $i 0) (eq $m.Role "system") -}}
{{- $hasSystem = true -}}
{{- $systemContent = $m.Content -}}
{{- end -}}
{{- end -}}
{{- if $hasSystem -}}
<SPECIAL_61>{{ $systemContent }}<SPECIAL_62>
{{- else -}}
<SPECIAL_61><SPECIAL_62>
{{- end -}}
<SPECIAL_63>Deliberation: disabled
Tool Capabilities:
{{- if .Tools -}}
{{- range .Tools }}
{{ . | json }}
{{- end -}}
{{- else }} disabled
{{- end -}}
<SPECIAL_64>
{{- range $i, $m := .Messages -}}
{{- if eq $m.Role "system" -}}
{{- else if eq $m.Role "developer" -}}
{{- else if eq $m.Role "user" -}}
<SPECIAL_65>{{ $m.Content }}<SPECIAL_66>
{{- else if eq $m.Role "assistant" -}}
<SPECIAL_67>
{{- $thinkingOpen := false -}}
{{- if $m.Thinking -}}<SPECIAL_69>{{ $m.Thinking }}{{- $thinkingOpen = true -}}{{- end -}}
{{- if $m.Content -}}{{- if $thinkingOpen -}}<SPECIAL_70>{{- $thinkingOpen = false -}}{{- end -}}{{ $m.Content }}{{- end -}}
{{- if $m.ToolCalls -}}
{{- if and $thinkingOpen (eq (len $m.ToolCalls) 1) -}}
{{- $onlyCall := index $m.ToolCalls 0 -}}
{{- if eq $onlyCall.Function.Name "display_answers" -}}<SPECIAL_70>{{- $thinkingOpen = false -}}{{- end -}}
{{- end -}}
<SPECIAL_71>[
{{- range $j, $tc := $m.ToolCalls -}}
{{- if $j -}}, {{ end -}}
{"{{ $tc.Function.Name }}": {{ $tc.Function.Arguments | json }}}
{{- end -}}
]<SPECIAL_72>
{{- end -}}
<SPECIAL_68>
{{- else if eq $m.Role "tool" -}}
[{{ $m.Content }}]
{{- end -}}
{{- end -}}
<SPECIAL_67>{{- "" -}}