---
title: "Rearchitecting Hugging Face Uploads and Downloads"
description: "Hugging Face's Xet team is replacing the Hub's direct-to-S3 uploads and CloudFront downloads with a content-addressed store (CAS) built on \"dumb reads, smart writes\": reads fetch reconstruction info from CAS, and writes are chunked, deduplicated and validated before reaching S3."
url: "https://swe.quest/articles/rearchitecting-hugging-face-uploads-and-downloads-9e61a9e3c6d67f4e"
canonical: "https://huggingface.co/blog/rearchitecting-uploads-and-downloads"
source: "Hugging Face"
published: "2024-11-26"
difficulty: "medium"
kind: "Case study"
reading_minutes: 7
tags: ["storage-systems","system-design","cdn-edge","cloud","capacity-planning"]
---

# Rearchitecting Hugging Face Uploads and Downloads

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-11-26, 7 min read, Case study. Original: [https://huggingface.co/blog/rearchitecting-uploads-and-downloads](https://huggingface.co/blog/rearchitecting-uploads-and-downloads)

## Summary

Hugging Face's Xet team is replacing the Hub's direct-to-S3 uploads and CloudFront downloads with a content-addressed store (CAS) built on "dumb reads, smart writes": reads fetch reconstruction info from CAS, and writes are chunked, deduplicated and validated before reaching S3. Byte-level handling gets around CloudFront's 50GB file limit, enables format-aware dedup and compression for Parquet and Safetensors, and adds audit telemetry. Analysis of 8.2M upload requests (130.8 TB from 88 countries) in one day showed the top 7 countries produce 80% of bytes, so CAS nodes will run in three AWS regions: us-east-1 and eu-west-3 with 4 nodes each, and ap-southeast-1 with 2. Hugging Face accepts an estimated 12% drop in aggregate first-hop bandwidth, expecting other optimizations to offset it.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [CDN & edge](https://swe.quest/tags/cdn-edge.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Capacity planning](https://swe.quest/tags/capacity-planning.md) (Reliability & operations)

## Prerequisites

- content-addressed storage
- CDN basics ([easy posts on CDN & edge](https://swe.quest/tags/cdn-edge.md?difficulty=easy))
- AWS regions and S3 ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))

## Keywords

Hugging Face Hub, Xet, Amazon S3, CloudFront, Git LFS, Safetensors, Parquet, Lambda@Edge

## Related posts

- [Migrating the Hub from Git LFS to Xet](https://swe.quest/articles/migrating-the-hub-from-git-lfs-to-xet-20a0038190c32d42.md): Hugging Face · 2025-07-15 · Medium · 9 min read · Storage systems, Schema migrations, Scaling, ML platforms
  Hugging Face moved 500,000 repositories and about 20 PB from Git LFS to its Xet content-addressed storage with almost no user disruption.
- [Xet is on the Hub](https://swe.quest/articles/xet-is-on-the-hub-31527082840b41cc.md): Hugging Face · 2025-03-18 · Medium · 9 min read · Storage systems, Performance engineering, Load balancing, Scaling
  Hugging Face migrated its first model and dataset repositories from Git LFS to Xet storage, which uses content-defined chunking (~64 KB chunks aggregated into ~64 MB blocks) so that only changed bytes are uploaded.
- [From Files to Chunks: Improving HF Storage Efficiency](https://swe.quest/articles/from-files-to-chunks-improving-hf-storage-efficiency-389481ed0fa30735.md): Hugging Face · 2024-11-20 · Medium · 5 min read · Storage systems, Algorithms, Version control, Cost optimization
  Hugging Face's Xet team plans to replace file-level Git LFS storage with content-defined chunking (CDC), where a rolling hash over a sliding window sets variable-size chunk boundaries and chunks are deduplicated in a content-addressed store, so edits only upload and store changed chunks.
- [Run AI workloads on any cloud, store on Hugging Face: zero-egress storage with SkyPilot](https://swe.quest/articles/run-ai-workloads-on-any-cloud-store-on-hugging-face-zero-egress-storage-with-595c5291113e315b.md): Hugging Face · 2026-07-07 · Medium · 8 min read · Storage systems, Cloud platforms, Model training, Cost optimization, ML platforms
  SkyPilot now supports Hugging Face Storage as a first-class backend (\`store: hf\`), so jobs on any of 20+ clouds, Kubernetes or on-prem can mount Hub buckets (read-write) or model/dataset repos (read-only) via an \`hf://\` URL and an existing \`HF\_TOKEN\`.
- [From Chunks to Blocks: Accelerating Uploads and Downloads on the Hub](https://swe.quest/articles/from-chunks-to-blocks-accelerating-uploads-and-downloads-on-the-hub-0403426cd59197cb.md): Hugging Face · 2025-02-12 · Medium · 9 min read · Storage systems, ML platforms, Data structures, Performance engineering
  Hugging Face's Xet storage backend uses content-defined chunking for deduplication but avoids per-chunk overhead by aggregating chunks into content-addressed blocks of up to 64MB and using shards to map files to chunks.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
