xet-core

Library Listed

Async runtime, configuration, logging, and utility infrastructure for the Hugging Face Xet client tools.

Checked ยท Sources

Downloads
467,103
Dependents
9
Stars
625
Forks
114
Contributors
31
Commits
670
Latest release
1.8.0 ยท

About

From the project README ยท

๐Ÿค— xet-core - xet client tech, used in huggingface_hub

Welcome

xet-core enables huggingface_hub to utilize xet storage for uploading and downloading to HF Hub. Xet storage provides chunk-based deduplication, efficient storage/retrieval with local disk caching, and backwards compatibility with Git LFS. This library is not meant to be used directly, and is instead intended to be used from huggingface_hub.

Key features

โ™ป chunk-based deduplication implementation: avoid transferring and storing chunks that are shared across binary files (models, datasets, etc).

๐Ÿค— Python bindings: bindings for huggingface_hub package.

โ†” network communications: concurrent communication to HF Hub Xet backend services (CAS).

๐Ÿ”– local disk caching: chunk-based cache that sits alongside the existing huggingface_hub disk cache.

Packages

This repository produces the following packages:

Read the full README
Rust Crates (crates.io)
CrateDescription
hf-xetHigh-level client library for uploading and downloading files with chunk-based deduplication
xet-clientHTTP client for communicating with Hugging Face Xet storage servers
xet-dataData processing pipeline for chunking, deduplication, and file reconstruction
xet-core-structuresCore data structures including MerkleHash, metadata shards, and Xorb objects
xet-runtimeAsync runtime, configuration, logging, and utility infrastructure
Python Package (PyPI)
PackageDescription
hf-xetPython bindings for the Xet storage system, used by huggingface_hub

Built from the hf_xet/ directory using maturin.

CLI Binary
BinaryDescription
git-xetGit LFS compatible command-line tool for Xet storage

Built from the git_xet/ directory. Distributed via GitHub releases.

Contributions (feature requests, bugs, etc.) are encouraged & appreciated ๐Ÿ’™๐Ÿ’š๐Ÿ’›๐Ÿ’œ๐Ÿงกโค๏ธ

Please join us in making xet-core better. We value everyone's contributions. Code is not the only way to help. Answering questions, helping each other, improving documentation, filing issues all help immensely. If you are interested in contributing (please do!), check out the contribution guide for this repository.

Issues, Diagnostics & Debugging

If you encounter an issue with hf-xet, please collect diagnostic information and attach it when creating a new Issue.

The scripts/diag/ directory contains platform-specific scripts that download debug symbols, configure logging, and capture periodic stack traces and core dumps:

# prefix your failing command with the script for your OS, e.g.:
./scripts/diag/hf-xet-diag-macos.sh -- python my-script.py

See scripts/diag/README.md for full usage, output layout, dump analysis instructions, and how to install debug symbols manually.

Quick debugging environment variables:

RUST_BACKTRACE=full          # full Rust backtraces on panic
RUST_LOG=info                # enable hf-xet logging
HF_XET_LOG_DEST=/tmp/xet.log # log file, or a directory with a trailing / (defaults to ~/.cache/huggingface/xet/logs/)
Telemetry

hf-xet reports a small performance summary โ€” byte counts, dedup effectiveness, throughput, and wall time โ€” to the CAS server at the end of each upload or download. It is best-effort: never retried, and it cannot delay or fail a transfer. The payload contains no file names, paths, hashes, repository ids, or user ids.

To turn it off:

HF_XET_TELEMETRY_ENABLED=0

It is also off whenever huggingface_hub's telemetry opt-outs are set: HF_HUB_DISABLE_TELEMETRY, DISABLE_TELEMETRY, DO_NOT_TRACK, HF_HUB_OFFLINE, or TRANSFORMERS_OFFLINE (any of 1, ON, YES, TRUE). These win over HF_XET_TELEMETRY_ENABLED=1.

Tuning (rarely needed):

HF_XET_TELEMETRY_FINAL_FLUSH_TIMEOUT=2s  # how long a transfer waits for its final report; 0 = don't wait
HF_XET_TELEMETRY_HEARTBEAT_AFTER=5m      # long transfers report progress after this; 0 disables
HF_XET_TELEMETRY_HEARTBEAT_INTERVAL=5m   # and then at this interval
HF_XET_TELEMETRY_REQUEST_TIMEOUT=5s      # per-request budget
HF_XET_TELEMETRY_MAX_IN_FLIGHT=4         # concurrent reports before dropping

Local Development

