Question - Batch Processing #205

Closed
opened 2026-02-15 16:28:44 -05:00 by yindo · 2 comments
Owner

Originally created by @virentakia on GitHub (Jan 22, 2025).

I'm processing a batch of approximately 100 prompts, each ranging from 1,200 to 14,000 tokens in length. Given that the input context length must be specified during client initialisation, I'm considering two options:

  1. Initialize the client with the maximum token length of 14,000 tokens.
    OR
  2. Instantiate the client each time with the required context length.

Are there other avenues I should be exploring?

Originally created by @virentakia on GitHub (Jan 22, 2025). I'm processing a batch of approximately 100 prompts, each ranging from 1,200 to 14,000 tokens in length. Given that the input context length must be specified during client initialisation, I'm considering two options: 1. Initialize the client with the maximum token length of 14,000 tokens. OR 2. Instantiate the client each time with the required context length. Are there other avenues I should be exploring?
yindo closed this issue 2026-02-15 16:28:44 -05:00
Author
Owner

@jessegross commented on GitHub (Jan 23, 2025):

The first one - the second will cause model reloading as you switch context lengths.

@jessegross commented on GitHub (Jan 23, 2025): The first one - the second will cause model reloading as you switch context lengths.
Author
Owner

@virentakia commented on GitHub (Jan 23, 2025):

Thanks @jessegross 😊, appreciate it

@virentakia commented on GitHub (Jan 23, 2025): Thanks @jessegross 😊, appreciate it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#205