[GH-ISSUE #7683] Does ollama support batching generate? #51415

Closed
opened 2026-04-28 19:57:10 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Wu-tn on GitHub (Nov 15, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7683

Originally created by @Wu-tn on GitHub (Nov 15, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7683
GiteaMirror added the question label 2026-04-28 19:57:11 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 15, 2024):

What would you like to accomplish with batching generate?

<!-- gh-comment-id:2478306369 --> @rick-github commented on GitHub (Nov 15, 2024): What would you like to accomplish with batching generate?
Author
Owner

@Wu-tn commented on GitHub (Nov 15, 2024):

I want to use ollama to run llama3.2 to generate texts with several prompts, Like output = model.generate(**batch,...) , then model will generate several response simultaneously

<!-- gh-comment-id:2478315525 --> @Wu-tn commented on GitHub (Nov 15, 2024): I want to use ollama to run llama3.2 to generate texts with several prompts, Like output = model.generate(**batch,...) , then model will generate several response simultaneously
Author
Owner

@rick-github commented on GitHub (Nov 15, 2024):

The ollama API doesn't support multiple prompts, and only creates one response per API call (it doesn't support OpenAI's n parameter).

<!-- gh-comment-id:2478343772 --> @rick-github commented on GitHub (Nov 15, 2024): The ollama API doesn't support multiple prompts, and only creates one response per API call (it doesn't support OpenAI's [`n`](https://platform.openai.com/docs/api-reference/completions/create#completions-create-n) parameter).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51415