journal article·2026-06-17Open access

Med-LLaMA3: Advancing Medical Question-Answering Through Parameter-Efficient Fine-Tuning of Large Language Models

Mohamed Ahmed Abo El-Enen, Sally S. Ismail, Taymoor Mohamed Nazmy

Applied Sciences· Volume 16· Issue 12

Abstract

Despite recent advances, medical question answering systems still struggle with domain-specific reasoning and data efficiency. This paper presents Med-LLaMA3, a family of medical large language models developed by parameter-efficient fine-tuning of the LLaMA-3.1 (8 billion) and LLaMA-3.2 (1 and 3 billion) architectures using quantized low-rank adaptation (QLoRA) and low-rank adaptation (LoRA) with 4-bit quantization. Beyond model training, this work contributes the following: (1) a formalized dataset curation taxonomy (source type × clinical granularity × task format) with a source-category ablation confirming that the multi-source combination drives benchmark gains beyond any single category; (2) a systematic characterization of low-rank-adaptation rank-scaling behavior for the LLaMA-3 family in the medical domain (monotonic improvement up to rank 128, with no observed plateau); and (3) statistically validated comparisons using McNemar’s test and 95% bootstrap confidence intervals. We curated a medical instruction dataset of over 1.5 million samples spanning medical examinations, clinical dialogues, and biomedical literature. Our approach trains only ∼4% of the base model’s parameters and, consistent with prior studies of parameter-efficient methods in the medical domain, achieves performance comparable to full fine-tuning at a fraction of the memory footprint. Evaluated with five in-context examples per prompt, the 8-billion-parameter model attains a mean accuracy of 75.71% across the eight medical-domain subsets of the Massive Multitask Language Understanding benchmark; improvements over the unmodified LLaMA-3.1-8B-Instruct baseline are statistically significant on the medical multiple-choice benchmark MedMCQA and, after Bonferroni correction across the eight subsets, on three subsets (Clinical Knowledge, Medical Genetics, and Nutrition), with two further subsets being significant only before correction. A structured named-entity-recognition evaluation on 100 hospital discharge summaries (macro-averaged F1 0.94; dual-annotator agreement κ=0.87) provides complementary evidence of clinical-text utility. A safety mitigation pilot shows that context-disambiguation preprocessing reduces the highest-severity abbreviation-ambiguity error rate from 30% to 10% on a 30-case held-out set. These results show that parameter-efficient fine-tuning can deliver high-performance medical large language models while training only ∼4% of the model’s parameters and reducing memory use by roughly 75%, enabling development on low-cost consumer-grade hardware.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Topic Modeling · Machine Learning in Healthcare · Artificial Intelligence in Healthcare and Education

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt

References (53)

