Skip to main content

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

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

zest_transfer-0.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

zest_transfer-0.3.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

zest_transfer-0.3.1-py3-none-macosx_11_0_x86_64.whl (638.3 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

zest_transfer-0.3.1-py3-none-macosx_11_0_arm64.whl (620.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file zest_transfer-0.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for zest_transfer-0.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a50f686aba1fb062570f979179740e100caccf8b449de44cdccaf68ca4f898fa
MD5 36dd684a1694456035642ec1a68ac39b
BLAKE2b-256 3ad367b30be98bcf33e15af626248311c7e8351c23b4e5748d5de4516983393a

See more details on using hashes here.

Provenance

The following attestation bundles were made for zest_transfer-0.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release.yml on praveer13/zest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zest_transfer-0.3.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for zest_transfer-0.3.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 88a849b09761bf8d522de4f54961f2bfceb0818e33df463f9995e16861f2b4fc
MD5 c78041d45995bf945be685c8de1dfb5f
BLAKE2b-256 a3b2ab9af6575c794761a9d25c7754f3c196c9ed49925bc3cd21fd985307425c

See more details on using hashes here.

Provenance

The following attestation bundles were made for zest_transfer-0.3.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: release.yml on praveer13/zest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zest_transfer-0.3.1-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for zest_transfer-0.3.1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 60c0c8fa66e384af1b7a445c88bcd59a8349b281620666025ca7aeaf5370427e
MD5 445e33c1a575cf8b435962b3d155985b
BLAKE2b-256 9ee5a62d8faa29ef81faa8ba41ece5f3326f9c2dd9cfe9989363abf394b9df2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zest_transfer-0.3.1-py3-none-macosx_11_0_x86_64.whl:

Publisher: release.yml on praveer13/zest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zest_transfer-0.3.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zest_transfer-0.3.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b933203e27088b89b0df30e2269f7b98694e0925362dbafc6f0140daaeb37a6
MD5 2c6c8d56df2204176c6f68dd3473d28a
BLAKE2b-256 75c89584045e249fe35d95d5fcc3c76d02a63af9b07108653a4feaafdc165fa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for zest_transfer-0.3.1-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on praveer13/zest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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