Home » People & Blogs » LangChain + Ray Tutorial: How to Generate Embeddings For 33,000 Pages in Under 4 Minutes

LangChain + Ray Tutorial: How to Generate Embeddings For 33,000 Pages in Under 4 Minutes

Written By Anyscale on Tuesday, May 02, 2023 | 01:13 PM

 
This tutorial guides you through how to generate embeddings for thousands of PDFs to feed into an LLM. LangChain makes this easy to get started, and Ray scales your workload out across a cluster. By using Ray Data, a distributed data processing system, you'll be able to generate and store embeddings for 2,000 PDF documents from cloud storage, parallelize across 20 GPUs, all in under 4 minutes and less than 100 lines of code! Learn More --- Blog Post: https://www.anyscale.com/blog/turbocharge-langchain-now-guide-to-20x-faster-embedding Code: https://github.com/ray-project/langchain-ray/blob/main/embedding_pdf_documents/arxiv_dataset_generation.py LangChain Docs: https://python.langchain.com/en/latest/index.html Ray Docs: https://docs.ray.io/en/latest/ Ray Overview: https://www.ray.io/ Join the Community! --- Twitter: https://twitter.com/raydistributed Slack: https://docs.google.com/forms/d/e/1FAIpQLSfAcoiLCHOguOm8e7Jnn-JJdZaCxPGjgVCvFijHB5PLaQLeig/viewform Discuss Forum: https://discuss.ray.io/ Managed Ray --- If you're interested in a managed Ray service, check out: https://www.anyscale.com/signup #llm #machinelearning #langchain #ray #gpt #chatgpt