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 Blob Transfer

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

Overview

A parallel chunked blob transfer mechanism that downloads and uploads content-addressed model blobs with resume support, cross-repository mounting, and progress reporting.

Description

Blob Transfer handles the efficient movement of large binary blobs (model weights, typically 1-70+ GB) between local storage and the remote registry. Downloads use parallel HTTP range requests for concurrent chunk transfer and support resumability. Uploads attempt cross-repository mounting first (reusing blobs already on the registry from other models), falling back to chunked upload if mounting fails.

The system provides real-time progress reporting through callbacks, enabling CLI progress bars and API streaming progress.

Usage

Use this principle when implementing large file transfer systems that need reliability (resume), efficiency (parallel chunks, deduplication), and user feedback (progress callbacks).

Theoretical Basis

Download Algorithm:

  1. Check local cache for matching digest → skip if cached.
  2. Send HEAD request to get total size.
  3. Divide into chunks (e.g., 64MB each).
  4. Download chunks in parallel using HTTP Range requests.
  5. As chunks complete, verify and write to temp file.
  6. After all chunks, rename temp file to final blob path.
  7. Verify SHA-256 digest of complete file.

Upload Algorithm:

  1. Attempt cross-repository mount (HEAD request to check if blob exists elsewhere on registry).
  2. If mount succeeds, skip upload.
  3. If mount fails, initiate chunked upload session.
  4. Upload chunks sequentially with progress reporting.
  5. Complete the upload session.

Related Pages

Implemented By

Uses Heuristic

Page Connections

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