[GH-ISSUE #5977] After changing settings with set, model crashes (sometimes 2/3 of time out of 3 sets of set commands) #3737

Open
opened 2026-04-12 14:32:52 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @mcDandy on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5977

What is the issue?

I turned off wordwrap and turned it back on. It crashed. It only crashes when I change settings. The output is

Perhaps starting with something less disruptive than turning everyone's mashed potatoes into glowing orbs would be
wise. But where was the fun in that?




>>> /?
Available Commands:
  /set            Set session variables
  /show           Show model information
  /load <model>   Load a session or model
  /save <model>   Save your current session
  /clear          Clear session context
  /bye            Exit
  /?, /help       Help for a command
  /? shortcuts    Help for keyboard shortcuts

Use """ to begin a multi-line message.

>>> /save story_stella_fairy
Created new model 'story_stella_fairy'
>>> /?
Available Commands:
  /set            Set session variables
  /show           Show model information
  /load <model>   Load a session or model
  /save <model>   Save your current session
  /clear          Clear session context
  /bye            Exit
  /?, /help       Help for a command
  /? shortcuts    Help for keyboard shortcuts

Use """ to begin a multi-line message.

>>>
... <start_of_turn>user She had to learn control. What if she accidentally converted something into plasma by nullyfying
...  the electromagnetic force holding atoms together. <end_of_turn> <start_of_turn>model
Error: error reading llm response: read tcp 127.0.0.1:55314->127.0.0.1:55004: wsarecv: Stávající připojení bylo vynuceně ukončeno vzdáleným hostitelem.
"I have a lot to learn," she said, realizing the enormity of the path
ahead.




>>> /set
Available Commands:
  /set parameter ...     Set a parameter
  /set system <string>   Set system message
  /set history           Enable history
  /set nohistory         Disable history
  /set wordwrap          Enable wordwrap
  /set nowordwrap        Disable wordwrap
  /set format json       Enable JSON mode
  /set noformat          Disable formatting
  /set verbose           Show LLM stats
  /set quiet             Disable LLM stats

>>> /set nowordwrap
Set 'nowordwrap' mode.
>>>/set wordwrap
Set 'wordwrap' mode.
>>> <start_of_turn>user She at least had less of a problem with the part of elec
... romagnetism which does not govern matter stability or directly it's temperat
... ure. Electromagnetic waves. Espetially the portion of them we call light.<en
... d_of_turn> <start_of_turn>model
Error: llama runner process has terminated: CUDA error"
PS F:\Users\user\OneDrive - Personal\Dokumenty\LLMs\gemma2.27b>  

I am using NVIDIA RTX 4080 Laptop; intel core i9-13950HX and windows11

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.2.8

Originally created by @mcDandy on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5977 ### What is the issue? I turned off wordwrap and turned it back on. It crashed. It only crashes when I change settings. The output is ``` Perhaps starting with something less disruptive than turning everyone's mashed potatoes into glowing orbs would be wise. But where was the fun in that? >>> /? Available Commands: /set Set session variables /show Show model information /load <model> Load a session or model /save <model> Save your current session /clear Clear session context /bye Exit /?, /help Help for a command /? shortcuts Help for keyboard shortcuts Use """ to begin a multi-line message. >>> /save story_stella_fairy Created new model 'story_stella_fairy' >>> /? Available Commands: /set Set session variables /show Show model information /load <model> Load a session or model /save <model> Save your current session /clear Clear session context /bye Exit /?, /help Help for a command /? shortcuts Help for keyboard shortcuts Use """ to begin a multi-line message. >>> ... <start_of_turn>user She had to learn control. What if she accidentally converted something into plasma by nullyfying ... the electromagnetic force holding atoms together. <end_of_turn> <start_of_turn>model Error: error reading llm response: read tcp 127.0.0.1:55314->127.0.0.1:55004: wsarecv: Stávající připojení bylo vynuceně ukončeno vzdáleným hostitelem. ``` ``` "I have a lot to learn," she said, realizing the enormity of the path ahead. >>> /set Available Commands: /set parameter ... Set a parameter /set system <string> Set system message /set history Enable history /set nohistory Disable history /set wordwrap Enable wordwrap /set nowordwrap Disable wordwrap /set format json Enable JSON mode /set noformat Disable formatting /set verbose Show LLM stats /set quiet Disable LLM stats >>> /set nowordwrap Set 'nowordwrap' mode. >>>/set wordwrap Set 'wordwrap' mode. >>> <start_of_turn>user She at least had less of a problem with the part of elec ... romagnetism which does not govern matter stability or directly it's temperat ... ure. Electromagnetic waves. Espetially the portion of them we call light.<en ... d_of_turn> <start_of_turn>model Error: llama runner process has terminated: CUDA error" PS F:\Users\user\OneDrive - Personal\Dokumenty\LLMs\gemma2.27b> ``` I am using NVIDIA RTX 4080 Laptop; intel core i9-13950HX and windows11 ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.2.8
GiteaMirror added the bug label 2026-04-12 14:32:52 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

Turning wordwrap on and off should only affect the CLI, it's weird that it causes the server to crash. Can you add some server logs?

<!-- gh-comment-id:2252386249 --> @rick-github commented on GitHub (Jul 26, 2024): Turning wordwrap on and off should only affect the CLI, it's weird that it causes the server to crash. Can you add some server logs?
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

Ollama.zip
There are also crashes when I tried manipulating with attention window.

<!-- gh-comment-id:2252397277 --> @mcDandy commented on GitHub (Jul 26, 2024): [Ollama.zip](https://github.com/user-attachments/files/16390041/Ollama.zip) There are also crashes when I tried manipulating with attention window.
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

I wasn't able to duplicate this. Looking at the calls to llama.cpp, there's no difference depending on set operations in the CLI. However, from the logs, these failures are out of memory failures. There's been a few OOM bugs recently, so I think this comes down to checking the memory usage calculations by ollama and how llama.cpp allocates memory for model loading and context storage. See https://github.com/ollama/ollama/issues/5913#issuecomment-2248262520 for a workaround.

<!-- gh-comment-id:2253504183 --> @rick-github commented on GitHub (Jul 26, 2024): I wasn't able to duplicate this. Looking at the calls to llama.cpp, there's no difference depending on `set` operations in the CLI. However, from the logs, these failures are out of memory failures. There's been a few OOM bugs recently, so I think this comes down to checking the memory usage calculations by ollama and how llama.cpp allocates memory for model loading and context storage. See https://github.com/ollama/ollama/issues/5913#issuecomment-2248262520 for a workaround.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3737