Randomblock1/
nemotron-nano:8b-instruct-q2_K

7,101 6 months ago

Llama 3.1 customized by NVIDIA into a reasoning model that is post trained for reasoning, human chat preferences, and tasks, such as RAG and tool calling. Significantly improved performance over base Llama model.

tools thinking 8b
affddeabd0dc · 1.7kB
<|start_header_id|>system<|end_header_id|>
{{/* System prompt must be exactly 'detailed thinking on' or 'detailed thinking off' */}}
{{ if .Tools }}You have access to the following functions. To call a function, please respond with JSON for a function call. Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
{{ range .Tools }}{{ . }}
{{ end }}{{- end }}
{{ .System }}<|eot_id|>
{{- range $i, $_ := .Messages }}
{{- $isLast := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq .Role "system" }}
{{/* skip system repetition */}}
{{- else if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
{{ .Content }}<|eot_id|>
{{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
{{- /* Always include a think block: empty if off, real if on and available */ -}}
{{- if eq $.System "detailed thinking off" }}
<think>
</think>
{{- else if and (eq $.System "detailed thinking on") .Thinking }}
<think>{{ .Thinking }}</think>
{{- end }}
{{- /* Then the actual assistant content or tool calls */ -}}
{{- if .Content }}
{{ .Content }}
{{- else if .ToolCalls }}
{{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}
{{- end }}
{{- end }}
{{- if not $isLast }}<|eot_id|>{{ end }}
{{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
{{ .Content }}<|eot_id|>
{{- if $isLast }}<|start_header_id|>assistant<|end_header_id|>
{{- end }}
{{- else }}<|start_header_id|>{{ .Role }}<|end_header_id|>
{{ .Content }}<|eot_id|>
{{- if $isLast }}<|start_header_id|>assistant<|end_header_id|>
{{- end }}
{{- end }}
{{- end }}