Repo Organization
  • xet_pkg/ (hf-xet): High-level session API for uploading and downloading files with deduplication.
  • xet_client/ (xet-client): HTTP client for CAS and Hub backend services.
  • xet_data/ (xet-data): Chunking, deduplication, and file reconstruction pipeline.
  • xet_core_structures/ (xet-core-structures): MerkleHash, metadata shards, Xorb objects, and shared data structures.
  • xet_runtime/ (xet-runtime): Async runtime, configuration, logging, and utilities.
  • hf_xet/: Python bindings (maturin/PyO3), produces the hf-xet PyPI package.
  • git_xet/: Git LFS compatible CLI tool (git-xet).
  • wasm/: WebAssembly builds. hf_xet_thin_wasm is the published thin-client wasm crate; hf_xet_wasm is an example / smoke-test wrapper around xet_pkg exposing both upload and download JS APIs for CI and manual browser testing (not a published SDK).
  • simulation/: Simulation and benchmarking infrastructure.
Build, Test & Benchmark

To build xet-core, look at requirements in GitHub Actions CI Workflow for the Rust toolchain to install. Follow Rust documentation for installing rustup and that version of the toolchain. Use the following steps for building, testing, benchmarking.

Many of us on the team use VSCode, so we have checked in some settings in the .vscode directory. Install the rust-analyzer extension.

Build:

cargo build

Test:

cargo test

Benchmark:

cargo bench

Linting:

cargo clippy -r --verbose -- -D warnings

Formatting (requires nightly toolchain):

cargo +nightly fmt --manifest-path ./Cargo.toml --all
Building Python package and running locally (on *nix systems):
  1. Create Python3 virtualenv: python3 -mvenv ~/venv
  2. Activate virtualenv: source ~/venv/bin/activate
  3. Install maturin: pip3 install maturin ipython
  4. Go to hf_xet crate: cd hf_xet
  5. Build: maturin develop
  6. Test:
ipython
import hf_xet as hfxet
hfxet.upload_files()
hfxet.download_files()
Developing with tokio console

Prerequisite is installing tokio-console (cargo install tokio-console). See https://github.com/tokio-rs/console

To use tokio-console with hf-xet there are compile hf_xet with the following command:

RUSTFLAGS="--cfg tokio_unstable" maturin develop -r --features tokio-console

Then while hf_xet is running (via a hf cli command or huggingface_hub python code), tokio-console will be able to connect.

Ex.
# In one terminal:
pip install huggingface_hub
RUSTFLAGS="--cfg tokio_unstable" maturin develop -r --features tokio-console
hf download openai/gpt-oss-20b

# In another terminal
cargo install tokio-console
tokio-console
Building universal whl for MacOS:

From hf_xet directory:

MACOSX_DEPLOYMENT_TARGET=10.9 maturin build --release --target universal2-apple-darwin --features openssl_vendored

Note: You may need to install x86_64: rustup target add x86_64-apple-darwin

Testing

Unit-tests are run with cargo test, benchmarks are run with cargo bench. Some crates have a main.rs that can be run for manual testing.

WebAssembly compatibility

xet_pkg (hf-xet), xet_client, xet_data, xet_core_structures, and xet_runtime must compile cleanly for wasm32-unknown-unknown so that downstream browser consumers (e.g. hf-hub) can depend on this crate. CI enforces this via cargo +nightly check --target wasm32-unknown-unknown -p hf-xet plus the wasm-pack-style builds under wasm/.

The example wrapper wasm/hf_xet_wasm/ is not a published browser SDK โ€” it is a CI smoke test and hand-runnable demo. Real browser consumers should depend on hf-xet directly with their own #[wasm_bindgen] glue, or use a downstream SDK such as hf-hub.

When adding or modifying code in the wasm-reachable crates, please keep the wasm build green:

  • Prefer web_time::Instant over std::time::Instant / tokio::time::Instant on code paths reachable from wasm (the std and tokio variants panic on wasm32).
  • Use wasm_bindgen_futures::spawn_local via the tokio_with_wasm::alias as tokio shim instead of bare tokio::spawn / JoinSet::spawn. The browser's reqwest backend produces !Send futures.
  • Apply the conditional ?Send pattern to #[async_trait] definitions whose methods touch HTTP / I/O:
    #[cfg_attr(not(target_family = "wasm"), async_trait::async_trait)]
    #[cfg_attr(target_family = "wasm", async_trait::async_trait(?Send))]
    
  • Gate filesystem-only code (std::fs, tokio::fs, OpenOptions, spawn_blocking, disk caches, file-path download methods) with #[cfg(not(target_family = "wasm"))].

