liveBook · Manning

Modelfile

A Modelfile is Ollama’s declarative configuration file for specifying a model’s base, prompts, parameters, and other settings.

How 2 Manning books explain it

Build Applications with Local AI Models on a Mac

A Modelfile is Ollama's declarative file format for specifying the base model, prompts, parameters, and other settings of a custom model.

How it is used
Bundles a base model, system prompt, and parameters into a reusable Ollama model that can be run by name.
How deep it goes
Works through required and optional instructions, then shows creation and running commands; defers prompt-template customization as advanced.
Examples
Uses study-assistant, pirate-tutor, and code-reviewer configurations, plus Ollama commands to create and run named models.
What you can do after
Build it from scratch with a plain-text Modelfile, then create and run the named model using Ollama.

Read how Build Applications with Local AI Models on a Mac explains Modelfile →

Domain-Specific Small Language Models

An Ollama configuration file that specifies how to package and serve a converted model, including template and generation parameters.

How it is used
Defines the packaging and serving settings for a converted Ollama model.
How deep it goes
Defines the core commands and parameters, but stops short of full syntax coverage or broader model conversion details.
Examples
Uses a StarCoder2 GGUF conversion, a sample Modelfile, and ollama create/run commands.
What you can do after
Operate a converted model locally by packaging it with templates, stop tokens, and generation parameters.

Read how Domain-Specific Small Language Models explains Modelfile →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.