[GH-ISSUE #2385] ollama breaks running qwen on ubuntu 20 #27146

Closed
opened 2026-04-22 04:07:26 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @cognitivetech on GitHub (Feb 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2385

Either using the version included with ollama pull qwen or using my own custom modelfile with q8 and chatml template qwen causes ollama to get "stuck" it doesn't use GPU for qwen, or any other working model after trying qwen until reboot.

see also: https://github.com/ollama/ollama/issues/1691

Originally created by @cognitivetech on GitHub (Feb 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2385 Either using the version included with `ollama pull qwen` or using my own custom modelfile with q8 and chatml template qwen causes ollama to get "stuck" it doesn't use GPU for qwen, or any other working model after trying qwen until reboot. see also: https://github.com/ollama/ollama/issues/1691
Author
Owner

@cognitivetech commented on GitHub (Feb 7, 2024):

also this qwen template seems not right (https://github.com/ollama/ollama/issues/1977)

# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM qwen:latest

FROM /usr/share/ollama/.ollama/models/blobs/sha256:46bb65206e0e2b00424f33985a5281bd21070617ebcfda9be86eb17e6e00f793
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"

for one thing, it's got no newlines, does not chatml have newline?
for another, I would guess that the "lm_start" parameter should read like this: PARAMETER start "<|im_start|>"

I don't have tons of time to test this right now, especially as it requires a reboot for each test. (I read somewhere a command to restart ollama service, but I can't find now). However, if someone wants to share a debug command so I can see what is actually happening, I can do that much.

<!-- gh-comment-id:1931765816 --> @cognitivetech commented on GitHub (Feb 7, 2024): also this qwen template seems not right (https://github.com/ollama/ollama/issues/1977) ``` # Modelfile generated by "ollama show" # To build a new Modelfile based on this one, replace the FROM line with: # FROM qwen:latest FROM /usr/share/ollama/.ollama/models/blobs/sha256:46bb65206e0e2b00424f33985a5281bd21070617ebcfda9be86eb17e6e00f793 TEMPLATE """{{ if .System }}<|im_start|>system {{ .System }}<|im_end|>{{ end }}<|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant """ PARAMETER stop "<|im_start|>" PARAMETER stop "<|im_end|>" ``` for one thing, it's got no newlines, does not chatml have newline? for another, I would guess that the "lm_start" parameter should read like this: `PARAMETER start "<|im_start|>"` I don't have tons of time to test this right now, especially as it requires a reboot for each test. (I read somewhere a command to restart ollama service, but I can't find now). However, if someone wants to share a debug command so I can see what is actually happening, I can do that much.
Author
Owner

@cognitivetech commented on GitHub (Feb 9, 2024):

needed ollama update. but really if the model is not supported then it should not just hang forever.. but fail gracefully

<!-- gh-comment-id:1936580675 --> @cognitivetech commented on GitHub (Feb 9, 2024): needed ollama update. but really if the model is not supported then it should not just hang forever.. but fail gracefully
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27146