- You have to write a batch file, upload it, and check for results until they are ready.
- Each provider limits the size of a batch, so you have to split a large dataset into several batches and track each one.
batch=True when you create an LLM object.
Supported providers
The
litellm backend does not support batch mode. The mistral and azure backends support only batch mode.
Example
This example writes new responses for the first messages in the WildChat dataset. The class is the same for every provider.batch=True.
- OpenAI
- Anthropic
- Gemini
- Mistral
- Azure OpenAI
Set your API key.To use another API that is compatible with the OpenAI batch API, set
backend="openai" and pass base_url and api_key in backend_params.Batch settings
Pass these keys inbackend_params when batch=True.
max_retries.
Cancel running batches
To cancel the batches of a run, call the object again with the same input andbatch_cancel=True. Curator asks you to confirm before it cancels them.