【问题标题】:Unable to push pre-trained model from Google colab to Huggingface for hosting Bot无法将预训练模型从 Google colab 推送到 Huggingface 以托管 Bot
【发布时间】:2021-09-09 08:26:51
【问题描述】:

我在 Google Collab 中训练了一个 Chatbot 模型,当推送到 Huggingface 时,它​​不推送,笔记本一直执行不推送,大小约为 500MB

!sudo apt-get install git-lfs
!git config --global user.email "MY EMAIL"
!git config --global user.name "MY name"
model    .push_to_hub('MODEL REPO NAME', use_auth_token='API TOKEN')
tokenizer.push_to_hub('MODEL REPO NAME', use_auth_token='API TOKEN')

【问题讨论】:

    标签: git google-colaboratory pre-trained-model huggingface-tokenizers


    【解决方案1】:

    这是对 Google Colaboratory 的限制。

    您可以通过您的 API 密钥作为密码进行 git clone,which can be accessed here.

    另外一步,如果使用colab,还必须声明你的邮箱:

    !git config --global user.email "email@example.com"

    然后用 api key 克隆:

    !git clone https://USERNAME:APIKEY@huggingface.co/user/repo

    或者,使用您的 huggingface 登录凭据:

    !git clone https://username:password@huggingface.co/user/repo

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2021-01-08
      • 1970-01-01
      • 2021-06-06
      • 2020-12-15
      • 2022-01-08
      • 2019-06-20
      • 2023-02-01
      • 2021-07-09
      相关资源
      最近更新 更多