How to deploy any huggingface model on azure ml

I want to deploy huggingface model on azure ml.

  1. I am using azure ml notebook to run the below code.
  2. I don’t want to use azure model catalog. I dont want to use huggingface inference endpoint and not API.
  3. I want have loaded the model and save the model using pretrained fucntion.

I want to register the model and using the same model.

from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig
model = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path ="mistralai/Mistral-7B-Instruct-v0.1",
                                trust_remote_code =False)

tokenizer = AutoTokenizer.from_pretrained("./mistralmodel/")

How can I do this please help me.

Did you find an answer? I have the same problem. I wasn’t able to find a solution for this.

I also have the same issue. Anyone care to help how to deploy huggingface models which aren’t part of the model catalog?