主要是一个简单记录,方便后续使用

安装

pip install -U huggingface_hub
  • 1.

使用

  • 下载模型
huggingface-cli download --resume-download gpt2 --local-dir gpt2
  • 1.
  • 下载数据
huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext
  • 1.
  • 默认cache 位置
$HOME/.cache/huggingface/hub
  • 1.

加速

export HF_ENDPOINT=https://hf-mirror.com
  • 1.

参考资料

 https://hf-mirror.com/