[GH-ISSUE #5323] Weird output with any typos in accepted commands #65371

Closed
opened 2026-05-03 21:02:47 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @yoshimario on GitHub (Jun 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5323

What is the issue?

Problem is program outputs weird text if the program experiences commands that are not in the program list. This should result in an error message instead of a never ending loop of erraneous output. This should be handled better instead of forcing the process to close using ctr + c.

`>>> exit

exit
cd /
exit
ls -la
cd /etc/rc.d/init.d
ls -lha
vim httpd
exit
ls -la
cd /etc/sysconfig
ls -la
vim httpd`

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.1.46

Originally created by @yoshimario on GitHub (Jun 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5323 ### What is the issue? Problem is program outputs weird text if the program experiences commands that are not in the program list. This should result in an error message instead of a never ending loop of erraneous output. This should be handled better instead of forcing the process to close using ctr + c. `>>> exit exit cd / exit ls -la cd /etc/rc.d/init.d ls -lha vim httpd exit ls -la cd /etc/sysconfig ls -la vim httpd` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.1.46
GiteaMirror added the bug label 2026-05-03 21:02:47 -05:00
Author
Owner

@royjhan commented on GitHub (Jun 27, 2024):

Unable to reproduce this, can you provide more specific steps?

<!-- gh-comment-id:2195495667 --> @royjhan commented on GitHub (Jun 27, 2024): Unable to reproduce this, can you provide more specific steps?
Author
Owner

@yoshimario commented on GitHub (Jun 27, 2024):

Unable to reproduce this, can you provide more specific steps?

Step 1 in terminal: ollama run starcoder2:3b
Step 2: type bye for example then it spits out random text ```
`bug, :only => [ :show ]

These are all the routes we use in the Ruby on Rails 6 Tutorial

project.

resource<file_sep><fim_prefix><fim_suffix>-1.0.2/lib/pry/repl.rb:38:in
block in start' from /Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:93:in block in timeout'
from
/Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:103:in
call' from /Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:103:in timeout'
from /`

<!-- gh-comment-id:2195648169 --> @yoshimario commented on GitHub (Jun 27, 2024): > Unable to reproduce this, can you provide more specific steps? Step 1 in terminal: `ollama run starcoder2:3b` Step 2: type `bye` for example then it spits out random text ``` `bug, :only => [ :show ] # These are all the routes we use in the Ruby on Rails 6 Tutorial project. resource<file_sep><fim_prefix><fim_suffix>-1.0.2/lib/pry/repl.rb:38:in `block in start' from /Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout' from /Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:103:in `call' from /Users/coryrastus/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/timeout.rb:103:in `timeout' from /` ```
Author
Owner

@royjhan commented on GitHub (Jun 27, 2024):

Starcoder is a code completion model, so this behavior doesn't have to do with commands/typos. The behavior you are describing is possible from an arbitrary prompt "exit". With llama for example, it doesn't actually exit, the model responds to the prompt "exit"

Screenshot 2024-06-27 at 3 30 08 PM
<!-- gh-comment-id:2195770515 --> @royjhan commented on GitHub (Jun 27, 2024): Starcoder is a code completion model, so this behavior doesn't have to do with commands/typos. The behavior you are describing is possible from an arbitrary prompt "exit". With llama for example, it doesn't actually exit, the model responds to the prompt "exit" <img width="837" alt="Screenshot 2024-06-27 at 3 30 08 PM" src="https://github.com/ollama/ollama/assets/65097070/2828f4d3-bd54-4b34-828e-c839342bdb07">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65371