Large Language Models (LLMs) have shown remarkable capabilities in natural language understanding across various domains. However, in areas that require precision, such as medical applications, these models often exhibit unsatisfactory performance due to a lack of domain-specific knowledge. In this report, the authors introduce PMC-LLaMA, an open-source language model that is fine-tuned on 4.8 million biomedical academic papers to inject medical knowledge and enhance its capability in the medical domain. The authors conduct a preliminary investigation by fine-tuning the existing LLaMA model with the aforementioned dataset and demonstrate that PMC-LLaMA is more suitable for medical tasks compared to LLaMA. The evaluation is conducted on three biomedical QA datasets: PubMedQA, MedMCQA, and USMLE. The results show that after fine-tuning, PMC-LLaMA demonstrates better understanding of biomedical domain-specific concepts and achieves high performance on QA benchmarks. In terms of experiment details, the authors outline their fine-tuning procedure using S2ORC datasets with 81.1M English-language academic papers filtered with PubMed Central (PMC)-id resulting in around 4.9M highly related papers totaling over 75B tokens. They fine-tune the LLaMA-7B model on these open-accessed PMC papers using an autoregressive generation objective introduced in GPT2 with specific training details such as max context length set at 512, batch size at 128, AdamW optimizer with learning rate 2e-5 and Fully Sharded Data Parallel (FSDP) acceleration strategy and bf16 (Brain Floating Point) data format. The model is trained for five epochs with eight A100 GPUs in around seven days, and in each epoch they randomly sample 512 continuous tokens per paper for training. The authors also provide a detailed description of the evaluation benchmark which includes three QA datasets: PubMedQA, MedMCQA and UMLSE. PubMedQA contains questions on biomedical research where the model is provided with paper abstracts from PubMed and required to complete multiple choice questions while MedMCQA is a dataset of multiple choice questions sourced from mock exams and past exams of two Indian medical school entrance exams called AIIMS and NEET PG each question having four choices . Overall , PMC - LLaMA offers an open - source language model that enhances LLaMA's capability in the medical domain by injecting domain - specific knowledge through fine - tuning on biomedical academic papers . The model and codes are publicly available along with an online demo for further exploration .
- Large Language Models (LLMs) have shown remarkable capabilities in natural language understanding across various domains
- In areas that require precision, such as medical applications, these models often exhibit unsatisfactory performance due to a lack of domain-specific knowledge
- PMC-LLaMA is an open-source language model that is fine-tuned on 4.8 million biomedical academic papers to inject medical knowledge and enhance its capability in the medical domain
- The authors conducted a preliminary investigation by fine-tuning the existing LLaMA model with the aforementioned dataset and demonstrated that PMC-LLaMA is more suitable for medical tasks compared to LLaMA
- The evaluation was conducted on three biomedical QA datasets: PubMedQA, MedMCQA, and USMLE, showing better understanding of biomedical domain-specific concepts and achieving high performance on QA benchmarks after fine-tuning
- The authors outline their fine-tuning procedure using S2ORC datasets with specific training details such as max context length set at 512, batch size at 128, AdamW optimizer with learning rate 2e-5 and Fully Sharded Data Parallel (FSDP) acceleration strategy and bf16 (Brain Floating Point) data format.
- The model is trained for five epochs with eight A100 GPUs in around seven days, and in each epoch they randomly sample 512 continuous tokens per paper for training.
- The authors also provide a detailed description of the evaluation benchmark which includes three QA datasets: PubMedQA, MedMCQA and UMLSE.
- Overall , PMC - LLaMA offers an open - source language model that enhances LLaMA's capability in the medical domain by injecting domain - specific knowledge through fine - tuning on biomedical academic papers .
- -The model and codes are publicly available along with an online demo for further exploration.
1. Large Language Models (LLMs) are computer programs that can understand human language in different areas.
2. In medical applications, LLMs sometimes don't work well because they lack knowledge specific to the medical field.
3. PMC-LLaMA is a new open-source language model that has been trained on millions of biomedical academic papers to improve its understanding of medical concepts.
4. The authors tested PMC-LLaMA and found that it performed better than the previous LLaMA model on medical tasks.
5. They used three datasets to test the model's performance and found that it had a better understanding of biomedical concepts.
Definitions- Language Model: A computer program that can understand human language and generate text based on patterns in language data.
- Fine-tuning: The process of adjusting a pre-trained language model for a specific task or domain by training it on additional data.
- Biomedical: Relating to biology and medicine, especially as applied to healthcare and disease treatment.
- Open-source: Software that is freely available for anyone to use, modify, and distribute without restrictions.
Introducing PMC-LLaMA: A Language Model for Medical Applications
In recent years, large language models (LLMs) have become increasingly popular in natural language understanding across various domains. However, when it comes to precision applications such as medical tasks, these models often fail to deliver satisfactory performance due to a lack of domain-specific knowledge. To address this issue, the authors of this research paper introduce PMC-LLaMA – an open source language model that is fine-tuned on 4.8 million biomedical academic papers to inject medical knowledge and enhance its capability in the medical domain.
Fine Tuning Procedure
The authors outline their fine tuning procedure using S2ORC datasets with 81.1M English-language academic papers filtered with PubMed Central (PMC)-id resulting in around 4.9M highly related papers totaling over 75B tokens. They fine tune the LLaMA-7B model on these open accessed PMC papers using an autoregressive generation objective introduced in GPT2 with specific training details such as max context length set at 512, batch size at 128, AdamW optimizer with learning rate 2e-5 and Fully Sharded Data Parallel (FSDP) acceleration strategy and bf16 (Brain Floating Point) data format. The model is trained for five epochs with eight A100 GPUs in around seven days, and in each epoch they randomly sample 512 continuous tokens per paper for training.
Evaluation Benchmark
The authors provide a detailed description of the evaluation benchmark which includes three QA datasets: PubMedQA, MedMCQA and UMLSE. PubMedQA contains questions on biomedical research where the model is provided with paper abstracts from PubMed and required to complete multiple choice questions while MedMCQA is a dataset of multiple choice questions sourced from mock exams and past exams of two Indian medical school entrance exams called AIIMS and NEET PG each question having four choices .
Results
The results show that after fine tuning , PMC - LLaMA demonstrates better understanding of biomedical domain - specific concepts and achieves high performance on QA benchmarks . This indicates that by injecting domain - specific knowledge through fine - tuning , PMC - LLaMa can be used effectively for medical tasks compared to LLama .
Conclusion
Overall , PMC - LLaMA offers an open - source language model that enhances LLaMA's capability in the medical domain by injecting domain - specific knowledge through fine - tuning on biomedical academic papers . The model and codes are publicly available along with an online demo for further exploration .