Models
Docs
Pricing
Sign in
Download
Models
Download
Docs
Pricing
Sign in
aisingapore
/
Apertus-SEA-LION-v4-8B-IT
:f16
Updated
15 hours ago
Apertus-SEA-LION-v4-8B-IT is a multilingual model which has been pretrained and instruct-tuned for the Southeast Asia region. Developed by AI Singapore and funded by National Research Foundation, Singapore.
Apertus-SEA-LION-v4-8B-IT is a multilingual model which has been pretrained and instruct-tuned for the Southeast Asia region. Developed by AI Singapore and funded by National Research Foundation, Singapore.
Cancel
tools
thinking
Apertus-SEA-LION-v4-8B-IT:f16
...
/
template
f1954c7fc578 · 2.6kB
{{- $lastUserIdx := -1 -}}
{{- range $idx, $msg := .Messages -}}
{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
{{- end -}}
{{- if or .System .Tools -}}
{{- if .System -}}
<|system_start|>
{{ .System }}
<|system_end|>
{{- end -}}
<|developer_start|>
{{- if .Tools -}}
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{{- range .Tools }}
{"type": "function", "function": {{ .Function }}}
{{- end }}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>
{{- end -}}
Deliberation:
{{- if and $.IsThinkSet $.Think -}}
enabled
{{- else -}}
disabled
{{- end -}}
<|developer_end|>
{{- end -}}
{{- $in_assistant := false -}}
{{- $in_tool := false -}}
{{- $tool_first := true -}}
{{- range $i, $message := .Messages -}}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- /* USER */ -}}
{{- if eq .Role "user" -}}
{{- if $in_tool -}}
{{- $in_tool = false -}}{{- $tool_first = true -}}
{{- end -}}
{{- if $in_assistant -}}{{ $in_assistant = false }}<|assistant_end|>{{- end -}}
<|user_start|>
{{- .Content -}}
<|user_end|>
{{- end -}}
{{- /* ASSISTANT */ -}}
{{- if eq .Role "assistant" -}}
{{- if $in_tool -}}
{{- $in_tool = false -}}{{- $tool_first = true -}}
{{- end -}}
{{- if not $in_assistant -}}{{ $in_assistant = true }}<|assistant_start|>{{- end -}}
{{- if and $.IsThinkSet .Thinking -}}
<|inner_prefix|>
{{- .Thinking -}}
<|inner_suffix|>
{{- end -}}
{{- .Content -}}
{{- if .ToolCalls -}}
<tool_call>
{{- range .ToolCalls -}}
{"name":"{{ .Function.Name }}","arguments":{{ .Function.Arguments }}}
{{- end -}}
</tool_call>
{{- end -}}
{{- end -}}
{{- /* TOOL */ -}}
{{- if eq .Role "tool" -}}
{{- if $in_assistant -}}{{ $in_assistant = false }}<|assistant_end|>{{- end -}}
{{- if not $in_tool -}}
{{- $in_tool = true -}}{{- $tool_first = true -}}
{{- end -}}
{{- if not $tool_first }},{{ end -}}
{{- $tool_first = false -}}
<tool_response>
{{- .Content -}}
</tool_response>
{{- end -}}
{{- /* FINALIZATION */ -}}
{{- if $last -}}
{{- if $in_tool -}}{{ $in_tool = false }}{{- $tool_first = true -}}{{- end -}}
{{- if $in_assistant -}}{{ $in_assistant = false }}<|assistant_end|>{{- end -}}
{{- if ne .Role "assistant" -}}
<|assistant_start|>
{{- end -}}
{{- end -}}
{{- end -}}