Leveraging LLM Embeddings as an Alternative to Fine-Tuning
Do not overlook embeddings as an alternative to fine-tuning a large language transformer model. Fine-tuning requires a reliable dataset, the right model configuration, and hardware resources. Creating high-quality datasets takes time and resources.
Leveraging the embedding abilities of a Large Language Model (LLM) such as OpenAI’s Ada will enable you to customize your model with reduced cost and effort. Your model will be able to access updated data in real time. You will be implementing Retrieval Augmented Generation (RAG) through embedded texts. We used web pages and customized text for RAG in Chapter 7, The Generative AI Revolution with ChatGPT. This time, we will go further and use embeddings.
This chapter begins by explaining why searching with embeddings can sometimes be a very effective alternative to fine-tuning. We will go through the advantages and limits of this approach.
Then, we will go through...