[GH-ISSUE #3873] Suggestion for continuous batching #80081

Closed
opened 2026-05-09 08:13:14 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @baptistejamin on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3873

74d2a9ef9a/llm/server.go (L197C6-L197C21)

It appears Continuous batching can work but ctx-size shall be updated to NUM_PARALLEL * ctx-size https://github.com/ggerganov/llama.cpp/discussions/4130#discussioncomment-8053636

Originally created by @baptistejamin on GitHub (Apr 24, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3873 https://github.com/ollama/ollama/blob/74d2a9ef9aa6a4ee31f027926f3985c9e1610346/llm/server.go#L197C6-L197C21 It appears Continuous batching can work but ctx-size shall be updated to NUM_PARALLEL * ctx-size https://github.com/ggerganov/llama.cpp/discussions/4130#discussioncomment-8053636
Author
Owner

@dhiltgen commented on GitHub (May 1, 2024):

I should remove that comment as it's stale. Sorry for the confusion.

The default is actually true - 952d03dbea/common/common.h (L152) so that's why I didn't see any perf difference when I was setting the flag in my earlier testing.

We're also adjusting the ctx as well - https://github.com/ollama/ollama/blob/main/server/sched.go#L94

<!-- gh-comment-id:2089234469 --> @dhiltgen commented on GitHub (May 1, 2024): I should remove that comment as it's stale. Sorry for the confusion. The default is actually true - https://github.com/ggerganov/llama.cpp/blob/952d03dbead16e4dbdd1d3458486340673cc2465/common/common.h#L152 so that's why I didn't see any perf difference when I was setting the flag in my earlier testing. We're also adjusting the ctx as well - https://github.com/ollama/ollama/blob/main/server/sched.go#L94
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#80081