Using autotrain locally model is not pushed to hub

Using autotrain locally the used model is downloaded and stored in .cache\huggingface\hub\modelxyz\ as an ashampoo iso file.
The training works but when “push_to_hub” the pytorch_model_xxx.bin files are missing and the config.json as well. What did I do wrong?

you saved only the adapter. use --merge-adapter arg to save the full model, else merge them manually after training

Thank you! I will try !


stuck while loading “checkpoint shards” and end without any error message. Nothing was uploaded.

@JvManger , I am also facing the issue like yours . While training it is working but --push_to_hub is saying that Token must be specified for push to hub . I am successfully logged in to hugging face by my cli virtual env .
@abhishek , Is there any other parameters I am missing where the token should be explicitly mention in the command ?

token needs to be specified by --token argument

Hi - just piggybacking on this thread as I think it is relevant. Beginners question :slightly_smiling_face:

I am successfully using autotrain locally to fine-tune a llama 2 chat model and I am merging the resulting adapter. The one thing I cannot seem to work out is the correct usage of the parameters to get it to push to the hub.

I have logged in via the huggingface-cli with a token which has write access. I am then setting the following parameters which I think are relevant in the invocation of autotrain:

  • project-name (set to “ft-test”. Does this only affect the local training or the hub push too?)
  • push-to-hub (enabled to do the push)
  • token (passed the same token as I am logged in as, which has write access)
  • username (set to “alfraser” which is my HF user)
  • repo-id (set to “ft-test” which is an empty “model” when I log into the hub)

The error I get is “You don’t have the rights to create a model under this namespace” (image below). I feel like I am either missing or mis-using an argument, or maybe I need to set up the model on the hub differently to allow this to work.

Any ideas gratefully received as I’m going to soon have “QWERTY” imprinted on my forehead from banging my head on the desk :rofl:

repo id needs to be of the format username/repo_name. you dont need to use repo_id if you provide username and project_name. in this case repo_id will be username/project_name. make sure there are no repos in your user with name same as project_name :slight_smile:

Thanks for the super quick reply. I am trying that now. Maybe just a follow up question which occurs to me from your reply. Is there a way to have it overwrite an existing model (i.e. if I want to do an update but keep the model name the same) or should I think about using differing model versions/names if I change, and then repoint my client to use the new model? Thanks Al

That is definitely past the previous error now and looks like it’s pushing fine. Thanks a million for the help (my head is QWERTY-free now :wink:)