# Does a pinned model get automatically updated?

**URL:** <https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978>\
**Category:** Inference Endpoints on the Hub\
**Created:** [October 4, 2022, 7:30am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978 "2022-10-04T07:30:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattupson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattupson/32/11942_2.png) [@mattupson](https://discuss.huggingface.co/u/mattupson)\
**Post date:** [October 4, 2022, 7:30am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/1 "2022-10-04T07:30:36Z")

</div>

When we push a model to a repo, and we have a pinned model on that repo, does the pinned model get updated automatically and immediately?

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](https://discuss.huggingface.co/u/philschmid)\
**Post date:** [October 4, 2022, 7:33am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/2 "2022-10-04T07:33:34Z")

</div>

No, the endpoint is not automatically updated when you push a new revision.

We are working on adding the „revision“ to the update capabilities to have seamless, rollback tolerant updates of model revisions.

This would allow you to easily update the endpoint with using the HTTP API and a webhook for example when you upload a new model.

---

<div class="post-metadata">

**Author:** ![mattupson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattupson/32/11942_2.png) [@mattupson](https://discuss.huggingface.co/u/mattupson)\
**Post date:** [October 4, 2022, 8:08am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/3 "2022-10-04T08:08:17Z")

</div>

Thanks for the response @philschmid. So just to make sure I’m 100% clear: at present we would need to manually unpin and re-pin the model after each update to the repository?

---

<div class="post-metadata">

**Author:** ![mattupson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattupson/32/11942_2.png) [@mattupson](https://discuss.huggingface.co/u/mattupson)\
**Post date:** [October 4, 2022, 8:21am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/4 "2022-10-04T08:21:19Z")

</div>

Ah no i see that we can specify pinned models in an API call here: [Detailed usage and pinned models](https://huggingface.co/docs/api-inference/usage)

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](https://discuss.huggingface.co/u/philschmid)\
**Post date:** [October 4, 2022, 8:22am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/5 "2022-10-04T08:22:03Z")

</div>

What do you mean with `up-pin`and `pin`? Are you talking about the [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/index)

---

<div class="post-metadata">

**Author:** ![mattupson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattupson/32/11942_2.png) [@mattupson](https://discuss.huggingface.co/u/mattupson)\
**Post date:** [October 4, 2022, 8:27am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/6 "2022-10-04T08:27:41Z")

</div>

I mean the Accelerated Inference API: [Dashboard - Hosted API - HuggingFace](https://api-inference.huggingface.co/dashboard/pinned_models)

---

<div class="post-metadata">

**Author:** ![jeffboudier](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jeffboudier/32/31575_2.png) [@jeffboudier](https://discuss.huggingface.co/u/jeffboudier)\
**Post date:** [October 26, 2022, 5:16pm UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/7 "2022-10-26T17:16:20Z")

</div>

For clarity if people stumble on this thread:

- the Inference API is a free service for the community to test and evaluate models on the Hub, it works on shared infrastructure and is rate limited. It used to be a paid solution, with the ability for users to “pin models” to avoid load times.
- [Inference Endpoints](https://huggingface.co/inference-endpoints) is a new paid service designed for production use cases, where models are deployed on dedicated infrastructure. There is no concept of “pinning models” as each created endpoint is created from scratch for/by the customer with its own compute resources.

By the way @mattupson the [HF Inference Endpoint CLI tool](https://github.com/MantisAI/hfie) is super cool thanks for building it!

---

<div class="post-metadata">

**Author:** ![Kalaoke](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Kalaoke](https://discuss.huggingface.co/u/Kalaoke)\
**Post date:** [October 27, 2022, 4:56pm UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/8 "2022-10-27T16:56:48Z")

</div>

Yes it will great if the pinned model get updated when a new version of the model in the repo is pushed!

---

<div class="post-metadata">

**Author:** ![Kalaoke](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Kalaoke](https://discuss.huggingface.co/u/Kalaoke)\
**Post date:** [November 8, 2022, 7:59am UTC](https://discuss.huggingface.co/t/does-a-pinned-model-get-automatically-updated/23978/9 "2022-11-08T07:59:32Z")

</div>

As far as I understand, with HF inference endpoint, If i want to update a running endpoint with another version of the model i need to create a new endpoint, and delete the old one after I’ve made the transition.  
In my case the request endpoint URL needs to be the same. My Sentiment Analysis API model will be integrated in a forum. It is not possible to modify URL endpoint each time we push a new version. How i can handle this?  
Thanks for your help
