liveBook · Manning

Ollama

As explained in Domain-Specific Small Language Models

A local model runtime and serving tool that downloads, runs, and exposes quantized language models through an API and chat interface.

Ollama is a local runtime and serving tool for downloading, running, and exposing quantized language models on a laptop. It packages model weights, configuration, and data through a Modelfile, optimizes GPU use, and serves models through a local API and chat interface. section 12.2

Operational characteristics shape the main deployment tradeoffs:

  • Supports community GGUF models from the Hugging Face Hub, as well as text, vision, multimodal, and embedding models. section 12.2
  • Downloads a model automatically on its first run, then starts the local command-line chat interface on subsequent runs. section 12.2
  • Uses quantization to reduce memory and compute requirements; typical RAM guidance is 8 GB for 7B–8B models, 14–16 GB for 13B, and 32 GB for 33B. section 12.2
  • Runs on Windows, macOS, and Linux, with a Docker image available for deployment. section 12.2
  • Exposes local REST endpoints for chat and model management, allowing client applications to use the hosted model. section 12.7

Run a model and call its API

Use `ollama run deepseek-r1:8B` to download the model if necessary and begin a local chat. A client can instead POST messages to `http://localhost:11434/api/chat` with a selected model such as `mistral:latest`.

After downloading, Ollama can operate fully offline, keeping inference on the laptop. Privacy still requires local controls: the updater checks an external endpoint periodically, while plaintext prompt history and server logs remain on the installation. section 12.2.2

How Domain-Specific Small Language Models covers it

How deep it goes
Explains installation, model retrieval, quantization, hardware needs, APIs, packaging, and privacy caveats without detailing server internals.
Examples
Demonstrates DeepSeek-R1 and Mistral commands, Hugging Face model retrieval, model listing, deletion, and a curl chat request.
What it assumes
Assumes basic terminal use and hardware awareness while teaching model downloads, local serving, API access, and offline considerations.
What you can do after
Operate local quantized models, expose them through an API, and assess hardware and privacy constraints.
How it connects
Connects local language models with GGUF, quantization, llama.cpp, Modelfile, REST API, and offline inference.

Also explained in

Compare how 8 books explain Ollama →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Domain-Specific Small Language Models. The section links point to the parts of the book it draws on.