Skip to main content

Llama_IPFS

Load models directly from IPFS for llama-cpp-python.

Features

  • 🌐 Direct integration with local IPFS nodes (preferred method)
  • 🔄 Automatic fallback to IPFS gateways when local node isn't available
  • 🔍 Simple URI format: ipfs://CID for easy model sharing
  • ⚡ Zero configuration required - works automatically once installed
  • 🧩 Compatible with any version of llama-cpp-python

Installation

pip install llama-ipfs
llama-ipfs activate

Once installed and activated, the llama_ipfs integration will be loaded automatically whenever you use Python.

Usage

After installation, use llama-cpp-python with IPFS model URIs:

from llama_cpp import Llama

# Load a model directly from IPFS
model = Llama.from_pretrained(
    # Equivalent HuggingFace model: "aisuko/gpt2-117M-gguf"
    repo_id = "ipfs://bafybeie7quk74kmqg34nl2ewdwmsrlvvt6heayien364gtu2x6g2qpznhq",
    filename = "ggml-model-Q4_K_M.gguf"
)

IPFS Node Connectivity

The llama_ipfs package prioritizes connectivity in the following order:

  1. Local IPFS Node (Recommended): If you have an IPFS daemon running locally (ipfs daemon), the package will automatically detect and use it. This method:

    • Is much faster for repeated downloads
    • More reliably loads complex model directories
    • Contributes to the IPFS network by providing content to others
  2. IPFS Gateway (Fallback): If a local node isn't available, the package will fall back to public gateways. This method:

    • Works without installing IPFS
    • May be less reliable for complex model directories
    • Downloads can be interrupted more easily

Command Line Interface

# Activate the auto-loading
llama-ipfs activate

# Check if the integration is active
llama-ipfs status

# Test the integration
llama-ipfs test

# Deactivate the integration
llama-ipfs deactivate

Dependencies

  • Python 3.8+
  • llama-cpp-python

License

MIT License

Metadata

Release files for llama-ipfs 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-ipfs 0.2.0
File Size Uploaded
llama_ipfs-0.2.0.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-ipfs 0.2.0
File Interpreter ABI Platform
llama_ipfs-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.2 kB

Release files / llama_ipfs-0.2.0.tar.gz

Download URL llama_ipfs-0.2.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0f069bce48dcb67da4e8eab0275f0a7b4cb0101f1e18208da6a319cbbf50151e
BLAKE2b-256 checksum
How to use checksums
a9c506c74d4430be406da5077150995003e82f7c27a553e0897314115f5a3963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 25, 2025.

Transparency log

Release files / llama_ipfs-0.2.0-py3-none-any.whl

Download URL llama_ipfs-0.2.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
830e8c8b702a97263238e38f8d03b5b8183ea0b5ca5f07090b07f87d654b7a62
BLAKE2b-256 checksum
How to use checksums
22f1e25dc1dd91cb75568d2d9dc51a72aac702a680d65642d8a86f1a7ea47205
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 25, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page