Show source-provided references
1. Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (2020). Language Models are Few-Shot Learners. Proceedings of the Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6–12, 2020, Virtual, Curran Associates, Inc.
2. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., and Azhar, F. (2023). Llama: Open and efficient foundation language models. arXiv.
3. OpenAI (2023). GPT-4 technical report. arXiv.
4. Large language models in medicine10.1038/s41591-023-02448-8 ↗
5. Toward expert-level medical question answering with a large language model10.1038/s41591-024-03423-7 ↗
6. Toma, A., Lawler, P.R., Ba, J., Krishnan, R.G., Rubin, B.B., and Wang, B. (2023). Clinical camel: An open-source expert-level medical language model. arXiv.
7. Christophe, C., Kanithi, P.K., Raha, T., Khan, S., and Pimentel, M.A.F. (2024). Med42-v2: A suite of clinical LLMs. arXiv.
8. Labrak, Y., Bazoge, A., Morin, E., Gourraud, P.-A., Rouvier, M., and Dufour, R. (2024). BioMistral: A collection of open-source pretrained large language models for medical domains. arXiv.10.18653/v1/2024.findings-acl.348 ↗
9. Google DeepMind (2026, June 01). MedGemma: Medical Large Language Models. Available online: https://huggingface.co/google/medgemma-4b-it.
10. Large language models encode clinical knowledge10.1038/s41586-023-06291-2 ↗
11. Hu, E.J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., and Chen, W. (2022, January 25–29). LoRA: Low-rank adaptation of large language models. Proceedings of the International Conference on Learning Representations, Virtual Event.
12. QLoRA: Efficient finetuning of quantized LLMs10.52202/075280-0441 ↗
13. USMLE (2026, June 01). United States Medical Licensing Examination. Available online: https://www.usmle.org.
14. Nori, H., King, N., McKinney, S.M., Carignan, D., and Horvitz, E. (2023). Capabilities of GPT-4 on medical challenge problems. arXiv.
15. How does ChatGPT perform on the USMLE?10.2196/45312 ↗
16. OpenAI (2026, June 01). ChatGPT: Optimizing Language Models for Dialogue. Available online: https://openai.com/blog/chatgpt.
17. BioBERT: A pre-trained biomedical language representation model10.1093/bioinformatics/btz682 ↗
18. Alsentzer, E., Murphy, J., Boag, W., Weng, W.H., Jindi, D., Naumann, T., and McDermott, M. (2019, January 7). Publicly Available Clinical BERT Embeddings. Proceedings of the 2nd Clinical Natural Language Processing Workshop, Minneapolis, MN, USA.10.18653/v1/W19-1909 ↗
19. A large language model for electronic health records10.1038/s41746-022-00742-2 ↗
20. Chen, Z., Cano, A.H., Romanou, A., Bonnet, A., Matoba, K., Salvi, F., Pagliardini, M., Fan, S., Köpf, A., and Mohtashami, A. (2023). MEDITRON-70B: Scaling medical pretraining for large language models. arXiv.
21. Wu, S., Irsoy, O., Lu, S., Dabravolski, V., Dredze, M., Gehrmann, S., Kambadur, P., Rosenberg, D., and Mann, G. (2023). Bloomberggpt: A large language model for finance. arXiv.
22. Taylor, R., Kardas, M., Cucurull, G., Scialom, T., Hartshorn, A., Saravia, E., Poulton, A., Kerkez, V., and Stojnic, R. (2022). Galactica: A large language model for science. arXiv.
23. Zhou, Z., Shi, J.X., Song, P.X., Yang, X.W., Jin, Y.X., Guo, L.Z., and Li, Y.F. (2024). Lawgpt: A chinese legal knowledge-enhanced large language model. arXiv.
24. Cui, J., Li, Z., Yan, Y., Chen, B., and Yuan, L. (2023). Chatlaw: Open-source legal large language model with integrated external knowledge bases. arXiv.
25. Yang, H., Liu, X.Y., and Wang, C.D. (2023). Fingpt: Open-source financial large language models. arXiv.10.2139/ssrn.4489826 ↗
26. A survey on retrieval-augmentation generation (RAG) models for healthcare applications10.1007/s00521-025-11666-9 ↗
27. Jin, D., Pan, E., Oufattole, N., Weng, W.-H., Fang, H., and Szolovits, P. (2021). What Disease Does This Patient Have? A Large-Scale Open Domain Question Answering Dataset from Medical Exams. Appl. Sci., 11.10.20944/preprints202105.0498.v1 ↗
28. Pal, A., Umapathi, L.K., and Sankarasubbu, M. (2022, January 7–8). MedMCQA: A large-scale multi-subject multi-choice dataset. Proceedings of the Conference on Health, Inference, and Learning, Virtual.
29. Jin, Q., Dhingra, B., Liu, Z., Cohen, W., and Lu, X. (2019, January 3–7). PubMedQA: A Dataset for Biomedical Research Question Answering. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China.10.18653/v1/D19-1259 ↗
30. Wang, L.L., Lo, K., Chandrasekhar, Y., Reas, R., Yang, J., Burdick, D., Eide, D., Funk, K., Katsis, Y., and Kinney, R.M. (2020, January 5–10). CORD-19: The COVID-19 Open Research Dataset. Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020, Online.
31. He, K., Mao, R., Lin, Q., Ruan, Y., Lan, X., Feng, M., and Cambria, E. (2023). A survey on large language models for healthcare. arXiv.
32. Dissecting racial bias in an algorithm used to manage the health of populations10.1126/science.aax2342 ↗
33. Abo El-Enen, M., Saad, S., and Nazmy, T. (2025). DistilLLM-Med: A Lightweight Medical Language Model through Knowledge Distillation. Proceedings of the 2025 IEEE Twelfth International Conference on Intelligent Computing and Information Systems (ICICIS), IEEE.10.1109/ICICIS66182.2025.11313220 ↗
34. Han, T., Adams, L.C., Papaioannou, J.M., Grundmann, P., Oberhauser, T., Figueroa, A., Löser, A., Truhn, D., and Bressem, K.K. (2023). MedAlpaca: An open-source collection of medical conversational AI models. arXiv.
35. Hendrycks, D., Burns, C., Basart, S., Zou, A., Mazeika, M., Song, D., and Steinhardt, J. (2021, January 4). Measuring massive multitask language understanding. Proceedings of the International Conference on Learning Representations, Vienna, Austria.
36. Möller, T., Reina, A., Jayakumar, R., and Pietsch, M. (2020, January 5–10). COVID-QA: A Question Answering Dataset for COVID-19. Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020, Online.
37. Ben Abacha, A., and Demner-Fushman, D. (2019). A question-entailment approach to question answering. BMC Bioinform., 20.10.1186/s12859-019-3119-4 ↗
38. Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., and Bhosale, S. (2023). Llama 2: Open foundation and fine-tuned chat models. arXiv.
39. Shazeer, N. (2020). GLU Variants Improve Transformer. arXiv.
40. Chen, T., Xu, B., Zhang, C., and Guestrin, C. (2016). Training Deep Nets with Sublinear Memory Cost. arXiv.
41. Rajbhandari, S., Rasley, J., Ruwase, O., and He, Y. (2020, January 9–19). ZeRO: Memory optimizations toward training trillion parameter models. Proceedings of the SC, Atlanta, Georgia.10.1109/SC41405.2020.00024 ↗
42. FlashAttention: Fast and memory-efficient exact attention10.52202/068431-1189 ↗
43. Biderman, S., Schoelkopf, H., Sutawika, L., Gao, L., Tow, J., Abbasi, B., Aji, A.F., Ammanamanchi, P.S., Black, S., and Clive, J. (2024). Lessons from the trenches on reproducible evaluation of language models. arXiv.
44. DeepSeek-AI, Guo, D., Yang, D., Zhang, H., Song, J., Wang, P., Zhu, Q., Xu, R., Zhang, R., and Ma, S. (2025). DeepSeek-R1: Incentivizing reasoning capability in LLMs. arXiv.
45. Gemma Team (2024). Gemma: Open models based on Gemini research and technology. arXiv.
46. Jiang, A.Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D.S., Casas, D.D.l., Bressand, F., Lengyel, G., Lample, G., and Saulnier, L. (2023). Mistral 7B. arXiv.
47. Wang, X., Chen, N., Chen, J., Wang, Y., Zhen, G., Zhang, C., Wu, X., Hu, Y., Gao, A., and Wan, X. (2024). Apollo: A lightweight multilingual medical LLM. arXiv.
48. Zhang, X., Tian, C., Yang, X., Chen, L., Li, Z., and Petzold, L.R. (2023). AlpaCare: Instruction-tuned large language models for medical application. arXiv.
49. Wang, G., Yang, G., Du, Z., Fan, L., and Li, X. (2023). ClinicalGPT: Large language models finetuned with diverse medical data. arXiv.
50. The measurement of observer agreement for categorical data10.2307/2529310 ↗
51. MIMIC-III, a freely accessible critical care database10.1038/sdata.2016.35 ↗
52. A multi-criteria decision-making approach for prioritizing factors influencing healthcare workers’ safety performance: A case of a women’s hospital
53. Integrating knowledge management and large language models to advance construction Job Hazard Analysis: A systematic review and conceptual framework