[GH-ISSUE #4890] qwen2 not run correctly #28846

Closed
opened 2026-04-22 07:24:02 -05:00 by GiteaMirror · 23 comments
Owner

Originally created by @FreemanFeng on GitHub (Jun 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4890

What is the issue?

ollama run qwen2

tell a story
GG

OnceGGG thereGGGGGGGGGGGG wasGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

讲一个故事
GG

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

Above is what qwen2 model response, not sure if it is ollama not supporting qwen2 yet or not?

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.1.41

Originally created by @FreemanFeng on GitHub (Jun 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4890 ### What is the issue? ollama run qwen2 >>> tell a story GG OnceGGG thereGGGGGGGGGGGG wasGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG >>> 讲一个故事 GG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG >>> Above is what qwen2 model response, not sure if it is ollama not supporting qwen2 yet or not? ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.41
GiteaMirror added the bug label 2026-04-22 07:24:02 -05:00
Author
Owner

@slash130 commented on GitHub (Jun 7, 2024):

在linux服务器上遇到相同的问题,在macmini上是正常的。

<!-- gh-comment-id:2153735697 --> @slash130 commented on GitHub (Jun 7, 2024): 在linux服务器上遇到相同的问题,在macmini上是正常的。
Author
Owner

@tonightmare commented on GitHub (Jun 7, 2024):

I meet the same problem with 4090 in ubuntu linux platform

<!-- gh-comment-id:2153735792 --> @tonightmare commented on GitHub (Jun 7, 2024): I meet the same problem with 4090 in ubuntu linux platform
Author
Owner

@freeng commented on GitHub (Jun 7, 2024):

I meet the same problem
3060 6g
16g ram
windows 11

<!-- gh-comment-id:2153740671 --> @freeng commented on GitHub (Jun 7, 2024): I meet the same problem 3060 6g 16g ram windows 11
Author
Owner

@Moeblack commented on GitHub (Jun 7, 2024):

I meet the same problem on wsl2. with 4090 and 5800x3d 64G ram
9b330dc35f2c203d8278807de423842c

<!-- gh-comment-id:2153741898 --> @Moeblack commented on GitHub (Jun 7, 2024): I meet the same problem on wsl2. with 4090 and 5800x3d 64G ram ![9b330dc35f2c203d8278807de423842c](https://github.com/ollama/ollama/assets/28835093/4912f714-8223-4131-ab3b-743d540846b0)
Author
Owner

@ajie425 commented on GitHub (Jun 7, 2024):

win11上也出现这种问题
image

<!-- gh-comment-id:2153749465 --> @ajie425 commented on GitHub (Jun 7, 2024): win11上也出现这种问题 ![image](https://github.com/ollama/ollama/assets/40158391/a8102510-fa5c-4d9b-b1a1-b64c228f9e4f)
Author
Owner

@jingyibo123 commented on GitHub (Jun 7, 2024):

Same on linux,

Also, similar bug with qwen_v1.5 when num_ctx >2048, if it's related

<!-- gh-comment-id:2153761783 --> @jingyibo123 commented on GitHub (Jun 7, 2024): Same on linux, Also, similar bug with `qwen_v1.5` when `num_ctx >2048`, if it's related
Author
Owner

@Leroy-X commented on GitHub (Jun 7, 2024):

GGGGG +1

<!-- gh-comment-id:2153775999 --> @Leroy-X commented on GitHub (Jun 7, 2024): GGGGG +1
Author
Owner

@Forevery1 commented on GitHub (Jun 7, 2024):

一样输出一堆gggggggg

<!-- gh-comment-id:2153808053 --> @Forevery1 commented on GitHub (Jun 7, 2024): 一样输出一堆gggggggg
Author
Owner

@Tining123 commented on GitHub (Jun 7, 2024):

./ollama --version
ollama version is 0.1.41

same issue

<!-- gh-comment-id:2153836463 --> @Tining123 commented on GitHub (Jun 7, 2024): ./ollama --version ollama version is 0.1.41 same issue
Author
Owner

@lingyezhixing commented on GitHub (Jun 7, 2024):

same question

<!-- gh-comment-id:2153856116 --> @lingyezhixing commented on GitHub (Jun 7, 2024): same question
Author
Owner

@HorseLuke commented on GitHub (Jun 7, 2024):

Seems that if it is run by CPU only, result is normal but run slowly. Using GPU will result such problem.

<!-- gh-comment-id:2153910820 --> @HorseLuke commented on GitHub (Jun 7, 2024): Seems that if it is run by CPU only, result is normal but run slowly. Using GPU will result such problem.
Author
Owner

@catnaut commented on GitHub (Jun 7, 2024):

same question

<!-- gh-comment-id:2154131718 --> @catnaut commented on GitHub (Jun 7, 2024): same question
Author
Owner

@MaxJa4 commented on GitHub (Jun 7, 2024):

Had the same issue. After fully closing/stopping Ollama (not just /bye in the console) and restarting it, everything worked again.

<!-- gh-comment-id:2154158227 --> @MaxJa4 commented on GitHub (Jun 7, 2024): Had the same issue. After fully closing/stopping Ollama (not just /bye in the console) and restarting it, everything worked again.
Author
Owner

@ghost commented on GitHub (Jun 7, 2024):

i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu

<!-- gh-comment-id:2154223293 --> @ghost commented on GitHub (Jun 7, 2024): i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu
Author
Owner

@Moeblack commented on GitHub (Jun 7, 2024):

i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu我刚刚在运行 ollama 服务时添加了 OLLAMA_FLASH_ATTENTION=1 参数,结果 qwen2 在我的显卡上正常运行了。

well, succeed.
image

<!-- gh-comment-id:2154246924 --> @Moeblack commented on GitHub (Jun 7, 2024): > i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu我刚刚在运行 ollama 服务时添加了 OLLAMA_FLASH_ATTENTION=1 参数,结果 qwen2 在我的显卡上正常运行了。 well, succeed. ![image](https://github.com/ollama/ollama/assets/28835093/b97c27f2-ecbb-4cea-97f8-c7931fa584d6)
Author
Owner

@jiangweiatgithub commented on GitHub (Jun 7, 2024):

This works for me!

<!-- gh-comment-id:2154306781 --> @jiangweiatgithub commented on GitHub (Jun 7, 2024): This works for me!
Author
Owner

@vincent-guo commented on GitHub (Jun 7, 2024):

i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu

Well done.

<!-- gh-comment-id:2154362453 --> @vincent-guo commented on GitHub (Jun 7, 2024): > i just added this parameter OLLAMA_FLASH_ATTENTION=1 when running ollama serve, and qwen2 worked on my gpu Well done.
Author
Owner

@dstaicova commented on GitHub (Jun 7, 2024):

Not working for me with "ollama run". I get "GladGladGlad" (to infinity). And "ollama serve" complains "Error: accepts 0 arg(s), received 1". Any idea what is the problem?

<!-- gh-comment-id:2154527310 --> @dstaicova commented on GitHub (Jun 7, 2024): Not working for me with "ollama run". I get "GladGladGlad" (to infinity). And "ollama serve" complains "Error: accepts 0 arg(s), received 1". Any idea what is the problem?
Author
Owner

@Leroy-X commented on GitHub (Jun 7, 2024):

Qwen2 runs perfectly on the latest 0.1.42 update.

<!-- gh-comment-id:2154551017 --> @Leroy-X commented on GitHub (Jun 7, 2024): Qwen2 runs perfectly on the latest 0.1.42 update.
Author
Owner

@dstaicova commented on GitHub (Jun 7, 2024):

Yeah, well, my ollama is still 0.1.30 (manjaro) and arch's latest is ollama 0.1.41-1 as far as I can see. I guess the problem is that Manjaro doesn't prioritize ollama imports. Oh well, I'll think of a workaround.

<!-- gh-comment-id:2154574150 --> @dstaicova commented on GitHub (Jun 7, 2024): Yeah, well, my ollama is still 0.1.30 (manjaro) and arch's latest is ollama 0.1.41-1 as far as I can see. I guess the problem is that Manjaro doesn't prioritize ollama imports. Oh well, I'll think of a workaround.
Author
Owner

@dllp007king commented on GitHub (Jun 7, 2024):

写一个有关于windows用户的详细的解决方案
1.更新你的ollama到最新版本
2.系统找到环境变量中添加一条内容名字为OLLAMA_FLASH_ATTENTION值为1的环境变量
3.重启你的电脑
就解决了必须重启windows
1
2

<!-- gh-comment-id:2154584116 --> @dllp007king commented on GitHub (Jun 7, 2024): 写一个有关于windows用户的详细的解决方案 1.更新你的ollama到最新版本 2.系统找到环境变量中添加一条内容名字为OLLAMA_FLASH_ATTENTION值为1的环境变量 3.重启你的电脑 就解决了必须重启windows <img width="370" alt="1" src="https://github.com/ollama/ollama/assets/41323573/9eba5b8a-0480-4ea3-b27d-1d0cf5566b97"> <img width="481" alt="2" src="https://github.com/ollama/ollama/assets/41323573/76dd78a4-7669-4a94-846f-fd4c803debbc">
Author
Owner

@Leroy-X commented on GitHub (Jun 7, 2024):

image
0.1.42 is now a Pre-release version, available for download on the GitHub release page

<!-- gh-comment-id:2154620395 --> @Leroy-X commented on GitHub (Jun 7, 2024): ![image](https://github.com/ollama/ollama/assets/13515498/8974f14f-cb6a-4d10-9b98-e99c99916b0e) 0.1.42 is now a Pre-release version, available for download on the GitHub release page
Author
Owner

@jmorganca commented on GitHub (Jun 7, 2024):

Hi all sorry about this, it was fixed in Hi all, sorry about this. It is fixed in 0.1.42: https://github.com/ollama/ollama/releases/tag/v0.1.42

<!-- gh-comment-id:2155671868 --> @jmorganca commented on GitHub (Jun 7, 2024): Hi all sorry about this, it was fixed in Hi all, sorry about this. It is fixed in 0.1.42: https://github.com/ollama/ollama/releases/tag/v0.1.42
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#28846