Skip to content

Conversation

@mattt
Copy link
Collaborator

@mattt mattt commented Nov 16, 2025

This PR uses the swift-xet project to add support for downloading files using Hugging Face's Xet storage backend.

Xet support is configured through a Swift 6.1 package trait that's enabled by default. We use version-specific package manifests to maintain compatibility with Swift 6.0. (Not at the moment, but it will be)

@mattt mattt requested a review from Copilot November 16, 2025 14:58
Copilot finished reviewing on behalf of mattt November 16, 2025 15:02

This comment was marked as outdated.

@mattt
Copy link
Collaborator Author

mattt commented Nov 17, 2025

⬇️  Starting download tests...

✅ [1/2] model.safetensors
   Time: 39.20s
   Size: 1.5 GB
   Speed: 38.3 MB/s

Re-running with Xet disabled (falling back to URLSession + LFS), download speeds are >2x more. Looking into what we're doing wrong...

@mattt
Copy link
Collaborator Author

mattt commented Nov 20, 2025

Nice! I finally got this working.

⬇️  Starting download tests...

✓ Got metadata for model.safetensors, size=1503300328, xet_data=true
✓ Using Xet CAS for model.safetensors with hash 6f87d3bff66602a9611e541180dec950a6b6a9068ca274ee43ac8f83550f0223
✅ [1/2] model.safetensors
   Time: 10.70s
   Size: 1.5 GB
   Speed: 140.6 MB/s

I'm almost certainly packaging swift-xet incorrectly, though. Now that we got things working, let's pare it back until we have only what we need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants