Principle:Ollama Ollama Model Manifest Creation
| Knowledge Sources | |
|---|---|
| Domains | Storage, Model_Management |
| Last Updated | 2026-02-14 00:00 GMT |
Overview
A content-addressable manifest creation mechanism that assembles model components (weights, config, template, system prompt, adapters) into a registered model with blob layers and a JSON manifest.
Description
Model Manifest Creation is the final step in the model creation pipeline. It takes the assembled layers — base model weights, overridden template, system prompt, parameter configuration, and optional adapters — writes each as a content-addressed blob (SHA-256 digest), and creates a JSON manifest that references all layers by digest.
This OCI-inspired content-addressable storage design enables efficient storage (shared base model blobs across derivatives), integrity verification, and registry-compatible push/pull operations.
Usage
Use this principle when implementing a model storage system that needs deduplication of shared components, integrity guarantees, and compatibility with container-registry-style distribution.
Theoretical Basis
The manifest creation process:
- Layer Creation: For each component (model weights, template, system prompt, parameters, adapter), compute SHA-256 digest, write content to blobs directory, and record the Layer (digest, size, mediatype).
- Config Assembly: Create a config blob with model metadata (architecture, families, capabilities).
- Manifest Writing: Write a JSON manifest referencing the config and all content layers.
- Name Registration: Store the manifest at the filesystem path corresponding to the model name.
The manifest format:
{
"schemaVersion": 2,
"mediaType": "application/vnd.ollama.image.manifest",
"config": {"digest": "sha256:...", "size": 123, "mediaType": "application/vnd.ollama.image.config"},
"layers": [
{"digest": "sha256:...", "size": 4000000000, "mediaType": "application/vnd.ollama.image.model"},
{"digest": "sha256:...", "size": 512, "mediaType": "application/vnd.ollama.image.template"},
{"digest": "sha256:...", "size": 256, "mediaType": "application/vnd.ollama.image.system"}
]
}