In this article, you will learn how to use locally hosted language models through Ollama to perform text classification tasks, all without spending a cent on API calls.

Topics we will cover include:

How to install Ollama and pull open-source models like Llama 3, Mistral, and Gemma to run locally on your machine.

How to configure the Scikit-LLM library to route requests to a local Ollama endpoint instead of a paid cloud API.

How to build a zero-shot text classifier using a local large language model and scikit-LLM in a familiar scikit-learn-style workflow.