mondk/claude-code-qwen2.5code7b-it
5181
1 2FROM qwen2.5-coder-7b-instruct.Q4_K_M.gguf3TEMPLATE """{{- if .Suffix }}<|fim_prefix|>{{ .Prompt }}<|fim_suffix|>{{ .Suffix }}<|fim_middle|>4{{- else if .Messages }}5{{- if or .System .Tools }}<|im_start|>system6{{- if .System }}7{{ .System }}8{{- end }}9{{- if .Tools }}10 11# Tools12 13You may call one or more functions to assist with the user query.14 15You are provided with function signatures within <tools></tools>:16<tools>17{{- range .Tools }}18{"type": "function", "function": {{ .Function }}}19{{- end }}20</tools>21 22For each function call, return a json object with function name and arguments within <tool_call></tool_call> with NO other text. Do not include any backticks or ```json.23<tool_call>24{"name": <function-name>, "arguments": <args-json-object>}25</tool_call>26{{- end }}<|im_end|>27{{ end }}28{{- range $i, $_ := .Messages }}29{{- $last := eq (len (slice $.Messages $i)) 1 -}}30{{- if eq .Role "user" }}<|im_start|>user31{{ .Content }}<|im_end|>32{{ else if eq .Role "assistant" }}<|im_start|>assistant33{{ if .Content }}{{ .Content }}34{{- else if .ToolCalls }}<tool_call>35{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}36{{ end }}</tool_call>37{{- end }}{{ if not $last }}<|im_end|>38{{ end }}39{{- else if eq .Role "tool" }}<|im_start|>user40<tool_response>41{{ .Content }}42</tool_response><|im_end|>43{{ end }}44{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant45{{ end }}46{{- end }}47{{- else }}48{{- if .System }}<|im_start|>system49{{ .System }}<|im_end|>50{{ end }}{{ if .Prompt }}<|im_start|>user51{{ .Prompt }}<|im_end|>52{{ end }}<|im_start|>assistant53{{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""54SYSTEM """You are Qwen, created by Alibaba Cloud. You are a helpful assistant."""