Distributing RAG with Ray
Summary
The article combines retrieval-augmented generation with Ray to scale index search and generation across several processes and devices. Knowledge retrieval thus becomes an independent, distributed part of inference. RAG combines a retriever with a generative sequence model.
Ideas
- Retrieval separates changing knowledge from the unchanging model parameters.
- Distributed execution is only worthwhile if communication does not eat up the computing gain.
Insights
- Distribution creates capacity but increases communication costs and the number of possible failure states.
Facts
- Ray actors encapsulate model and index components as distributed services.
Critique
- More infrastructure cannot make up for poor document selection with additional computing power.
Recommendations
- Test retrieval quality separately from generator quality and watch both shares of latency.
References
Read the original article on Hugging Face
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.