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",
                                cache_dir="./mistralmodel/",
                                force_download=False,
                                resume_download=False,
                                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?

I am facing the same problem. I want to use Pixtral-12B which is a very good “open-source” vision model that works brilliantly for my data domain. Pixtral is not part of Azure ML model registry unfortunately.

I am pondering using llama.cpp on a VM to break away from the model catalogue confinement, but before I go all out, I want to verify my understanding that there is no obvious way to use a Huggingface model that is not on Azure ML model catalogue.