Which version of LM Studio?
LM Studio 0.4.2+2 (0.4.2+2)
Which operating system?
macOS (Apple Silicon, M‑series)
What is the bug?
LM Studio’s built-in OpenAI-compatible chat server prematurely terminates generation when the output contains ChatML/Qwen special tokens such as:
"stop": [
"<|im_end|>",
"<im_end>",
"</s>"
]
這些符號是什麼呢?
These tokens are treated as stop sequences even when they appear as normal text content. Generation is truncated and the UI shows:
"Stop reason: found EOS Token"
This makes it impossible to quote documentation, explain templates, or process text that contains these tokens.
Screenshots:
(attach screenshot showing “Stop reason: found EOS Token”)
Logs:
UI displays: Stop reason: found EOS Token
No crash or client disconnect. The server intentionally stops generation.
To Reproduce:
- Start LM Studio
- Load a Qwen / Qwen-Coder model (e.g. qwen3-coder-next)
- Use the built-in chat
- Send: Explain what <im_end> means in Qwen template.
- Generation immediately stops or returns partial output
Expected behavior:
The model should treat "<im_end>" as plain text and continue generating normally.
Actual behavior:
Generation stops whenever the string appears.
Additional technical details:
LM Studio appears to automatically inject stop sequences like:
"stop": ["<|im_end|>", "<im_end>", ""]
This suggests string-level matching instead of tokenizer-level EOS detection, causing false positives.
Which version of LM Studio?
LM Studio 0.4.2+2 (0.4.2+2)
Which operating system?
macOS (Apple Silicon, M‑series)
What is the bug?
LM Studio’s built-in OpenAI-compatible chat server prematurely terminates generation when the output contains ChatML/Qwen special tokens such as:
These tokens are treated as stop sequences even when they appear as normal text content. Generation is truncated and the UI shows:
"Stop reason: found EOS Token"
This makes it impossible to quote documentation, explain templates, or process text that contains these tokens.
Screenshots:
(attach screenshot showing “Stop reason: found EOS Token”)
Logs:
UI displays: Stop reason: found EOS Token
No crash or client disconnect. The server intentionally stops generation.
To Reproduce:
Expected behavior:
The model should treat "<im_end>" as plain text and continue generating normally.
Actual behavior:
Generation stops whenever the string appears.
Additional technical details:
LM Studio appears to automatically inject stop sequences like:
"stop": ["<|im_end|>", "<im_end>", ""]
This suggests string-level matching instead of tokenizer-level EOS detection, causing false positives.