[GH-ISSUE #4524] Default Stop Sequence is not working when user provides additional stop sequences #2837

Open
opened 2026-04-12 13:10:48 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Nanthagopal-Eswaran on GitHub (May 19, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4524

What is the issue?

I want to stop generation at stop sequence "\nObservation".

My expectation here is generation will stop at either "\nObservation" or models default stop sequence "<|eot_id|>" (in llama3 case).

But it does not happen and model keep on generating answer.

Request:
image

Response:
image

I think we should add stop sequences to default stop sequence instead of replacing them

OS

Windows

GPU

No response

CPU

Intel

Ollama version

0.1.27

Originally created by @Nanthagopal-Eswaran on GitHub (May 19, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4524 ### What is the issue? I want to stop generation at stop sequence "\nObservation". My expectation here is generation will stop at either "\nObservation" or models default stop sequence "<|eot_id|>" (in llama3 case). But it does not happen and model keep on generating answer. Request: ![image](https://github.com/ollama/ollama/assets/115451020/294228a0-5364-4ea1-9910-b2d71bd70b60) Response: ![image](https://github.com/ollama/ollama/assets/115451020/e4ed4524-84d6-4d05-8700-7f467df5e84f) > I think we should add stop sequences to default stop sequence instead of replacing them ### OS Windows ### GPU _No response_ ### CPU Intel ### Ollama version 0.1.27
GiteaMirror added the bug label 2026-04-12 13:10:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2837