Mistral Instruct 7B Finetuning on MedMCQA Dataset
Finetuning Mistral Instruct 7B on Google Colab using QLoRA
MistralAI’s Mistral Instruct 7B is one of the most popular open-source Large Language Models (LLMs). It has achieved SOTA performance on many benchmarks as compared to its 7B counterparts. In this post, I’ll mention the steps required to build an LLM which can solve medical entrance exam questions. We’ll be finetuning Mistral Instruct 7B on the MedMCQA dataset and providing the comparison between the original baseline model and the finetuned model.
MedMCQA is a large-scale, Multiple-Choice Question Answering (MCQA) dataset designed to address real world medical entrance exam questions. It has more than 194k high-quality and diverse AIIMS & NEET PG entrance exam MCQs covering around 2.4k healthcare topics and 21 medical subjects. More information about the dataset is available here — medmcqa/medmcqa: A large-scale (194k), Multiple-Choice Question Answering (MCQA) dataset designed to address real world medical entrance exam questions. (github.com).
Due to GPU and memory constraints on Google Colab, we’ll use GPTQ (post-training quantized) version of Mistral Instruct 7B from HuggingFace. TheBloke has quantized Mistral Instruct 7B with GPTQ on the HuggingFace Hub. We will then use the parameter efficient LoRA…