brevdev / notebooks

Collection of notebook guides created by the Brev.dev team!
MIT License
1.66k stars 284 forks source link

How to push the finetuned Mistral model to HF hub? #5

Closed elliotthwang closed 4 months ago

elliotthwang commented 11 months ago

Thank you for your notebook" Fine-tuning Mistral on your own data". However once finetuned the model by our own data, how to push the finetuned Mistral model to HF hub?

Thanks! @

npastrami commented 10 months ago

I am here wondering the same thing ^^

kaushalpowar commented 8 months ago

@elliotthwang @npastrami

# Push to HF Hub.

merged_model.push_to_hub('username/model_card_name') tokenizer.push_to_hub('username/model_card_name')

Make sure to create a new model card on huggingface first. In order to push model to HF you have to pass your write token from Huggingface, you can find it here

!huggingface-cli login --token hf_Y