[GH-ISSUE #6191] Custom models without reasoning using gpu #65901

Closed
opened 2026-05-03 23:07:12 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @CyanMystery on GitHub (Aug 6, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6191

What is the issue?

I downloaded this model https://www.modelscope.cn/models/LLM-Research/Mistral-7B-Instruct-v0.3-GGUF/files Create from modelfiles but do not use GPU reasoning, direct ollama run mistral can be used normally

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.3.0

Originally created by @CyanMystery on GitHub (Aug 6, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6191 ### What is the issue? I downloaded this model **https://www.modelscope.cn/models/LLM-Research/Mistral-7B-Instruct-v0.3-GGUF/files** Create from modelfiles but do not use GPU reasoning, direct ollama run mistral can be used normally ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.0
GiteaMirror added the bug label 2026-05-03 23:07:12 -05:00
Author
Owner

@CyanMystery commented on GitHub (Aug 6, 2024):

odelfile:

`FROM Mistral-7B-Instruct-v0.3.fp16.gguf
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 }}
{{- 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 }}
{{- end }}"""`

run command:
ollama create mymodel -f ./Modelfile
ollama run mymodel

<!-- gh-comment-id:2270149398 --> @CyanMystery commented on GitHub (Aug 6, 2024): odelfile: `FROM Mistral-7B-Instruct-v0.3.fp16.gguf 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 }}"""` run command: ollama create mymodel -f ./Modelfile ollama run mymodel
Author
Owner

@rick-github commented on GitHub (Aug 6, 2024):

Server logs will help with debugging.

<!-- gh-comment-id:2270691714 --> @rick-github commented on GitHub (Aug 6, 2024): [Server logs](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues) will help with debugging.
Author
Owner

@jmorganca commented on GitHub (Sep 2, 2024):

Hi @CyanMystery have you tried the Mistral 7b in the library? https://ollama.com/library/mistral it should function correctly including with tool calling. Let me know if that doesn't help

<!-- gh-comment-id:2325380418 --> @jmorganca commented on GitHub (Sep 2, 2024): Hi @CyanMystery have you tried the Mistral 7b in the library? https://ollama.com/library/mistral it should function correctly including with tool calling. Let me know if that doesn't help
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65901