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

[Question] [Optimization] async support? #516

Open
logan-markewich opened this issue Aug 19, 2024 · 3 comments
Open

[Question] [Optimization] async support? #516

logan-markewich opened this issue Aug 19, 2024 · 3 comments
Assignees
Labels
DEV features

Comments

@logan-markewich
Copy link

I noticed we are using fastapi to build micro services, but we aren't using async for anything?

For example, llamaindex has full async support on nearly every component. Yet all the methods are defined using synchronous methods.

We can greatly increase throughput but using async with fastapi

@logan-markewich logan-markewich changed the title async support? [Question] [Optimization] async support? Aug 19, 2024
@preethivenkatesh preethivenkatesh added the DEV features label Aug 21, 2024
@kevinintel
Copy link
Collaborator

Thanks for reminding, we already use async

@logan-markewich
Copy link
Author

@kevinintel for sure, but shouldn't the components be using async? For example for embeddings, we have await embed_model.aget_text_embedding() or with llms await llm.achat() or with vector stores vector_store.aquery() and so on

I don't see this being utilized

@lvliang-intel
Copy link
Collaborator

lvliang-intel commented Sep 2, 2024

@logan-markewich
we currently have async support in some microservices, but not all. We'll need to evaluate each case individually. Thank you for highlighting this issue; addressing it can significantly improve the performance of the entire pipeline.

You can find the async support on the LLM microservice.
https://github.com/opea-project/GenAIComps/blob/main/comps/llms/text-generation/tgi/llm.py

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

No branches or pull requests

4 participants