[GH-ISSUE #5781] Error 500 on /api/embed #81280

Closed
opened 2026-05-09 10:45:35 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @jmorganca on GitHub (Jul 18, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5781

Originally assigned to: @royjhan on GitHub.

What is the issue?

DEBUG [launch_slot_with_data] slot is processing task | slot_id=0 task_id=6368 tid="0x2000bcc00" timestamp=1721333414
time=2024-07-18T13:10:14.830-07:00 level=ERROR source=routes.go:367 msg="embedding generation failed" error="do embedding request: Post \"http://127.0.0.1:64691/embedding\": EOF"
[GIN] 2024/07/18 - 13:10:14 | 500 |  166.036292ms |       127.0.0.1 | POST     "/api/embed"

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @jmorganca on GitHub (Jul 18, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5781 Originally assigned to: @royjhan on GitHub. ### What is the issue? ``` DEBUG [launch_slot_with_data] slot is processing task | slot_id=0 task_id=6368 tid="0x2000bcc00" timestamp=1721333414 time=2024-07-18T13:10:14.830-07:00 level=ERROR source=routes.go:367 msg="embedding generation failed" error="do embedding request: Post \"http://127.0.0.1:64691/embedding\": EOF" [GIN] 2024/07/18 - 13:10:14 | 500 | 166.036292ms | 127.0.0.1 | POST "/api/embed" ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-05-09 10:45:35 -05:00
Author
Owner

@royjhan commented on GitHub (Jul 18, 2024):

Probably not related but worth noting that passing in input: [""] returns an embedding and is equal to passing in [" "] (with a space) due to the line below in server.cpp:

task.data["prompt"] = " "; // add a space so that we have one token

<!-- gh-comment-id:2237755764 --> @royjhan commented on GitHub (Jul 18, 2024): Probably not related but worth noting that passing in input: `[""]` returns an embedding and is equal to passing in `[" "]` (with a space) due to the line below in server.cpp: ` task.data["prompt"] = " "; // add a space so that we have one token`
Author
Owner

@royjhan commented on GitHub (Jul 19, 2024):

occurs ~1/3 of the time with python demo.py data/paul_graham_essays.txt '' '' '' '' or space, unable to reproduce if empty strings replaced with characters

<!-- gh-comment-id:2240129928 --> @royjhan commented on GitHub (Jul 19, 2024): occurs ~1/3 of the time with `python demo.py data/paul_graham_essays.txt '' '' '' ''` or space, unable to reproduce if empty strings replaced with characters
Author
Owner

@royjhan commented on GitHub (Aug 13, 2024):

Unable to reproduce after moving batching from runner to server

<!-- gh-comment-id:2286785492 --> @royjhan commented on GitHub (Aug 13, 2024): Unable to reproduce after moving batching from runner to server
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#81280