The Easiest and Cheapest Way to Deploy Finetuned Mistral 7B Instruct Model (or Any Model) | by Qendel AI - Freedium

PHOTO EMBED

Thu Nov 30 2023 00:08:04 GMT+0000 (Coordinated Universal Time)

Saved by @mikeee

Copy
# Login to HF
notebook_login()

# Define a path in HF repository you want to push your model --> CHANGE THIS TO YOUR HF PATH
model_path = "qendel-ai/aq-LORA-finetuned-mistral-7b-instruct-model-v01"

# Merge the finetuned model adapters with the base model 
finetuned_model = finetuned_model.merge_and_unload()

# Push the finetuned model along with adapters 
finetuned_model.push_to_hub(model_path, use_auth_token=True)
tokenizer.push_to_hub(model_path, use_auth_token=True)
content_copyCOPY

https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8