Skip to content
GitHub

Configure Hugging Face

Point hf and Transformers model downloads at Depsilo's /huggingface route with HF_ENDPOINT.

BEFOREhttps://huggingface.co
AFTERhttp://localhost:23333/huggingface

Models and datasets reach Depsilo through HF_ENDPOINT and the /huggingface route.

终端窗口
export HF_ENDPOINT=http://localhost:23333/huggingface
hf download prajjwal1/bert-tiny --local-dir /tmp/bert-tiny

Libraries such as transformers read the same HF_ENDPOINT variable; set it in the shell, a CI secret, or the project’s .env.

  1. Download a small model

    终端窗口
    hf download prajjwal1/bert-tiny --local-dir /tmp/bert-tiny
  2. Run the same command again

    The second request should hit the Depsilo cache instead of reaching huggingface.co.

  3. Confirm the traffic in Admin

    Check the /huggingface requests and cache results in Access logs.