P2P acceleration for ML model distribution
Project description
zest — P2P Acceleration for ML Model Distribution
zest accelerates ML model downloads by adding a peer-to-peer layer on top of HuggingFace's Xet storage. Models download from nearby peers first, falling back to HuggingFace CDN — never slower than vanilla hf_xet.
Install
pip install zest-transfer
Authentication
zest needs a HuggingFace token to download models. Set it up once:
# option 1: environment variable
export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxx
# option 2: huggingface-cli (token saved to ~/.cache/huggingface/token)
pip install huggingface_hub
huggingface-cli login
Get your token at huggingface.co/settings/tokens.
Quick Start
CLI
# Pull a model (uses P2P when peers available, CDN fallback)
zest pull meta-llama/Llama-3.1-8B
# Files land in standard HF cache — transformers.from_pretrained() just works
python -c "from transformers import AutoModel; AutoModel.from_pretrained('meta-llama/Llama-3.1-8B')"
Python API
import zest
# One-line activation — monkey-patches huggingface_hub
zest.enable()
# Or pull directly
path = zest.pull("meta-llama/Llama-3.1-8B")
Environment Variable
# Auto-enable on import
ZEST=1 python train.py
How It Works
HuggingFace's Xet protocol breaks files into content-addressed ~64KB chunks grouped into xorbs. zest adds a BitTorrent-compatible peer swarm so these immutable xorbs can be served by anyone who already downloaded them.
For each xorb needed:
1. Check local cache
2. Ask peers (BitTorrent protocol)
3. Fall back to CDN (presigned S3 URLs)
Every download makes the network faster for the next person.
P2P Testing
# Server A: pull a model and seed it
zest pull gpt2
zest serve
# Server B: pull from Server A
zest pull gpt2 --peer <server-a-ip>:6881
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zest_transfer-0.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: zest_transfer-0.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59cae85f07978032f1098e0fb39397a5f7c71c180f1c8df74505a8811c131263
|
|
| MD5 |
886cdbd3124438fe9b65aced286a0eeb
|
|
| BLAKE2b-256 |
554511f4eef31edb6d2eae020f8bc61c97ce91a3fe89fd897dcb4a31f7b5369e
|
Provenance
The following attestation bundles were made for zest_transfer-0.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:
Publisher:
release.yml on praveer13/zest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zest_transfer-0.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
59cae85f07978032f1098e0fb39397a5f7c71c180f1c8df74505a8811c131263 - Sigstore transparency entry: 942344670
- Sigstore integration time:
-
Permalink:
praveer13/zest@433b6fdd7711d36e73de60805528692e017cf63c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/praveer13
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@433b6fdd7711d36e73de60805528692e017cf63c -
Trigger Event:
push
-
Statement type:
File details
Details for the file zest_transfer-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: zest_transfer-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8fb2031d2aa5a744ee5c607db7727a7647bd519ead8b5197eb47972e638b17
|
|
| MD5 |
b2b0070d00e083f59603022708887e7b
|
|
| BLAKE2b-256 |
280289ee4e59e0be5136cb8bc787017ec5a81c661fdcd35e56194f98088bbbac
|
Provenance
The following attestation bundles were made for zest_transfer-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:
Publisher:
release.yml on praveer13/zest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zest_transfer-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
ee8fb2031d2aa5a744ee5c607db7727a7647bd519ead8b5197eb47972e638b17 - Sigstore transparency entry: 942344649
- Sigstore integration time:
-
Permalink:
praveer13/zest@433b6fdd7711d36e73de60805528692e017cf63c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/praveer13
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@433b6fdd7711d36e73de60805528692e017cf63c -
Trigger Event:
push
-
Statement type:
File details
Details for the file zest_transfer-0.3.2-py3-none-macosx_11_0_x86_64.whl.
File metadata
- Download URL: zest_transfer-0.3.2-py3-none-macosx_11_0_x86_64.whl
- Upload date:
- Size: 638.4 kB
- Tags: Python 3, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
290e8c8f87f698f8657e52c2af506b6ea63b8e3575ac8dfbc90e03b31d86ddbb
|
|
| MD5 |
10b136b7367f79d55f81bc38c83e2010
|
|
| BLAKE2b-256 |
0ce06e135a217aa989edab79a9eb6dbd2f16770a5f9397b69a0f6ed5e956d56b
|
Provenance
The following attestation bundles were made for zest_transfer-0.3.2-py3-none-macosx_11_0_x86_64.whl:
Publisher:
release.yml on praveer13/zest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zest_transfer-0.3.2-py3-none-macosx_11_0_x86_64.whl -
Subject digest:
290e8c8f87f698f8657e52c2af506b6ea63b8e3575ac8dfbc90e03b31d86ddbb - Sigstore transparency entry: 942344654
- Sigstore integration time:
-
Permalink:
praveer13/zest@433b6fdd7711d36e73de60805528692e017cf63c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/praveer13
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@433b6fdd7711d36e73de60805528692e017cf63c -
Trigger Event:
push
-
Statement type:
File details
Details for the file zest_transfer-0.3.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: zest_transfer-0.3.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 620.4 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f98b259e0374dc0280fd78f5eab493c0786bb6fc9f72417c9751135f3853724
|
|
| MD5 |
467f0dbd30c36bdaa3763dad9dfb066b
|
|
| BLAKE2b-256 |
b812a8bcdc7a8f0d268de18925c0c5db5511f52439a310889c017039440cb3e8
|
Provenance
The following attestation bundles were made for zest_transfer-0.3.2-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on praveer13/zest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zest_transfer-0.3.2-py3-none-macosx_11_0_arm64.whl -
Subject digest:
7f98b259e0374dc0280fd78f5eab493c0786bb6fc9f72417c9751135f3853724 - Sigstore transparency entry: 942344663
- Sigstore integration time:
-
Permalink:
praveer13/zest@433b6fdd7711d36e73de60805528692e017cf63c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/praveer13
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@433b6fdd7711d36e73de60805528692e017cf63c -
Trigger Event:
push
-
Statement type: