Model fails at tool calling 100% of the time
#2
by
logxdx
- opened
Even after creating the modelfile as stated on the model page. It fails at tool calls EVERYTIME.
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM LFM2-Tool:1.2B
FROM C:\Users\iamka\.ollama\models\blobs\sha256-bf035d5876eb8ef0b1a87cf0cf30d9717e4cc628d483c5b49b342603d5f2ee67
TEMPLATE """
{{ if .System }}
<|startoftext|>
<|im_start|>system
{{ .System }}
{{ if .Tools }}
<|tool_list_start|>
{{ range .Tools }}
{{ .Function }}
{{ end }}
<|tool_list_end|>
{{ end }}
<|im_end|>
{{ end }}
{{ range $i, $_ := .Messages }}
{{ $last := eq (len (slice $.Messages $i)) 1 }}
{{ if eq .Role "user" }}
<|im_start|>user
{{ .Content }}
<|im_end|>
{{ else if eq .Role "assistant" }}
<|im_start|>assistant
{{ if .Content }}
{{ .Content }}
{{ else if .ToolCalls }}
<|tool_call_Start|>
{{ range .ToolCalls }}
{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}
<|tool_call_end|>
{{ end }}
<|im_end|>
{{ else if eq .Role "tool" }}
<|im_start|>tool
<|tool_response_start|>
{{ .Content }}
<|tool_response_end|>
<|im_end|>
{{ end }}
{{ end }}
<|im_start|>assistant
"""
PARAMETER min_p 0.15
PARAMETER num_ctx 12000
PARAMETER repeat_penalty 1.05
PARAMETER stop <|start_of_text|>
PARAMETER stop <|im_start|>
PARAMETER stop <|im_end|>
PARAMETER temperature 0.3