[GH-ISSUE #2215] Batching #63306

Closed
opened 2026-05-03 12:57:09 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @varunshenoy on GitHub (Jan 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2215

Is there any plan to support batching prompts in Ollama? Thank you! Would love to use this to automate some local workflows with higher throughput.

Originally created by @varunshenoy on GitHub (Jan 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2215 Is there any plan to support batching prompts in Ollama? Thank you! Would love to use this to automate some local workflows with higher throughput.
Author
Owner

@pdevine commented on GitHub (Jan 26, 2024):

You can actually already do this w/ piping in the CLI.
echo "Why is the sky blue?\nList some cool facts" | ollama run mistral

You can alternatively save the prompts to a text file and feed them in with:
ollama run mistral < textfile.txt

Hopefully this is helpful! I'm going to close the issue.

<!-- gh-comment-id:1912830654 --> @pdevine commented on GitHub (Jan 26, 2024): You can actually already do this w/ piping in the CLI. `echo "Why is the sky blue?\nList some cool facts" | ollama run mistral` You can alternatively save the prompts to a text file and feed them in with: `ollama run mistral < textfile.txt` Hopefully this is helpful! I'm going to close the issue.
Author
Owner

@varunshenoy commented on GitHub (Jan 27, 2024):

@pdevine I don't think this would actually perform batching. It just seems to answer questions sequentially. Ideally I want to batch together 4-5 different prompts in the same forward pass.

SCR-20240126-oniz
<!-- gh-comment-id:1912868096 --> @varunshenoy commented on GitHub (Jan 27, 2024): @pdevine I don't think this would actually perform batching. It just seems to answer questions sequentially. Ideally I want to batch together 4-5 different prompts in the same forward pass. <img width="743" alt="SCR-20240126-oniz" src="https://github.com/ollama/ollama/assets/10859091/f2a941cf-f18e-4f44-96c2-62ed553f869d">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63306