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

import Embeddings takes too long time #715

Closed
dmi opened this issue May 12, 2024 · 5 comments
Closed

import Embeddings takes too long time #715

dmi opened this issue May 12, 2024 · 5 comments

Comments

@dmi
Copy link

dmi commented May 12, 2024

from txtai import Embeddings

this takes about 3-5 seconds. Is there a way to speedup the process in case I wish to use only external embeddings?
It will be good for various services, like RAG applications, allowing to use txtai for it's fantastic simplicity, but use GPU calculations out of the box.

More precisely: I want to handle all database storage and search stuff at the service side with txtai, but want to handle all LLM stuff on the GPU server. So I can't start txtai as a service completely on a GPU side.

@davidmezzetti
Copy link
Member

I'm not exactly sure why it is taking 3-5 seconds to load. Have you tried to narrow that down?

@davidmezzetti
Copy link
Member

One additional note, the import time is related to the number of dependencies installed.

For example, if you ran pip install txtai[all] it will take longer to import than pip install txtai. Additionally, you can try installing the cpu-only version of torch.

pip install torch==2.3.0+cpu torchvision==0.18.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

@pyaji
Copy link

pyaji commented May 16, 2024

@davidmezzetti
Hi. Is it possible to minimize size of depences, and install only part of txtai[pipline] ? All i need is Textractor.

@davidmezzetti
Copy link
Member

You can run:

pip install txtai[pipeline-data]

@davidmezzetti
Copy link
Member

Closing this issue due to inactivity. Please re-open or open a new issue if there are further questions.

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

No branches or pull requests

3 participants