A challenge from AI Planet's LLM bootcamp to (i) fine-tune pre-trained HuggingFace transformer model to build a Code Generation language model, and (ii) build a retrieval-augmented generation (RAG) application using LangChain
Part I: Fine-tuning Orca Mini 3B on evolved codealpaca dataset to build a Code Generation model
Fine-tuning Orca Mini 3B with the evolved codealpaca dataset equips Orca Mini the ability to perform better on code generation tasks.
When we asked Orca Mini to provide us codes for scikit-learn linear regression before fine-tuning was done, it requested for more information to be provided.
After fine-tuning, the model is able to return a more targeted code generation completion output shown below.
Part II: Building a Question & Answering Retrieval-Augmented Generation (RAG) application using LangChain
A simple RAG to answer questions on the Battle Line game rules (PDF) using LangChain. We used the INSTRUCTOR embeddings model (ranked highly on the Massive Text Embeddings Benchmark, MTEB leaderboard) for performing semantic retrieval and a quantized version of the impressive Mistral 7B for returning the completion output.
Examples of the RAG output:
Open AI_Planet_LLM_Bootcamp_Challenge.ipynb
on a jupyter notebook environment. Alternatively, you can view the codes in . The notebook consists of further technical details.
Open AI_Planet_Bootcamp_Final_Assignment_Fine_tuning_Phi_1_5b.ipynb
on a jupyter notebook environment. The notebook consists of further technical details.