Create Modelfile
Browse files
Modelfile
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ./Llama-3.2-1B-Instruct-unsloth-bnb-4bit-tuxsentience-beta2-Q4_K_M.gguf
|
| 2 |
+
|
| 3 |
+
TEMPLATE """<|start_header_id|>system<|end_header_id|>
|
| 4 |
+
|
| 5 |
+
Cutting Knowledge Date: December 2023
|
| 6 |
+
|
| 7 |
+
{{ if .System }}{{ .System }}
|
| 8 |
+
{{- end }}
|
| 9 |
+
{{- if .Tools }}When you receive a tool call response, use the output to format an answer to the orginal user question.
|
| 10 |
+
|
| 11 |
+
You are a helpful assistant with tool calling capabilities.
|
| 12 |
+
{{- end }}<|eot_id|>
|
| 13 |
+
{{- range $i, $_ := .Messages }}
|
| 14 |
+
{{- $last := eq (len (slice $.Messages $i)) 1 }}
|
| 15 |
+
{{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
|
| 16 |
+
{{- if and $.Tools $last }}
|
| 17 |
+
|
| 18 |
+
Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
|
| 19 |
+
|
| 20 |
+
Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
|
| 21 |
+
|
| 22 |
+
{{ range $.Tools }}
|
| 23 |
+
{{- . }}
|
| 24 |
+
{{ end }}
|
| 25 |
+
{{ .Content }}<|eot_id|>
|
| 26 |
+
{{- else }}
|
| 27 |
+
|
| 28 |
+
{{ .Content }}<|eot_id|>
|
| 29 |
+
{{- end }}{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
|
| 30 |
+
|
| 31 |
+
{{ end }}
|
| 32 |
+
{{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
|
| 33 |
+
{{- if .ToolCalls }}
|
| 34 |
+
{{ range .ToolCalls }}
|
| 35 |
+
{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }}
|
| 36 |
+
{{- else }}
|
| 37 |
+
|
| 38 |
+
{{ .Content }}
|
| 39 |
+
{{- end }}{{ if not $last }}<|eot_id|>{{ end }}
|
| 40 |
+
{{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
|
| 41 |
+
|
| 42 |
+
{{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
|
| 43 |
+
|
| 44 |
+
{{ end }}
|
| 45 |
+
{{- end }}
|
| 46 |
+
{{- end }}"""
|
| 47 |
+
|
| 48 |
+
PARAMETER stop "<|python_tag|>"
|
| 49 |
+
PARAMETER stop "<|start_header_id|>"
|
| 50 |
+
PARAMETER stop "<|eom_id|>"
|
| 51 |
+
PARAMETER stop "<|end_header_id|>"
|
| 52 |
+
PARAMETER stop "<|finetune_right_pad_id|>"
|
| 53 |
+
PARAMETER stop "<|end_of_text|>"
|
| 54 |
+
PARAMETER stop "<|eot_id|>"
|
| 55 |
+
PARAMETER stop "<|reserved_special_token_"
|
| 56 |
+
PARAMETER temperature 1.5
|
| 57 |
+
PARAMETER min_p 0.1
|