Home / Hugging Face

Hugging Face Mirror (ML models, model hub) in Iran

Hugging Face mirror (ML models, model hub) — Download Hugging Face models and datasets from Iran — point huggingface_hub and transformers at mirror.rasanegaar.com/hf/.

About Hugging Face

Hugging Face hosts ML models, tokenizers, and datasets; files are often multi-gigabyte.

Rasanegaar Mirror exposes the same API in Iran — using standard clients like huggingface_hub and transformers.

Hugging Face mirror in Iran

Endpoint: https://mirror.rasanegaar.com/hf/ — same path on repository.rasanegaar.com/hf/.

There is no separate “request a model” form: a successful CLI download caches that model for everyone.

Landing page: /repos/hf/.

On Rasanegaar Mirror

StatusAvailable
Size
Last update
URLhttps://mirror.rasanegaar.com/hf/

CLI setup (huggingface_hub)

Manual steps

  1. Install the client:
    pip install -U huggingface_hub
  2. Set environment variables (in ~/.bashrc or before each command):
    export HF_ENDPOINT=https://mirror.rasanegaar.com/hf
    export HF_HUB_ETAG_TIMEOUT=86400
    export HF_HUB_DOWNLOAD_TIMEOUT=86400
  3. Download a public model:
    huggingface-cli download google-bert/bert-base-uncased
  4. Gated models (e.g. Llama) need a token — set your Hugging Face token:
    export HF_TOKEN=
  5. In Python / transformers, before importing:
    import os
    os.environ.setdefault("HF_ENDPOINT", "https://mirror.rasanegaar.com/hf")
    from transformers import AutoModel, AutoTokenizer
  6. Quick connectivity check:
    curl -s "https://mirror.rasanegaar.com/hf/api/models/google-bert/bert-base-uncased" | head

Ollama and LM Studio

Ollama does not use this endpoint as a built-in download source. Fetch GGUF files with huggingface-cli via the mirror, then ollama create from the local path.

LM Studio often ignores HF_ENDPOINT in the GUI. Download with the CLI first, then open the local folder in LM Studio.

Each successful CLI download makes that model available for later requests through the mirror.