Portrait of Michael Limberger

Michael Limberger

Need me? Email mike@limberger.ca

AI

The Technology Stack

The local server

Before we send a picture anywhere, name the tools.

Ollama is a program that runs AI language models on your own computer. Think of it as a local server that speaks AI. Instead of sending your data to OpenAI or Google, everything stays on your machine.

Ollama runs in the background and listens for requests on port 11434. You send it a question (called a prompt), and it sends back an answer.

Website: ollama.com.

Installing Ollama

macOS or Linux:

Show me.

curl -fsSL https://ollama.com/install.sh | sh

Windows: download the installer from ollama.com/download.

After installation, start the Ollama server:

ollama serve

This runs in the foreground. Open a new terminal for other commands. You can also run it as a background service, but for learning, a visible terminal helps you see what is happening.

Is it listening?

In a new terminal:

Show me.

curl http://localhost:11434/api/tags

If Ollama is running, you will see a list of installed models, or an empty list if you have not downloaded any yet. If you get "connection refused," the server is not running.

What a vision model is

A regular language model (like ChatGPT) only understands text. You type words, it responds with words.

A vision model can understand both text and images. You can show it a picture and ask "What do you see?" and it will describe the image in words.

Under the hood, vision models are trained on millions of image-text pairs. They learned to connect visual patterns with language. When you send an image, the model converts it into a numerical representation and processes it alongside your text prompt.

Getting a vision model

Not all Ollama models can see images. You need one specifically trained for vision.

Show me.

ollama pull ministral      # Mistral's vision model (what we use)
ollama pull llava          # Popular open-source option
ollama pull minicpm-v      # Lightweight alternative

For this session we use ministral, but any vision model works. The download might take a few minutes. Models are typically 4 to 14 GB.

Quantization is how those sizes stay sane: the model weights get stored with fewer bits, so the file is smaller and RAM use drops. Ollama's tags often already pick a quantized variant for you. We are not tuning that tonight.

What you have installed

Show me.

ollama list

You will see something like:

NAME                              SIZE
ministral:latest                  8.6 GB
llama3:latest                     4.7 GB

The vision-capable models will work with images. Regular text models will error if you send them a picture.

A two-terminal smoke test

In one terminal:

ollama serve

In another:

curl http://localhost:11434/api/tags | head

If you see JSON listing your models, you are ready to continue.