Skip to content
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

[FEATURE] Distribution size of app that uses langchain4j with in-process embedding models #1492

Open
InAnYan opened this issue Jul 19, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@InAnYan
Copy link
Contributor

InAnYan commented Jul 19, 2024

Is your feature request related to a problem? Please describe.
I've been developing an app that uses langchain4j.

We have found a problem, that the distribution size of our app is too big.

I was studying the modules inside distribution to see why app changed it's size so much.

It turns out onnxruntime module takes up 376M:
image
image

(Windows takes up the most space)

It seems there are several versions inside 1 package for different OSes.

Describe the solution you'd like
Is there any way to remove unused modules for OS-arch?

Alternatives
Currently, I'm investigating the issue, maybe there are other ways to solve this

@InAnYan InAnYan added the enhancement New feature or request label Jul 19, 2024
@InAnYan
Copy link
Contributor Author

InAnYan commented Jul 20, 2024

OMG they put .pdb inside a release???

And it's been like this for years?

Similar issue: microsoft/onnxruntime#12084

@InAnYan
Copy link
Contributor Author

InAnYan commented Jul 20, 2024

UPDATE: I've successfully used Deep Java Library for embedding generation and the distribution size is very small.

I could try to make a new langchain4j package for in-process models that uses not ONNX, but djl

@langchain4j
Copy link
Owner

@InAnYan hmm, that is interesting, where can I see/run the code?

@InAnYan
Copy link
Contributor Author

InAnYan commented Jul 22, 2024

@langchain4j
Copy link
Owner

@InAnYan looks nice! I have nothing against a new package, but I have lots of other things right now and I won't be able to help an/or commit to maintain it afterwards. If you plan to maintain it, go ahead and we can add it on https://github.com/langchain4j/awesome-langchain4j page and in the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants