mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-23 18:41:28 -05:00
[GH-ISSUE #1747] Stop Sequence with Backslash '\' Does Not Work #12624
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ibndias on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1747
Bug Report
Stop Sequence with Backslash '' Does Not Work
Description
It seems there is a post process that escape the backslash character. So the final stop sequence produces is incorrect.
Bug Summary:
It seems there is a post process that escape the backslash character. So the final stop sequence produces is incorrect.
Steps to Reproduce:
I am using VLLM Backend.
Open any model, and set stop token on every line break, example set:
\nExpected Behavior:
Stop token should be stay
\ninstead of becoming\\nActual Behavior:
The stop token shown in my inspection is escaped and added another backslash prefix.
Environment
Ollama Version 0.1.32
Reproduction Details
I am using VLLM Backend.
Open any model, and set stop token on every line break, example set:
\nConfirmation:
Logs and Screenshots
As we can see the system prompt has no problem handling line break into
\nBut the stop sequence becomes
\\ninstead of just\nInstallation Method
Docker Method
@tjbck commented on GitHub (Apr 27, 2024):
Taking a look!
@tjbck commented on GitHub (Apr 28, 2024):
Should be fixed on our dev branch, let me know if the issue persists!