Skip to main content
You can use a model served by Ollama with Curator. This guide generates a list of countries and their capitals.

Prerequisites

  • Python 3.10 or later.
  • Curator, installed with pip install bespokelabs-curator.
  • Ollama, from the Ollama download page.
1

Create an LLM subclass

2

Start Ollama

Pull a model and start the server.
3

Connect Curator to Ollama

Add the ollama/ prefix to the model name, and set base_url to your Ollama server.
Curator sends Ollama requests through the LiteLLM backend.
4

Generate the data

The output looks like this.