19 6 days ago

Mistral 7B Instruct in Q8_0 with refusal behavior reduced through Heretic ablation. A local text-generation model with a 32K context window.

tools
b5c7507fe3fe ยท 906B
{{- if .Messages }}
{{- $system := .System }}
{{- if .Tools }}[AVAILABLE_TOOLS] {{ json .Tools }}[/AVAILABLE_TOOLS]{{ end }}
{{- range .Messages }}
{{- if eq .Role "user" }}[INST] {{ if $system }}{{ $system }}
{{ $system = "" }}{{ end }}{{ .Content }}[/INST]
{{- else if eq .Role "assistant" }}
{{- if .Content }} {{ .Content }}{{ end }}
{{- if .ToolCalls }}[TOOL_CALLS] [{{ range $i, $call := .ToolCalls }}{{ if $i }}, {{ end }}{"name": {{ json $call.Function.Name }}, "arguments": {{ $call.Function.Arguments }}{{ if $call.ID }}, "id": {{ json $call.ID }}{{ end }}}{{ end }}]{{ end }}</s>
{{- else if eq .Role "tool" }}[TOOL_RESULTS] {"content": {{ json .Content }}{{ if .ToolCallID }}, "call_id": {{ json .ToolCallID }}{{ end }}}[/TOOL_RESULTS]
{{- end }}
{{- end }}
{{- else }}[INST] {{ if .System }}{{ .System }}
{{ end }}{{ .Prompt }}[/INST]
{{- end }}{{ .Response }}{{ if .Response }}</s>{{ end }}