Development of computationally feasible hospital-specific large language models using parameter-efficient and preference alignment techniques
摘要
The healthcare industry is rapidly eyeing data-driven and AI-enabled patient care owing to the promising advancements showcased by large language models (LLMs). However, strict privacy regulations pertaining to data security hamper its deployment in the existing infrastructure. Moreover, LLMs require extensive graphical processing unit (GPU) memory for training and inference, which most hospitals lack. Therefore, developing memory-efficient in-house LLMs is imperative if we wish to achieve wider deployment within the confines of a secure network. To address this, our study proposes a framework for building a memory-efficient medical chatbot capable of answering queries by clinicians related to eight distinct tasks: 1] Named Entity Recognition, 2] Question & Answering, 3] Paraphrasing, 4] Summarization, 5] Abbreviation Expansion, 6] Coreference Resolution, 7] Relation Extraction and 8] Temporal Information Extraction. We have evaluated the efficacy of state-of-the-art LLMs, 1] Llama-3.1-8B, 2] Mistral-2-7B, 3] Llama-2-13B, and 4] DeepSeek-R1-Distill-Llama-3.1-8B on their ability to reason and extract information when fine-tuned with the parameter-efficient quantized lower rank adaptation (QLoRA) technique. Furthermore, we have assessed two preference alignment techniques, 1] Direct Preference Optimization and 2] Odds ratio preference optimization (ORPO), to align the responses according to the clinician’s preference. The Llama-3.1-8B model, fine-tuned using QLoRA and ORPO techniques, not only outperforms its pre-trained counterpart by 39% and 18% on average across all tasks (as measured by Bilingual Evaluation Understudy and Recall Oriented Understudy for Gisting Evaluation) metrics, respectively, but also surpasses all other evaluated LLMs on the same benchmarks. An independent qualitative analysis by two clinicians also corroborates its utility in clinical decision making for most tasks. The proposed framework supports low-cost deployment by requiring only 6 GB of GPU Video Random Access Memory, making it feasible to run on consumer-grade hospital servers or workstations without expensive hardware upgrades.