-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Model Request] please add "pkshatech/GLuCoSE-base-ja" #294
Comments
You can manually add a custom model to the list of supported ONNX models in from fastembed.text.onnx_embedding import supported_onnx_models
supported_onnx_models.append({
"model": "Alibaba-NLP/gte-large-en-v1.5",
"dim": 1024,
"description": "Custom Model",
"size_in_GB": 1.7,
"sources": {
# from huggingface
"hf": "Alibaba-NLP/gte-large-en-v1.5",
},
# This will make fastembed downloading this model file : https://huggingface.co/Alibaba-NLP/gte-large-en-v1.5/blob/main/onnx/model.onnx
"model_file": "onnx/model.onnx",
})
# must be imported before the supported_onnx_models updated
from qdrant_client import QdrantClient, models But it requires your model must be in ONNX format because fastembed uses the ONNX runtime. Also, make sure to include accurate values for dim, sources, and model_file. I'm not sure about the accurate of embedding results but the model runs without any exceptions |
You can also PR the model to be added. It could look like #270. |
@quanduongduc with this approach you would need to be careful with the postprocessing required by particular models, some models require pooling onnx output, some of them don't. You'd need to choose a proper implementation like We also don't guarantee that these implementations won't be refactored without warnings, since we treat them as internal classes No one restricts you from doing it though |
What happened?
I would like to use "pkshatech/GLuCoSE-base-ja"
What Python version are you on? e.g. python --version
Python3.10
Version
0.2.7 (Latest)
What os are you seeing the problem on?
Linux
Relevant stack traces and/or logs
No response
The text was updated successfully, but these errors were encountered: