Skip to main content

Anchor every HuggingFace upload to Bitcoin. Async, with reconciliation ledger.

Project description

umarise-huggingface

Anchor every HuggingFace upload to Bitcoin. Automatically.

umarise-huggingface intercepts upload_file() and upload_folder() to automatically compute a local SHA-256 hash and anchor it to Bitcoin via the Umarise Core API. No files are transmitted — only the hash.

Install

pip install umarise-huggingface
export UMARISE_API_KEY=um_your_key_here

Usage

Option 1: Auto-anchor (recommended)

import umarise_huggingface
from huggingface_hub import HfApi

umarise_huggingface.enable()

api = HfApi()
api.upload_file(
    path_or_fileobj="model.safetensors",
    path_in_repo="model.safetensors",
    repo_id="your-org/your-model",
)
# [umarise] ✓ Anchored your-org/your-model:model.safetensors → origin_id: abc123...

Option 2: With transformers push_to_hub

import umarise_huggingface
umarise_huggingface.enable()

# Works automatically with any push_to_hub call
model.push_to_hub("your-org/your-model")
tokenizer.push_to_hub("your-org/your-model")
# Each file is automatically anchored

Option 3: Explicit

from umarise_huggingface import anchor_file, anchor_folder

# Single file
origin_id = anchor_file("model.safetensors")

# Entire directory
results = anchor_folder("./model_output/", pattern="*.safetensors")

What happens

  1. You upload via HuggingFace Hub — upload proceeds normally
  2. SHA-256 is computed locally — bytes never leave your machine
  3. Hash is submitted to Umarise Core API → anchored to Bitcoin
  4. origin_id is printed to stderr
  5. Within ~2 hours, proof is confirmed on the Bitcoin blockchain

What this proves

  • ✓ This exact model/dataset existed no later than time T
  • ✓ The artifact was not modified after anchoring
  • ✓ Anyone can verify — no Umarise account needed

Verify

# Get the hash of your file
shasum -a 256 model.safetensors

# Verify against Umarise
curl -s https://core.umarise.com/v1-core-verify \
  -H 'Content-Type: application/json' \
  -d '{"hash":"sha256:YOUR_HASH"}' | python3 -m json.tool

Or visit verify-anchoring.org

Design principles

  • Never breaks your pipeline — if anchoring fails, uploads continue normally
  • Zero storage — only the SHA-256 hash is sent to Umarise
  • Vault-independent — HuggingFace stores the data, Umarise stores the proof
  • Independently verifiable — no Umarise account needed to verify

Links

License

Unlicense — public domain.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

umarise_huggingface-0.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

umarise_huggingface-0.2.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file umarise_huggingface-0.2.0.tar.gz.

File metadata

  • Download URL: umarise_huggingface-0.2.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for umarise_huggingface-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b3651160510d6fd535e5a7169d475793c5f8faec00a139e5db7c0f4fcef9b471
MD5 0b49971ad2006c3894c0ee41dd270dd4
BLAKE2b-256 5b400134722d480ebe2bde9b4cc4b8c0a22b90e3e4a9322641cf326b28e69ab0

See more details on using hashes here.

File details

Details for the file umarise_huggingface-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for umarise_huggingface-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56aca9c6da317a100c18883a044b235ddfa376d053c66956d33ec9f8a4d263f0
MD5 5c4ba35c89bc23eaac2872cfd8b7008f
BLAKE2b-256 aec0ca6186ed85633fd8769c6a26a6326d124aa99de1cdfd69c0e243db0117a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page