[PR #6220] [MERGED] server: parallelize embeddings in API web handler instead of in subprocess runner #22597

Closed
opened 2026-04-19 16:25:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6220
Author: @jmorganca
Created: 8/7/2024
Status: Merged
Merged: 8/11/2024
Merged by: @jmorganca

Base: mainHead: jmorganca/embed-parallel


📝 Commits (10+)

📊 Changes

4 files changed (+53 additions, -71 deletions)

View changed files

📝 llm/ext_server/server.cpp (+8 -34)
📝 llm/server.go (+14 -18)
📝 server/routes.go (+27 -15)
📝 server/sched_test.go (+4 -4)

📄 Description

This moves the "batching" for the /api/embed endpoint to the Go server instead of in the runner, helping to keep the interface in llm simpler


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/6220 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 8/7/2024 **Status:** ✅ Merged **Merged:** 8/11/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/embed-parallel` --- ### 📝 Commits (10+) - [`e16a46b`](https://github.com/ollama/ollama/commit/e16a46b541ebe08418e146e62ca73d5d48e6bf8f) batch embeddings in `server` - [`7583d1a`](https://github.com/ollama/ollama/commit/7583d1a6c62ee285cc1a761f9076eb5cd2729997) fix linter - [`5f20cc8`](https://github.com/ollama/ollama/commit/5f20cc8a598ab67188e13d23593ba433f97170c3) fix prompt count - [`696e699`](https://github.com/ollama/ollama/commit/696e69986d5004fe480720c97b12517d009ad6bc) fix linter - [`08bba06`](https://github.com/ollama/ollama/commit/08bba06d507133b2f0fa83b6c9b35127781e4e36) fix linter - [`2d8b072`](https://github.com/ollama/ollama/commit/2d8b07279ce0863be8d403f5bba6bf9c4118812e) use errgroup - [`8ec65f0`](https://github.com/ollama/ollama/commit/8ec65f01d87d3006a342161a08eee5c295a30f81) address comments - [`1db7062`](https://github.com/ollama/ollama/commit/1db70628069ac1088e06878b4b7eea2c3dd2581b) address comments - [`2b4fcfb`](https://github.com/ollama/ollama/commit/2b4fcfb72a4f8308bc43d5ec0d0373863ee5d065) remove unused argument - [`7e848d9`](https://github.com/ollama/ollama/commit/7e848d983a9a6c6a0ed10a21d79ba9f351bdc567) remove unnecessary temp vars and lock ### 📊 Changes **4 files changed** (+53 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `llm/ext_server/server.cpp` (+8 -34) 📝 `llm/server.go` (+14 -18) 📝 `server/routes.go` (+27 -15) 📝 `server/sched_test.go` (+4 -4) </details> ### 📄 Description This moves the "batching" for the `/api/embed` endpoint to the Go server instead of in the runner, helping to keep the interface in `llm` simpler --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 16:25:54 -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#22597