# Can't register a pre-trained model

**URL:** https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651
**Category:** OpenSearch
**Created:** [June 4, 2025, 10:52am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651 "2025-06-04T10:52:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![TheRabak](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/therabak/32/9191_2.png) [@TheRabak](https://forum.opensearch.org/u/TheRabak)
#### Post date: [June 4, 2025, 10:52am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/1 "2025-06-04T10:52:39Z")

</div>

On an AWS managed service, version 2.17

**Describe the issue** :

trying to use one of the pretrained models listed on the docs:

> **[Pretrained models](https://docs.opensearch.org/docs/latest/ml-commons-plugin/pretrained-models/#supported-pretrained-models)**
>
> OpenSearch-provided pretrained models Introduced 2.9

the model is huggingface/sentence-transformers/multi-qa-MiniLM-L6-cos-v1  
version 1.0.1  
trying TORCH\_FORMAT and ONNX

getting this error on the task:  
“This model is not in the pre-trained model list, please check your parameters.”

what could i be doing wrong here?  
thanks!

---

<div class="post-metadata">

### Author: ![tfitch](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@tfitch](https://forum.opensearch.org/u/tfitch)
#### Post date: [June 4, 2025, 5:26pm UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/2 "2025-06-04T17:26:19Z")

</div>

Hey, I just started getting this same issue yesterday and noticed the smallest change in the docs. The version for my model and your model is now 1.0.2 instead of 1.0.1.

I’m also on AWS managed OpenSearch. When I switched to model 1.0.2 I could register and deploy a pre-trained model again.

Don’t know why they’re actively blocking the old model versions… put on your tinfoil hats for that. But 1.0.2 should work.

---

<div class="post-metadata">

### Author: ![TheRabak](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/therabak/32/9191_2.png) [@TheRabak](https://forum.opensearch.org/u/TheRabak)
#### Post date: [June 5, 2025, 7:39am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/3 "2025-06-05T07:39:54Z")

</div>

Thanks for the reply!

You’re right but check this out, when using the TORCH\_SCRIPT format on v 1.0.2 the registration succeeds but deploying throws this error:

“error”: “{"IDv1tSDKQvW1wgPGETaMWw":"\nUnknown builtin op: aten::scaled\_dot\_product\_attention.\nHere are some suggestions: \n\taten::\_scaled\_dot\_product\_attention\n\nThe original call is:\n File \"code/ **torch** /transformers/models/bert/modeling\_bert.py\", line 165\n x1 = torch.view(\_36, [\_38, int(\_39), 12, 32])\n value\_layer = torch.permute(x1, [0, 2, 1, 3])\n attn\_output = torch.scaled\_dot\_product\_attention(query\_layer, key\_layer, value\_layer, attention\_mask)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \<— HERE\n attn\_output0 = torch.transpose(attn\_output, 1, 2)\n input = torch.reshape(attn\_output0, [\_26, \_27, 384])\n"}”,

ONNX version works for registering and deploying, seems like something is up indeed, tinfoil hat firmly in place.

---

<div class="post-metadata">

### Author: ![PaulCampbell](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@PaulCampbell](https://forum.opensearch.org/u/PaulCampbell)
#### Post date: [June 5, 2025, 10:55am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/4 "2025-06-05T10:55:23Z")

</div>

We are also experiencing this issue. We use the Docker image `[opensearchproject/opensearch:2.19.2]` as part of our CI/CD pipeline to run integration tests, and we’ve encountered the problem described above. We are able to register the model if we update the version to `1.0.2`, but the model deployment then fails.

Just to also confirm, when I change the model format to ONNX I can register and deploy the model.

```auto
POST /_plugins/_ml/models/_register
{
  "name": "huggingface/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
  "version": "1.0.2",
  "model_format": "ONNX"
}

```

I’m assuming they are interchangeable but would guess the embedding values (floating points) could be different? 🤷‍♂️

---

<div class="post-metadata">

### Author: ![TheRabak](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/therabak/32/9191_2.png) [@TheRabak](https://forum.opensearch.org/u/TheRabak)
#### Post date: [June 9, 2025, 8:42am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/5 "2025-06-09T08:42:53Z")

</div>

As far as I know both formats represent the same weights so I assume the outputted values would also be the same… I could be wrong tho

---

<div class="post-metadata">

### Author: ![dave\_lundie](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@dave\_lundie](https://forum.opensearch.org/u/dave_lundie)
#### Post date: [June 27, 2025, 9:10am UTC](https://forum.opensearch.org/t/cant-register-a-pre-trained-model/24651/6 "2025-06-27T09:10:59Z")

</div>

I have recently started using OpenSearch after I abandoned Elastic some years ago due to license changes. I am using both OpenSearch 3.0 and 2.17 and was using 2.17 (2 Node deployment) for the TORCH\_FORMAT and encountered the issues using Python as it would download but not deploy. I have solved the issue for me by doing the following. But before I do that just some background on the tech stack used so you can see if your conditions approximate mine. I am running a host on hypervisor (in my case proxmox) enough RAM 20G, 8 Xeon cores, SSD disks but old tech. There is no GPU installed, OS Ubuntu 22.04LTS. My steps I took was as follows. The data frames API issue was my first problem and moved to “pandas==1.5.3”, Second I don’t have a GPU so installed the CPU version for torch “pip install torch==1.13.1 --index-url [https://download.pytorch.org/whl/cpu](https://download.pytorch.org/whl/cpu)” then the transformer version had to be changed as well “pip install transformers==4.37.2”. You will notice these are kinda old version of these packages and the reason for this is to try and match the version that were used for the version of OpenSearch you are using. Having said that I have not yet tested this for OpenSearch 3.0 and this will happen later for me once done with the training and when I want to use it in production. Hope this helps somebody with the same issues.
