Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Ollama Ollama Base Model Resolution

From Leeroopedia
Knowledge Sources
Domains Storage, Model_Management
Last Updated 2026-02-14 00:00 GMT

Overview

A manifest-based model resolution mechanism that decomposes a model name into its constituent layers (weights, config, template, system prompt, parameters) for re-composition into derivative models.

Description

Base Model Resolution is the process of loading an existing model's layers so they can be used as the foundation for a new custom model. When a Modelfile specifies FROM llama3, the system must locate the llama3 manifest, parse its layers, and extract the GGML model data, chat template, system prompt, and parameter defaults.

This allows model creation to be a compositional operation: take an existing model's weights, override specific configuration layers (system prompt, template, parameters), optionally add adapters, and create a new manifest pointing to the same weight blobs with different metadata layers.

Usage

Use this principle when implementing model derivation or customization systems where new model variants are created by overriding metadata layers on top of existing model weights.

Theoretical Basis

The resolution process:

  1. Name Parsing: Parse the model name into its components (host, namespace, model, tag).
  2. Manifest Lookup: Find the manifest file in the local model store.
  3. Layer Enumeration: Read each layer from the manifest, categorized by media type.
  4. GGML Parsing: For model weight layers, parse the GGUF header to extract architecture metadata.
  5. Layer Extraction: Return the parsed layers for the creation pipeline to compose with overrides.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment