[GH-ISSUE #6932] qwen2.5coder /api/generate odd behavior when suffix is present but empty string. #30148

Open
opened 2026-04-22 09:38:16 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @kirel on GitHub (Sep 24, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6932

What is the issue?

Please check the difference between

echo -e $(curl http://localhost:11434/api/generate -d '{
  "model": "qwen2.5-coder:1.5b",
  "prompt": "def fib(", "suffix": " "
}' | jq -s 'map(.response) | join("")')

and

echo -e $(curl http://localhost:11434/api/generate -d '{
  "model": "qwen2.5-coder:1.5b",
  "prompt": "def fib(", "suffix": ""
}' | jq -s 'map(.response) | join("")')

In the second case the model does not act as FIM as I would expect (ands the template suggests). In the first case it does.
Maybe this is intended but I would not have expected it.

OS

No response

GPU

No response

CPU

No response

Ollama version

0.3.11

Originally created by @kirel on GitHub (Sep 24, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6932 ### What is the issue? Please check the difference between ``` echo -e $(curl http://localhost:11434/api/generate -d '{ "model": "qwen2.5-coder:1.5b", "prompt": "def fib(", "suffix": " " }' | jq -s 'map(.response) | join("")') ``` and ``` echo -e $(curl http://localhost:11434/api/generate -d '{ "model": "qwen2.5-coder:1.5b", "prompt": "def fib(", "suffix": "" }' | jq -s 'map(.response) | join("")') ``` In the second case the model does not act as FIM as I would expect (ands the template suggests). In the first case it does. Maybe this is intended but I would not have expected it. ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.3.11
GiteaMirror added the bug label 2026-04-22 09:38:17 -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#30148