---
title: "Migrating the Hub from Git LFS to Xet"
description: "Hugging Face moved 500,000 repositories and about 20 PB from Git LFS to its Xet content-addressed storage with almost no user disruption."
url: "https://swe.quest/articles/migrating-the-hub-from-git-lfs-to-xet-20a0038190c32d42"
canonical: "https://huggingface.co/blog/migrating-the-hub-to-xet"
source: "Hugging Face"
published: "2025-07-15"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["storage-systems","schema-migrations","scalability","ml-platform"]
---

# Migrating the Hub from Git LFS to Xet

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-07-15, 9 min read, Case study. Original: [https://huggingface.co/blog/migrating-the-hub-to-xet](https://huggingface.co/blog/migrating-the-hub-to-xet)

## Summary

Hugging Face moved 500,000 repositories and about 20 PB from Git LFS to its Xet content-addressed storage with almost no user disruption. Two pieces made that possible. A Git LFS Bridge lets older clients keep working by returning presigned URLs and reconstructing files from chunks in S3. A webhook-driven background pipeline, with an orchestrator batching files into jobs of 1,000 files or 500 MB for worker pods, migrates LFS content without locks. Scaling to multi-petabyte accounts exposed three problems: a cross-mount \`/tmp\` move bug that filled disks, an undersized CAS, and network/EBS I/O bottlenecks on the workers. After fixes, CAS throughput rose from about 35 Gb/s to peaks near 300 Gb/s.

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)
- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)

## Prerequisites

- Git LFS basics
- content-addressed storage
- object storage like S3 ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))

## Keywords

Xet, Git LFS, Hugging Face Hub, huggingface\_hub, hf-xet, content defined chunking, Amazon S3, xet-core

## Related posts

- [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.
- [Rearchitecting Hugging Face Uploads and Downloads](https://swe.quest/articles/rearchitecting-hugging-face-uploads-and-downloads-9e61a9e3c6d67f4e.md): Hugging Face · 2024-11-26 · Medium · 7 min read · Storage systems, System design, CDN & edge, Cloud platforms, Capacity planning
  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.
- [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.
- [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.
- [Inside GitHub’s new Git storage architecture](https://swe.quest/articles/inside-github-s-new-git-storage-architecture-014a8644555e81c8.md): GitHub Engineering · 2026-11-05 · Hard · 15 min read · Version control, Storage systems, Distributed systems, Scaling, Replication
  GitHub's new Git storage architecture, Rubicon, rests on one observation: only reference updates need ordering.

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)
