Why it takes so long to run PropertyGraphIndex with Llama 3 and a multilingual embedding model? #13944
Replies: 2 comments
-
@hoangcuongnguyen2001 Xin chào! Tôi là một bot có thể giúp bạn giải quyết lỗi, trả lời câu hỏi và trở thành một người đóng góp. Tôi ở đây để giúp bạn trong khi đợi người duy trì mã nguồn mở. The long runtime for running the graph in your case could be due to the choice of embedding model. In the provided code, the embed_model = HuggingFaceEmbedding(model_name="intfloat/multilingual-e5-base", trust_remote_code=True) HuggingFace models, especially large ones, can be slower compared to OpenAI's embedding models. If performance is a critical factor, you might want to switch to an OpenAI embedding model, which is generally optimized for speed and efficiency. OpenAI offers a variety of models that you can choose from, such as: # Settings.embed_model = OpenAIEmbedding(model_name="text-embedding-3-small") Switching to an OpenAI model could potentially reduce the runtime for running the graph. However, this does not necessarily mean you have to choose OpenAI models over open-source ones; it depends on your specific requirements for speed versus other factors like cost or model openness. Additionally, the use_async: bool = True This setting can help optimize the runtime by leveraging asynchronous processing. OpenAI's embedding models, such as The LlamaIndex framework provides various OpenAI embedding models, including:
These models are designed to be efficient and can be a good choice if you need faster performance [1][2][3][4]. |
Beta Was this translation helpful? Give feedback.
-
@hoangcuongnguyen2001 |
Beta Was this translation helpful? Give feedback.
-
I am trying to deploy PropertyGraphIndex, similar to this example: Property Graph Index - LlamaIndex. The only 2 things that I did different with this example are:
However, rather than getting the graph in seconds as in the example with GPT-3.5-turbo, after 10 minutes of running code, the pipeline could not produce any results before being interrupted.
So, why it took so long to run the graph in my case, and what does it mean for the choice of LLM and embedding models in PropertyGraphIndex? Does that mean I have to choose OpenAI models, rather than open-source ones, for this task?
Beta Was this translation helpful? Give feedback.
All reactions