[GH-ISSUE #13643] Model input character limit #34732

Open
opened 2026-04-22 18:33:30 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vZzzv on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/13643

What is the issue?

When using the embedding bge-m3:latest model, it was discovered that the latest versions of ollama have an input text limit of approximately 100-120 words.
In older versions, there was no such limit.

{
"error": "failed to encode response: json: unsupported value: NaN"
}

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @vZzzv on GitHub (Jan 8, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/13643 ### What is the issue? When using the embedding bge-m3:latest model, it was discovered that the latest versions of ollama have an input text limit of approximately 100-120 words. In older versions, there was no such limit. { "error": "failed to encode response: json: unsupported value: NaN" } ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-22 18:33:30 -05:00
Author
Owner

@noobyogi0010 commented on GitHub (Jan 12, 2026):

Hello @vZzzv
What do you expect here? Shall we remove the input limit?
Thanks

<!-- gh-comment-id:3737276752 --> @noobyogi0010 commented on GitHub (Jan 12, 2026): Hello @vZzzv What do you expect here? Shall we remove the input limit? Thanks
Author
Owner

@vZzzv commented on GitHub (Jan 12, 2026):

您发给我的信件已经收到。

<!-- gh-comment-id:3737278706 --> @vZzzv commented on GitHub (Jan 12, 2026): 您发给我的信件已经收到。
Author
Owner

@nicho2 commented on GitHub (Feb 3, 2026):

I see this bug too that didn't exist before with bge-m3:latest

time=2026-02-03T12:09:29.990Z level=DEBUG source=sched.go:678 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-daec91ffb5dd0c27411bd71f29932917c49cf529a641d0168496c3a501e3062c

time=2026-02-03T12:09:30.016Z level=DEBUG source=ggml.go:298 msg="key with type not found" key=general.alignment default=32

time=2026-02-03T12:09:30.018Z level=DEBUG source=cache.go:104 msg="loading cache slot" id=0 cache=26 prompt=27 used=0 remaining=27

decode: cannot decode batches with this context (calling encode() instead)

init: embeddings required but some input tokens were not marked as outputs -> overriding

time=2026-02-03T12:09:30.024Z level=INFO source=server.go:1748 msg="llm embedding error: failed to encode response: json: unsupported value: NaN"

[GIN] 2026/02/03 - 12:09:30 | 500 |  121.408856ms |     10.2.142.71 | POST     "/api/embed"
<!-- gh-comment-id:3840947543 --> @nicho2 commented on GitHub (Feb 3, 2026): I see this bug too that didn't exist before with bge-m3:latest time=2026-02-03T12:09:29.990Z level=DEBUG source=sched.go:678 msg="evaluating already loaded" model=/root/.ollama/models/blobs/sha256-daec91ffb5dd0c27411bd71f29932917c49cf529a641d0168496c3a501e3062c time=2026-02-03T12:09:30.016Z level=DEBUG source=ggml.go:298 msg="key with type not found" key=general.alignment default=32 time=2026-02-03T12:09:30.018Z level=DEBUG source=cache.go:104 msg="loading cache slot" id=0 cache=26 prompt=27 used=0 remaining=27 decode: cannot decode batches with this context (calling encode() instead) init: embeddings required but some input tokens were not marked as outputs -> overriding time=2026-02-03T12:09:30.024Z level=INFO source=server.go:1748 msg="llm embedding error: failed to encode response: json: unsupported value: NaN" [GIN] 2026/02/03 - 12:09:30 | 500 | 121.408856ms | 10.2.142.71 | POST "/api/embed"
Author
Owner

@vZzzv commented on GitHub (Feb 3, 2026):

您发给我的信件已经收到。

<!-- gh-comment-id:3840949652 --> @vZzzv commented on GitHub (Feb 3, 2026): 您发给我的信件已经收到。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#34732