bk99.de entertain the web since 1997

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

Search the Web Archive