[GH-ISSUE #11314] The error message of the last function embedded is incorrect #33225

Closed
opened 2026-04-22 15:40:55 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @qukuqhd on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11314

What is the issue?

When I sent a long piece of content to Ollama for embed generation it gave an error message which made no sense.

Image I use the granite-embedding:278m model for embedding generation and request the ollma service through golang at github.com/ollama/ollama

Relevant log output


OS

Linux

GPU

Nvidia

CPU

AMD

Ollama version

0.9.0

Originally created by @qukuqhd on GitHub (Jul 6, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11314 ### What is the issue? When I sent a long piece of content to Ollama for embed generation it gave an error message which made no sense. <img width="2127" height="1315" alt="Image" src="https://github.com/user-attachments/assets/457e3a85-6a08-4d43-81e3-82bc94899a4b" /> I use the granite-embedding:278m model for embedding generation and request the ollma service through golang at github.com/ollama/ollama ### Relevant log output ```shell ``` ### OS Linux ### GPU Nvidia ### CPU AMD ### Ollama version 0.9.0
GiteaMirror added the needs more infobug labels 2026-04-22 15:40:56 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 6, 2025):

The runner crashed. Normally the ollama server logs would be useful but if I understand correctly, you are linking against the ollama library rather than using it as a server. It might be https://github.com/ollama/ollama/issues/7288#issuecomment-2591709109, in which case setting num_ctx could prevent crashes.

<!-- gh-comment-id:3042306186 --> @rick-github commented on GitHub (Jul 6, 2025): The runner crashed. Normally the ollama server logs would be useful but if I understand correctly, you are linking against the ollama library rather than using it as a server. It might be https://github.com/ollama/ollama/issues/7288#issuecomment-2591709109, in which case setting `num_ctx` could prevent crashes.
Author
Owner

@qukuqhd commented on GitHub (Jul 7, 2025):

运行器崩溃了。通常情况下,ollama 服务器日志会很有用,但如果我理解正确的话,您是在链接 ollama 库,而不是将其用作服务器。这可能是#7288 (评论) 的问题,在这种情况下,设置num_ctx可以防止崩溃。

我知道是输入的内容超出模型上下文的错误,主要是这个错误信息提示是一个不合理的,给我产生了误解,我一开始还通过调试检查了请求的路径。我是使用这个仓库的Ollama的客户端(使用golang把这个仓库作为第三方库)来访问为安装的Ollama服务,然后错误信息是Ollama服务响应过来的。
I know that the input content exceeds the model context. The main reason is that the error message is not reasonable and gave me a misunderstanding. I also checked the request path through debugging at the beginning. I used the Ollama client of this warehouse (using golang to use this warehouse as a third-party library) to access the installed Ollama service, and the error message was responded by the Ollama service.

<!-- gh-comment-id:3043260377 --> @qukuqhd commented on GitHub (Jul 7, 2025): > 运行器崩溃了。通常情况下,ollama 服务器日志会很有用,但如果我理解正确的话,您是在链接 ollama 库,而不是将其用作服务器。这可能是[#7288 (评论) 的](https://github.com/ollama/ollama/issues/7288#issuecomment-2591709109)问题,在这种情况下,设置`num_ctx`可以防止崩溃。 我知道是输入的内容超出模型上下文的错误,主要是这个错误信息提示是一个不合理的,给我产生了误解,我一开始还通过调试检查了请求的路径。我是使用这个仓库的Ollama的客户端(使用golang把这个仓库作为第三方库)来访问为安装的Ollama服务,然后错误信息是Ollama服务响应过来的。 I know that the input content exceeds the model context. The main reason is that the error message is not reasonable and gave me a misunderstanding. I also checked the request path through debugging at the beginning. I used the Ollama client of this warehouse (using golang to use this warehouse as a third-party library) to access the installed Ollama service, and the error message was responded by the Ollama service.
Author
Owner

@rick-github commented on GitHub (Jul 7, 2025):

If you use a more recent version of the code, the error message will give more details on what to do.

<!-- gh-comment-id:3043263155 --> @rick-github commented on GitHub (Jul 7, 2025): If you use a more recent version of the code, the error message will give more details on what to do.
Author
Owner

@qukuqhd commented on GitHub (Jul 7, 2025):

如果您使用较新版本的代码,错误消息将提供有关如何操作的更多详细信息。

如果您使用较新版本的代码,错误消息将提供有关如何操作的更多详细信息。
0.9.0 should be a newer version, I installed Ollama via Snap

Image
<!-- gh-comment-id:3043267758 --> @qukuqhd commented on GitHub (Jul 7, 2025): > 如果您使用较新版本的代码,错误消息将提供有关如何操作的更多详细信息。 > 如果您使用较新版本的代码,错误消息将提供有关如何操作的更多详细信息。 0.9.0 should be a newer version, I installed Ollama via Snap <img width="775" height="362" alt="Image" src="https://github.com/user-attachments/assets/423edb9b-48e5-43ed-9a8c-3e5fd42fdee8" />
Author
Owner

@rick-github commented on GitHub (Jul 7, 2025):

https://github.com/ollama/ollama/releases/tag/v0.9.5

<!-- gh-comment-id:3043283198 --> @rick-github commented on GitHub (Jul 7, 2025): https://github.com/ollama/ollama/releases/tag/v0.9.5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33225