Replies: 5 comments 9 replies
-
HI @siddhsql it does not seem that there is a support for mac GPUs: https://onnxruntime.ai/docs/get-started/with-java.html How slow is it? How much text do you embed? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi All, thanks for all your inputs. once thing i wanted to understand (and maybe this is topic for separate thread but i will start it here), is that when i looked at the dependency graph of langchain4j i see it uses both the dlj library from amazon and the onnxruntime from microsoft. i am not familiar with internals of any of these libraries but wouldn't it be better for us to stick with one deep learning library? am i understanding something wrong here? |
Beta Was this translation helpful? Give feedback.
-
I now tried to run the same code on a machine with NVIDIA RTX A6000 GPU. again it seems by default langchain4j does not use the GPU if available. What can I do to make it use GPU in this case? My code:
I am only showing minimal code. I calculated thousands of embeddings this way and GPU usage was 0. CPU was maxed out. |
Beta Was this translation helpful? Give feedback.
-
thanks for the response. a separate question - how can I get the source
code of version 0.22.0 of dev.langchain4j:langchain4j-embeddings? that is
the one i'd like to use. the repo does not have that tag anymore.
…On Wed, May 8, 2024 at 12:02 AM LangChain4j ***@***.***> wrote:
Hi, there is no way to utilize GPU right now, we have to use another
library: com.microsoft.onnxruntime:onnxruntime_gpu
<https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime_gpu>
instead of com.microsoft.onnxruntime:onnxruntime
<https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime>
It should be pretty easy to do this change in
https://github.com/langchain4j/langchain4j-embeddings, could you give it
a try?
—
Reply to this email directly, view it on GitHub
<#1057 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6NWEK3M7KOPG6GTDZZOBFLZBHEXLAVCNFSM6AAAAABHJ2YI6OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TGNJQG4YDC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
thanks a lot.
…On Fri, May 10, 2024 at 2:11 AM LangChain4j ***@***.***> wrote:
Hi @siddhsql <https://github.com/siddhsql> here is the 0.22.0 commit:
***@***.***
<langchain4j/langchain4j-embeddings@ee2a050>
—
Reply to this email directly, view it on GitHub
<#1057 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6NWEK76ZFUMVO4DCF3BMZDZBSFMBAVCNFSM6AAAAABHJ2YI6OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TGOBQGM3TM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I am synced to version 0.22.0 of langchain4j and using the
dev.langchain4j.model.inprocess.InProcessEmbeddingModelType.ALL_MINILM_L6_V2
to calculate embeddings on a M2 Mac Mini. It does not seem to use the GPU and as a result is a bit slow. How can I get GPU acceleration? Thanks very much.Beta Was this translation helpful? Give feedback.
All reactions