# Deploying 3rd party HF reranking model

**URL:** <https://discuss.elastic.co/t/deploying-3rd-party-hf-reranking-model/375729>\
**Category:** Elastic Search\
**Created:** [March 11, 2025, 6:44pm UTC](https://discuss.elastic.co/t/deploying-3rd-party-hf-reranking-model/375729 "2025-03-11T18:44:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregp](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@gregp](https://discuss.elastic.co/u/gregp)\
**Post date:** [March 11, 2025, 6:44pm UTC](https://discuss.elastic.co/t/deploying-3rd-party-hf-reranking-model/375729/1 "2025-03-11T18:44:52Z")

</div>

Hi all,

I'm currently trying to deploy the following reranking model from Hugging Face to elasticsearch: [BAAI/bge-reranker-v2-m3](https://huggingface.co/BAAI/bge-reranker-v2-m3). I'm following [this tutorial](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/retriever.html#text-similarity-reranker-retriever-example-eland). My objective is to deploy a third-party reranking model to be able to have a deployed endpoint to either integrate into a pipeline or directly query the deployed model with a list of documents to get them reranked.

I can successfully upload the model to ES, but when I try to create the inference endpoint for the `text_similarity_reranker` I get an error saying: `Model IDs must be unique. Requested model ID [baai__bge-reranker-base] matches existing model IDs but must not.` I can confirm that the model is not deployed and there is no endpoint at this point. Here is my command for creating the inference endpoint as seen in the tutorial:

```auto
PUT _inference/rerank/bge-reranker-base
{
  "service": "elasticsearch",
  "service_settings": {
    "num_threads": 1,
    "num_allocations": 1,
    "model_id": "baai__bge-reranker-base"
  }
}

```

If I run the exact same command again without changing anything, I get the following error this time: `Inference endpoint [bge-reranker-base] already exists` but there is no deployment info for the model on the trained model page.

Any idea why this might be happening?

Current ES version is 8.15.0.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 8, 2025, 6:44pm UTC](https://discuss.elastic.co/t/deploying-3rd-party-hf-reranking-model/375729/2 "2025-04-08T18:44:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
