Summary
In this chapter, we explored how we can leverage the potential of Generative AI, using LLMs from Kaggle Models. We started by focusing on the simplest way to use such Foundation Models – by directly prompting them. We learned that crafting a prompt is important and experimented with simple math questions. We used the models that were available in Kaggle Models as well as quantized ones and quantized models with two approaches: using Llama.cpp
and the bitsandbytes
library. We then combined Langchain with a LLM to create sequences of chained tasks, where the output of one task is used to craft (by the framework) the input (or prompt) for the next task. Using the Code Llama 2 model, we tested the feasibility of code generation on Kaggle. The results were less than perfect, with multiple sequences generated besides the expected one. Finally, we learned how to create a RAG system that combines the speed, versatility, and ease of using vector databases with the chaining functions...