Created
October 17, 2024 12:15
-
-
Save thewh1teagle/1612eafa420d3969f9cd8d39d20fdeac to your computer and use it in GitHub Desktop.
ollama Ministral ~4GB. easy to get structured format back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Modelfile generated by "ollama show" | |
| # | |
| # To build a new Modelfile based on this, replace FROM with: | |
| # FROM hf.co/bartowski/Ministral-8B-Instruct-2410-HF-GGUF-TEST:latest | |
| FROM hf.co/bartowski/Ministral-8B-Instruct-2410-HF-GGUF-TEST:latest | |
| PARAMETER stop [INST] | |
| PARAMETER stop [/INST] | |
| TEMPLATE """ | |
| {{- if .Messages }} | |
| {{- range $index, $_ := .Messages }} | |
| {{- if eq .Role "user" }} | |
| {{- if and (eq (len (slice $.Messages $index)) 1) $.Tools }}[AVAILABLE_TOOLS] {{ $.Tools }}[/AVAILABLE_TOOLS] | |
| {{- end }}[INST] {{ if and $.System (eq (len (slice $.Messages $index)) 1) }}{{ $.System }} | |
| {{ end }}{{ .Content }}[/INST] | |
| {{- else if eq .Role "assistant" }} | |
| {{- if .Content }} {{ .Content }} | |
| {{- else if .ToolCalls }}[TOOL_CALLS] [ | |
| {{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}} | |
| {{- end }}] | |
| {{- end }}</s> | |
| {{- else if eq .Role "tool" }}[TOOL_RESULTS] {"content": {{ .Content }}} [/TOOL_RESULTS] | |
| {{- end }} | |
| {{- end }} | |
| {{- else }}[INST] {{ if .System }}{{ .System }} | |
| {{ end }}{{ .Prompt }}[/INST] | |
| {{- end }} {{ .Response }} | |
| {{- if .Response }}</s> | |
| {{- end }} | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment