# How to deploy any huggingface model on azure ml

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932%3E%5C
**Category:** Models\
**Created:** [November 3, 2023, 10:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932 "2023-11-03T10:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsharma29](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vsharma29](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvsharma29)%5C
**Post date:** [November 3, 2023, 10:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932%2F1 "2023-11-03T10:25:00Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![domrom44](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@domrom44](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdomrom44)%5C
**Post date:** [December 13, 2023, 10:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932%2F2 "2023-12-13T10:37:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jguer168](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jguer168](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjguer168)%5C
**Post date:** [February 12, 2024, 7:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932%2F3 "2024-02-12T19:48:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rtrad](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/rtrad/32/34429_2.png) [@rtrad](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frtrad)%5C
**Post date:** [November 12, 2024, 10:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-deploy-any-huggingface-model-on-azure-ml%2F60932%2F4 "2024-11-12T10:19:54Z")

</div>

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.
