Hugging Face
公式サイト:
使い方
参考:
Hugging Face – 使い方 | BLOG CAKE
クローン
リポジトリをクローンする。
$ git clone https://huggingface.co/user_name/repo_name
※容量が大きいモデルファイルをダウンロードするには Git LFS が必要となる。
参考:
Hugging Face からフォルダごとダウンロードする | work4ai
ダウンロードが失敗する! Hugging Face の巨大モデルを確実に落とす方法 | oha
Hub ライブラリ
Hub ライブラリをインストールする。
$ pip install huggingface_hub
ファイルをダウンロードする。
from huggingface_hub import hf_hub_download
hf_hub_download(
repo_id="user_name/repo_name",
filename="path/to/model.safetensors")
Code language: Python (python)
ドキュメント:
Quick Start | Hugging Face [Official]
Download Files from the Hub | Hugging Face [Official]
Hub Client Library | Hugging Face [Official]
参考:
Hugging Face からのモデルのダウンロード – Qiita
CLI
CLI をインストールする。
$ pip install "huggingface_hub[cli]"
リポジトリを丸ごとダウンロードする。
$ hf download user_name/repo_name
ファイルをダウンロードする。
$ hf download user_name/repo_name path/to/model.safetensors
ドキュメント:
Command Line Interface – Hub Client Library | Hugging Face [Official]
リンク
Hugging Face (@huggingface) | X
ドキュメント
Documentation | Hugging Face [Official]