Skip to main content

Anchor every HuggingFace upload to Bitcoin. Zero-touch provenance for models and datasets.

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.1.0.tar.gz (4.7 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.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: umarise_huggingface-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 6f6da724249d8875af2e27943bf3b16e6dc5caaed455d2cd9988de3cc7a12fc4
MD5 b4083784137202cdc979523248f59f1b
BLAKE2b-256 b6b53159fded40800bb98582251a30ec571a85019018bd1c351859685a3f5e36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for umarise_huggingface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8654fefa9f6d8884e699ae544932f2499d8b28145bdc5950a017d51918d6980
MD5 41771ed10b8f053e82dd50063d9eb8de
BLAKE2b-256 d3955aa595472ef90cd1063b0da1f387884112f0bdeaeec0882f259fa56228ca

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