olah  by vtuber-plan

Self-hosted Huggingface mirror and cache service

Created 2 years ago
282 stars

Top 93.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Olah is a self-hosted, lightweight mirror service for Hugging Face resources, designed to address slow download speeds and bandwidth limitations. It targets engineers and researchers who frequently interact with Hugging Face models, datasets, and spaces, offering significant benefits in download acceleration and resource management through intelligent caching.

How It Works

Olah implements a unique file-block level mirroring and caching strategy. Instead of mirroring the entire Hugging Face website, it caches resources incrementally as users download them. This "on-demand" caching mechanism dramatically speeds up subsequent downloads of the same files and conserves network bandwidth. Administrators can further refine this by configuring specific repositories for caching and access through a TOML configuration file, offering granular control over the mirroring process.

Quick Start & Requirements

Installation is straightforward via pip (pip install olah) or from source. To run, execute olah-cli and set the HF_ENDPOINT environment variable to your mirror's address (e.g., http://localhost:8090). This redirects all Hugging Face library download operations through your local mirror. Advanced configurations, including host, port, cache path, cache size limits, and cache cleaning strategies (LRU, FIFO, LARGE_FIRST), can be managed via a configs.toml file. Official documentation and source code are available at olah-docs and olah-source.

Highlighted Details

  • Efficient file-block level caching for Hugging Face models, datasets, and spaces.
  • Configurable cache policies and repository accessibility rules.
  • Supports wildcard and regular expression matching for access control.
  • Option to specify custom cache directories and size limits.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels such as Discord or Slack. Maintenance status and future development plans are outlined in the "Future Work" section of the README, including an administrator/user system and OOS backend support.

Licensing & Compatibility

Olah is released under the permissive MIT License. This license generally allows for broad compatibility, including commercial use and integration within closed-source projects without significant restrictions.

Limitations & Caveats

Cached data is not directly migratable between different versions of Olah, requiring users to delete the cache folder before upgrading. High concurrent downloads may lead to timeout errors for new connections, which can be mitigated by increasing the uvicorn WEB_CONCURRENCY setting.

Health Check
Last Commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
20
Issues (30d)
1
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
11 more.

GPTCache by zilliztech

0.0%
8k
Semantic cache for LLM queries, integrated with LangChain and LlamaIndex
Created 3 years ago
Updated 1 year ago
Feedback? Help us improve.