See api_changes/update_260515_wasm_target_support.md for the full set of wasm-only differences and the patterns wasm-reachable code must follow. The example browser pages live at wasm/hf_xet_wasm/examples/download.html and wasm/hf_xet_wasm/examples/upload.html.

References & History

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
Has Python bindings
  • xet-runtime needs Python only with feature python
  • hf-xet needs Python only with feature python
  • xet-data needs Python only with feature python
License
Apache-2.0

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

xet-core beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
xet-core This page Listed

Async runtime, configuration, logging, and utility infrastructure for the Hugging Face Xet client tools.

Python bindings

467,103 downloads over 30 days 9 625 1.8.0 GPU support unknown No native code found Apache-2.0
hf-hub Featured

Rust client for the Hugging Face Hub API

3,442,405 downloads over 30 days 578 343 1.0.0 GPU support unknown No native code found Apache-2.0
zarrs Featured

A library for the Zarr storage format for multidimensional arrays and metadata

75,052 downloads over 30 days 51 285 0.23.14 GPU support unknown Binds native code: blosc-src (feature blosc), gdeflate-sys (feature gdeflate), zfp-sys (feature zfp), zstd-sys (feature zstd) Apache-2.0 OR MIT
vortex Listed

An extensible, state-of-the-art framework for columnar compression, and the fastest FOSS columnar file format. Formerly at @spiraldb, now an Incubation Stage project at LFAI&Data, part of the Linux Foundation.

98,129 downloads over 30 days 32 3,310 0.93.0 GPU support unknown Binds native code: zstd-sys Apache-2.0
oxen App Listed

Oxen server is a fast data version control backend, supporting local disk and S3. Self host your repositories on your own storage, or use the hosted platform on Oxen.ai. Stores, syncs, and serves versioned datasets, model checkpoints, game assets, studio media, and any large data.

126 binary downloads per release Not applicable 1,208 0.67.0 GPU support unknown Binds native code: librocksdb-sys, lmdb-master-sys, ffmpeg-sys-next (feature ffmpeg), libduckdb-sys (feature docs) Apache-2.0
nebula App Listed Dormant

A Package Manager for Machine Learning Datasets and Models.

Not measured Not applicable 85 Not measured Not measured Not measured BSD-3-Clause
compressr App New

Model conversion and quantization with no Python: reads SafeTensors, GGUF, TCF and PyTorch state dicts, writes SafeTensors, GGUF and TCF, and quantizes to Q2_K through Q8_0 and IQ4 formats, including Q4_K_M mixes. GPTQ, AWQ, NF4, FP8, EXL2 and ONNX input are not implemented.

Python bindings

23 downloads over 30 days Not applicable 0 0.2.1 GPU support unknown No native code found Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 7 active dependents and 7 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 625 stars, 114 forks and 31 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

  • The last activity is on 6 Nov 2026, 3 days ago. The rules expect an update within 400 days. Dormancy rule

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 1.8.0 base 200, doubled for 467103 downloads per month: E = 400 days
  • dormancy: last activity 2026-11-06, 3 days ago, E = 400: active
  • featured: not featured: active_users 7 < 11 and new_adopters 7 < 9 and repository route stars 625 (needs 4539), forks 114 (needs 434), contributors 31 (needs 79)
  • listed: listed: no archive, new or featured rule applies
Crates4 crates

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption7 active dependents, 7 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents7crates.io database dumpYes
New dependents (365 days)7crates.io database dumpYes
Peak active dependents7crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 3 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-06GitHub repositoryYes
Latest release2026-10-29crates.io database dumpYes
First release2026-03-31crates.io database dumpYes
Latest version1.8.0crates.io database dumpYes
Days the oldest outside issue waits for a reply147GitHub repositoryYes
Maintainer replies over 365 days77GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution10 releases, 467,103 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases10crates.io database dumpYes
Downloads over 30 days467103crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository625 stars, 114 forks, 31 contributors, 670 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars625GitHub repositoryYes โ€” one part of the repository route
GitHub forks114GitHub repositoryYes โ€” one part of the repository route
Contributors with a GitHub account31GitHub contributorsYes โ€” one part of the repository route
Commits on the default branch670GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0crates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesHas Python bindings: xet-runtime needs Python only with feature python, hf-xet needs Python only with feature python, xet-data needs Python only with feature pythoncrates.io database dumpNo
Crates that depend on a listed crate directly9crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.