ollama /

Ollama

Live map
Snapshotmain · d67ad83

How a local model request resolves artifacts, claims hardware, starts a runner, and streams tokens.

Click a building or route
Choose a path

Resolve, prepare, schedule, execute, and stream one generation request.

System map6 components · 7 connections
130%
Ollama architectureRequests enter at the left, pass through model storage and scheduling, then cross the process boundary into the inference runner on the right.model name and capabil…messages, tools, mediamodel, options, keep-a…device placement and m…rendered prompt and op…load, tokenize, comple…tokens, metrics, stop …PromptrendererREST andCLI APIRunner processRunnerschedulerModel storeInferenceengine
Connections
BuildingsEntryServiceComputeStorageRuntimeToolingExternal

Terms, in plain English

ManifestMetadata that names a model configuration and its content-addressed layers.

How to study this repo

  1. 1
    Trace one chat request

    Follow ChatHandler through prompt rendering, scheduleRunner, completion, and the streamed response.

  2. 2
    Compare cold and warm loads

    Read sched.go to identify when a request reuses, reloads, or evicts a runner.