Open OvaisTariq95 opened 1 week ago
Hey @OvaisTariq95! I'm here to help you with any bugs, questions, or contributions you have. Let's figure this out together!
The issue you're experiencing with resource usage during hybrid search ingestion might be due to the configuration or the way the batch processing is handled.
Batch Size and Parallelism: Ensure that the batch_size
and parallel
parameters in QdrantVectorStore
are set appropriately. A smaller batch_size
might help reduce resource usage. You can also adjust the parallel
parameter to control the number of parallel processes.
Hybrid Search Configuration: Make sure that enable_hybrid=True
is correctly set, which you have done. This ensures both dense and sparse vectors are used.
Error Handling: Since there are no errors, it might be useful to add logging to track the progress and identify where the process might be failing silently.
Resource Limits: Check the resource limits of your container. You might need to increase the allocated memory or CPU resources.
OpenAI Embedding: The embed_batch_size
is set to 5, which is reasonable, but you might want to experiment with this value to see if it affects performance.
Qdrant Configuration: Ensure that the Qdrant server is configured to handle the load you're putting on it. This might involve tuning Qdrant's internal settings or scaling the server resources.
If these suggestions don't resolve the issue, consider profiling the resource usage to pinpoint the bottleneck.
To continue talking to Dosu, mention @dosu.
Qdrant has a batch size parameter, feel free to set it
Hybrid search by default runs a sparse model locally, and if the batch size is large, it will use a lot of memory
The default is 64
QdrantVectorStore(..., batch_size=64)
you were righ reducing the batch size o 10 did the trick , but the time it is taking s too long any way i can optimize that? are there any algo which i can change in qdrant specifically for hybrid search
Question Validation
Question
When i try to ingest a singluar node using simple search everything works fine, but when i try to ingest the same node using hybrid search i.e dnse and sparse vector it causes my container's resources to sky rocket with it eventually crashing , Why is that ? also i tried sending the nodes in batches but that way docs are not being ingested in qdrant and suprisingly there are no errors that way either.
def run_sync_pipeline(nodes, pipeline): batch_size = 50 for batch in batch_nodes(nodes, batch_size): serialized_batch = [node.dict for node in batch] ingest_nodes.delay(nodes_batch=serialized_batch)