[GH-ISSUE #9452] context length clipped at 2048 #83847

Closed
opened 2026-05-09 19:13:49 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @zhizdev on GitHub (Mar 2, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9452

I am running into this issue when running deepseek-r1:32b.

truncating input prompt" limit=2048 prompt=91541 keep=5 new=2048

time=2025-03-01T17:27:56.756-08:00 level=WARN source=runner.go:130 msg="truncating input prompt" limit=2048 prompt=91541 keep=5 new=2048

I tried setting env var export

OLLAMA_CONTEXT_LENGTH=32768

What do I do to fix this?

Originally created by @zhizdev on GitHub (Mar 2, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9452 I am running into this issue when running deepseek-r1:32b. **truncating input prompt" limit=2048 prompt=91541 keep=5 new=2048** ``` time=2025-03-01T17:27:56.756-08:00 level=WARN source=runner.go:130 msg="truncating input prompt" limit=2048 prompt=91541 keep=5 new=2048 ``` I tried setting env var export ``` OLLAMA_CONTEXT_LENGTH=32768 ``` What do I do to fix this?
Author
Owner

@rick-github commented on GitHub (Mar 2, 2025):

Are you using version 0.5.13-rc3? Did you set it in the server environment? Also, your prompt is 91541 tokens, 32768 is too short.

<!-- gh-comment-id:2692509091 --> @rick-github commented on GitHub (Mar 2, 2025): Are you using version 0.5.13-rc3? Did you set it in the [server environment](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server)? Also, your prompt is 91541 tokens, 32768 is too short.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#83847