In Ollama, what does `ollama pull llama3` fetch when you give no tag, and why pin a tag such as `llama3:70b` instead?
answer
- names have hidden default parts
- host, namespace, tag all defaulted
- latest is a movable pointer
- re-pull fetches the manifest again
- ID column in ollama ls
basics
~10 sA bare name expands to registry.ollama.ai/library/llama3:latest, and latest is only a tag its publisher can repoint. Pinning an explicit size-and-quant tag and comparing the ID column of ollama ls keeps machines on one build.
solid answer
~40 sOllama names are `[host/][namespace/]model[:tag]`, and every part you leave out is filled in: host `registry.ollama.ai`, namespace `library`, tag `latest`. So `ollama pull llama3` means `registry.ollama.ai/library/llama3:latest`. `latest` is a tag like any other, pointing at whatever manifest the publisher last put there, and a later pull of the same name fetches that manifest again, downloads only the blobs it does not already have and drops the layers nothing uses any more. Pinning a tag such as `llama3:70b` or `orca-mini:3b-q8_0` writes the size and quant choice into your config, so a script or a teammate cannot drift onto another variant. A tag is still a mutable name, so to prove two machines match, compare the `ID` column of `ollama ls`, which is the start of the manifest's sha256 digest.
go deeper
Recall the defaults a short name hides: registry.ollama.ai as host, library as namespace, latest as tag. Know that ollama run pulls a missing model first.
Explain that a pull fetches the manifest, downloads only missing blobs and verifies each by sha256, so re-pulling an existing name can update it.
Show how you keep a fleet of laptops on one build: explicit tags in config, the ollama ls ID compared across machines, and updates run deliberately rather than on every boot.
Weigh tag pinning against digest verification: tags are readable and reviewable but mutable, digests are exact but opaque, so decide which one your rollout and audit trail rest on.
## Anatomy of an Ollama model name Every model Ollama stores or fetches has a **fully qualified name** with five parts. The parser in the daemon fills in any part you omit, which is why short names work at all: | Part | Example | Default when omitted | |---|---|---| | protocol scheme | `https` | `https` | | host | `registry.ollama.ai`, `hf.co` | `registry.ollama.ai` | | namespace | `library`, `myuser` | `library` | | model | `llama3`, `orca-mini` | required | | tag | `70b`, `3b-q8_0` | `latest` | So `llama3` and `registry.ollama.ai/library/llama3:latest` are the same model. The API docs put it plainly: names follow a `model:tag` format, the model may carry a namespace such as `example/model`, and a missing tag defaults to `latest`. The `library` namespace is the curated catalogue on ollama.com; a username namespace holds what that user pushed; a different host such as `hf.co` pulls from somewhere else entirely. ## What `latest` really is `latest` is **not** a version number and not "the newest build" in any automatic sense. It is a tag string like any other, and it points at whichever manifest the publisher last pushed under it. Two consequences matter to anyone running Ollama for more than one afternoon: - A laptop that pulled `llama3` in spring and a laptop that pulls it today can hold different weights while both show `llama3:latest`. - Re-running `ollama pull llama3` is how you **update** a model: it is not a no-op when the model is already on disk. - `latest` names one variant out of many. The size and quant variants live under their own tags (`llama3:70b`, `orca-mini:3b-q8_0`), and which one `latest` points at is the publisher's choice. ## What a pull does with a name A pull is a manifest fetch followed by content-addressed downloads: 1. Fetch the manifest for `host/namespace/model:tag` from the registry. The manifest is a small JSON document listing layers by sha256 digest: the weights, the template, parameters, licence and a config. 2. Download each blob not already in the local store. Blobs you already have are skipped, and a cancelled pull resumes where it stopped. 3. Verify every newly downloaded blob against its sha256 digest, and discard one that does not match. 4. Write the manifest under the model's name in the local store. 5. Remove the layers the previous manifest for that name used and no other manifest still references, unless `OLLAMA_NOPRUNE` is set. `ollama run` performs the same pull automatically when the name is not on disk yet, so a typo in a tag in a startup script quietly becomes a multi-gigabyte download or a not-found error, depending on whether the tag exists. ## Pinning in practice What a team wants is "the same model on every machine". The tools for that are small: - **Name the variant explicitly** in scripts, Compose files and app config: `llama3:70b`, not `llama3`. The tag records the size-and-quant decision where reviewers can see it. - **Check identity, not names.** `ollama ls` prints `NAME`, `ID`, `SIZE` and `MODIFIED`. The `ID` is the first 12 hex characters of the sha256 of the manifest file, and the full value is the `digest` field of `GET /api/tags`. Identical IDs on two machines mean identical manifests, and therefore identical layer digests. - **Do not trust `MODIFIED`.** It is the local manifest file's modification time: when this machine last wrote the manifest, not when the publisher built it. - **Update deliberately.** Because a pull of an existing name can change the weights, run it on purpose (and on every machine together), not as a side effect of a provisioning script that runs on each boot. An explicit tag reduces surprise but is still a name the namespace owner can push over. When the build must be provably identical, the manifest digest is the identity; the tag is the label. ## What the tag does not tell you A tag like `3b-q8_0` is a **name you pin**. What the quant suffix means for quality, and how many bytes per parameter it costs, belongs to the GGUF and quantization material; whether the result fits your GPU belongs to the offload material. Here the point is narrower: the tag is the stable handle you write down, and the digest is how you check that everyone resolved it to the same thing.
- Two machines both list `llama3:latest` in `ollama ls`. How do you tell whether they hold the same build?Compare the `ID` column, which is the first 12 hex characters of the sha256 of each machine's manifest, or the full `digest` from `GET /api/tags`. The manifest lists every layer by digest, so matching manifest digests mean matching weights, template and parameters. Matching `SIZE` or a similar `MODIFIED` time proves nothing: size can coincide and `MODIFIED` is only when the local manifest was written.
- Does pinning an explicit tag such as `llama3:70b` guarantee the weights never change?No. A tag is a mutable name in the registry, and the owner of the namespace can push a new manifest under it. Pinning makes the variant explicit and stops you drifting onto a different size or quant, but a later `ollama pull` of that tag still picks up whatever the tag points at then. Treat the manifest digest as the identity and re-pull only when you mean to update.
- Leaving the tag off pulls the largest and newest variant of the model.
- Every machine that pulls llama3:latest gets the same weights, whenever it pulls.
- An explicit tag such as llama3:70b is immutable, so pinning it guarantees identical weights forever.
- Running ollama pull on a model already on disk does nothing.
- The MODIFIED column in ollama ls shows when the publisher built the model.