Repository navigation
Xet and Uploads
Full signatures and usage: Hub files and Xet uploads.
For a large model weight or dataset shard on the Hugging Face Hub, use the same load() call as for a small metadata file. DataShoal resolves the pinned repository metadata, obtains reconstruction information for Xet-backed content, and reads the signed byte ranges from content-addressed storage. It reconstructs the requested file and verifies its size and SHA-256 before publishing the blob to the local cache. Ordinary Git files use the Hub resolve endpoint and Git blob digest.
upload(source, repo, *, type, file=None, revision=None, message="Upload with DataShoal", token=None) returns the new commit ID. revision=None targets main. This call writes to the remote repository. Supply a write token using token= or HF_TOKEN.
from datashoal import upload
# Set HF_TOKEN and substitute an existing dataset repository you can write.
commit = upload("train.parquet", "org/calibration", type="dataset",
file="data/train.parquet", message="Add calibration split")For a single file, file selects its remote name; the local basename is the default. For a directory, file is an optional remote path prefix. The walker skips .git, .cache, and symlinked subdirectories. A symlink source or symlinked file entry is rejected. Supply regular files and repository-relative destination paths.
The Hub preupload response determines which files are ignored, stored as ordinary Git content, or sent to Xet. For Xet writes, DataShoal chunks the stream, hashes chunks, builds uncompressed xorbs, registers verification shards and submits one commit against the observed parent. Keep the returned commit ID to identify the exact uploaded revision. HF_HUB_OFFLINE=1 blocks uploads.
The Xet protocol is the work of Hugging Face’s Xet team and contributors. Protocol specification · Reference implementation · Project citations
Get started
- Installation and quickstart
- Python API reference
- Native templates
- Native extension ABI
- Loading reference
Prepare calibration data
Manage artifacts
Operate and contribute