PMC-LLaMA: toward building open-source language models for medicine
- PMID: 38613821
- PMCID: PMC11639126
- DOI: 10.1093/jamia/ocae045
PMC-LLaMA: toward building open-source language models for medicine
Abstract
Objective: Recently, large language models (LLMs) have showcased remarkable capabilities in natural language understanding. While demonstrating proficiency in everyday conversations and question-answering (QA) situations, these models frequently struggle in domains that require precision, such as medical applications, due to their lack of domain-specific knowledge. In this article, we describe the procedure for building a powerful, open-source language model specifically designed for medicine applications, termed as PMC-LLaMA.
Materials and methods: We adapt a general-purpose LLM toward the medical domain, involving data-centric knowledge injection through the integration of 4.8M biomedical academic papers and 30K medical textbooks, as well as comprehensive domain-specific instruction fine-tuning, encompassing medical QA, rationale for reasoning, and conversational dialogues with 202M tokens.
Results: While evaluating various public medical QA benchmarks and manual rating, our lightweight PMC-LLaMA, which consists of only 13B parameters, exhibits superior performance, even surpassing ChatGPT. All models, codes, and datasets for instruction tuning will be released to the research community.
Discussion: Our contributions are 3-fold: (1) we build up an open-source LLM toward the medical domain. We believe the proposed PMC-LLaMA model can promote further development of foundation models in medicine, serving as a medical trainable basic generative language backbone; (2) we conduct thorough ablation studies to demonstrate the effectiveness of each proposed component, demonstrating how different training data and model scales affect medical LLMs; (3) we contribute a large-scale, comprehensive dataset for instruction tuning.
Conclusion: In this article, we systematically investigate the process of building up an open-source medical-specific LLM, PMC-LLaMA.
Keywords: ChatGPT; biomedical NLP; generative language models; large language models.
© The Author(s) 2024. Published by Oxford University Press on behalf of the American Medical Informatics Association. All rights reserved. For permissions, please email: journals.permissions@oup.com.
Conflict of interest statement
None declared.
Figures




Similar articles
-
Me-LLaMA: Medical Foundation Large Language Models for Comprehensive Text Analysis and Beyond.Res Sq [Preprint]. 2024 Dec 18:rs.3.rs-5456223. doi: 10.21203/rs.3.rs-5456223/v1. Res Sq. 2024. Update in: NPJ Digit Med. 2025 Mar 5;8(1):141. doi: 10.1038/s41746-025-01533-1. PMID: 39764122 Free PMC article. Updated. Preprint.
-
MedChatZH: A tuning LLM for traditional Chinese medicine consultations.Comput Biol Med. 2024 Apr;172:108290. doi: 10.1016/j.compbiomed.2024.108290. Epub 2024 Mar 13. Comput Biol Med. 2024. PMID: 38503097
-
Towards building multilingual language model for medicine.Nat Commun. 2024 Sep 27;15(1):8384. doi: 10.1038/s41467-024-52417-z. Nat Commun. 2024. PMID: 39333468 Free PMC article.
-
Use of SNOMED CT in Large Language Models: Scoping Review.JMIR Med Inform. 2024 Oct 7;12:e62924. doi: 10.2196/62924. JMIR Med Inform. 2024. PMID: 39374057 Free PMC article.
-
Prompt Engineering Paradigms for Medical Applications: Scoping Review.J Med Internet Res. 2024 Sep 10;26:e60501. doi: 10.2196/60501. J Med Internet Res. 2024. PMID: 39255030 Free PMC article.
Cited by
-
Demystifying Large Language Models for Medicine: A Primer.ArXiv [Preprint]. 2024 Nov 20:arXiv:2410.18856v3. ArXiv. 2024. PMID: 39801619 Free PMC article. Preprint.
-
EYE-Llama, an in-domain large language model for ophthalmology.bioRxiv [Preprint]. 2025 May 22:2024.04.26.591355. doi: 10.1101/2024.04.26.591355. bioRxiv. 2025. PMID: 38746183 Free PMC article. Updated. Preprint.
-
Introduction to Large Language Models (LLMs) for dementia care and research.Front Dement. 2024 May 14;3:1385303. doi: 10.3389/frdem.2024.1385303. eCollection 2024. Front Dement. 2024. PMID: 39081594 Free PMC article.
-
A review of large language models and autonomous agents in chemistry.Chem Sci. 2024 Dec 9;16(6):2514-2572. doi: 10.1039/d4sc03921a. eCollection 2025 Feb 5. Chem Sci. 2024. PMID: 39829984 Free PMC article. Review.
-
Generative Large Language Model-Powered Conversational AI App for Personalized Risk Assessment: Case Study in COVID-19.JMIR AI. 2025 Mar 27;4:e67363. doi: 10.2196/67363. JMIR AI. 2025. PMID: 40146990 Free PMC article.
References
-
- OpenAI. OpenAI. Introducing ChatGPT. OpenAI; 2023. Accessed April 2, 2024. https://openai.com/blog/chatgpt/
-
- OpenAI. GPT-4 technical report. arXiv:2303.08774. 2023, preprint: not peer reviewed.
-
- Nori H, King N, et al. Capabilities of GPT-4 on medical challenge problems. arXiv 230313375. 2023, preprint: not peer reviewed.
-
- Touvron H, Lavril T, Izacard G, Martinet , et al. LLaMA: open and efficient foundation language models. arXiv 230213971. 2023, preprint: not peer reviewed.
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources