Comments (8)
This is currently not supported as Flair
, which is the main method for using embedding models, uses hugginface transformers which is typically not meant for importing onnx structures in part due to their tokenization structure. Exporting to onnx is possible however.
from keybert.
This is available in sentencetransformers - https://github.com/UKPLab/sentence-transformers/blob/72da7293186700bff4fed8e81adcfe40a03be1d2/examples/onnx_inference/onnx_inference.ipynb . We can load an onnx model for inference. With a local path to onnx exported file, it could be added as one more backend . Did test it with tinyBERT exported onnx model, but didnt see much performance gain on a V100. yet to try on a T4 GPU.
from keybert.
Thank you for the link! I did not realize it was already available in sentence-transformers. The main difficulty though will be loading in custom ONNX models that require some processing before it can be used in sentence-transformers.
from keybert.
I am thinking of adding it as a custom backend. i didnt see this before - https://maartengr.github.io/KeyBERT/guides/embeddings.html#custom-backend
from keybert.
Yes, if you can create a custom backend that loads in using the sentence-transformer then that would solve your issue. It would also be nice if that backend could then be added to KeyBERT but that would also depend on dependencies and implementation.
from keybert.
Since this issue has been a while without activity, I'll be closing it for now. However, if you are still experiencing the issue or want to discuss it further, let me know!
from keybert.
from keybert.
Hi @MaartenGr @sujithjoseph did you manage to deal with ONNX backend?
from keybert.
Related Issues (20)
- Bug: possible mistake in MMR calculation HOT 1
- Cohere default model HOT 3
- importing KeyBERT causes pydantic_core problems HOT 3
- KeyLLM fails when no GPU is available HOT 1
- extraction of keywords should be ignored when the LLM does not know or does not find them HOT 2
- Is there a batched-based keyword extraction approach with keyBERT? HOT 2
- KeyLLM error with bedrock model HOT 9
- KeyLLM parameter control HOT 3
- Langchain produces error based on instructions in sourcecode HOT 1
- Stopwords on KeyBERT HOT 6
- KeyLLM - Mistral token issue HOT 1
- Running Keybert for a list of docs to extract arabic keywords HOT 1
- KeyLLM - page_content error with bedrock model HOT 3
- Efficient KeyLLM + KeyBERT - Torch not compiled with CUDA enabled HOT 1
- Allow KeyBERT to pass `batch_size` to `llm.encode()` method HOT 5
- Make system content as variable HOT 2
- Fail to parse OpenAI api response HOT 2
- Extract keywords from multiple documents given a nested list of candidates for each document. HOT 1
- can't import keybert HOT 9
- Using KeyBERT with a locally saved model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keybert.