Introducing swift-huggingface: The Complete Swift Client for Hugging Face
About this article
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
Back to Articles Introducing swift-huggingface: The Complete Swift Client for Hugging Face Published December 5, 2025 Update on GitHub Upvote 43 +37 Mattt mattt Follow Today, we're announcing swift-huggingface, a new Swift package that provides a complete client for the Hugging Face Hub. You can start using it today as a standalone package, and it will soon integrate into swift-transformers as a replacement for its current HubApi implementation. The Problem When we released swift-transformers 1.0 earlier this year, we heard loud and clear from the community: Downloads were slow and unreliable. Large model files (often several gigabytes) would fail partway through with no way to resume. Developers resorted to manually downloading models and bundling them with their apps — defeating the purpose of dynamic model loading. No shared cache with the Python ecosystem. The Python transformers library stores models in ~/.cache/huggingface/hub. Swift apps downloaded to a different location with a different structure. If you'd already downloaded a model using the Python CLI, you'd download it again for your Swift app. Authentication is confusing. Where should tokens come from? Environment variables? Files? Keychain? The answer is, "It depends", and the existing implementation didn't make the options clear. Introducing swift-huggingface swift-huggingface is a ground-up rewrite focused on reliability and developer experience. It provides: Complete Hub API coverage — models, datasets, sp...