TCM-GPT: Efficient Pre-training of Large Language Models for Domain Adaptation in Traditional Chinese Medicine
作者: Guoxing Yang, Jianyu Shi, Zan Wang, Xiaohong Liu, Guangyu Wang
分类: cs.CL, cs.AI
发布日期: 2023-11-03
💡 一句话要点
提出TCM-GPT以解决中医领域大语言模型适应性不足问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 传统中医 大语言模型 领域适应 LoRA技术 自然语言处理 模型训练 TCM-Corpus-1B TCM-GPT-7B
📋 核心要点
- 现有的大语言模型在特定领域应用时常因缺乏领域知识和计算效率低下而表现不佳。
- 本文提出TCMDA方法,通过构建TCM特定语料库并利用LoRA技术高效训练模型,提升模型在中医任务中的表现。
- TCM-GPT-7B在TCM检查和诊断任务中表现优异,相较于其他模型准确率分别提升17%和12%。
📝 摘要(中文)
预训练和微调已成为自然语言处理(NLP)任务中的一种有效范式。尽管大语言模型(LLM)在医学领域,尤其是传统中医(TCM)中展现出潜力,但将通用模型应用于特定领域时常面临知识缺乏和计算效率低下等挑战。为此,本文提出了一种新的领域特定TCM领域适应方法(TCMDA),通过构建大规模的TCM特定语料库TCM-Corpus-1B,并利用LoRA技术高效训练模型的特定层,最终实现了TCM-GPT-7B模型在TCM相关任务中的最佳表现。该研究为大语言模型在中医领域的适应性验证提供了开创性贡献。
🔬 方法详解
问题定义:本文旨在解决大语言模型在传统中医领域应用时的适应性不足问题,现有方法在特定领域的效果往往不理想,主要由于缺乏领域知识和计算效率低下。
核心思路:提出TCM领域适应方法(TCMDA),通过构建大规模的TCM特定语料库TCM-Corpus-1B,并结合LoRA技术,冻结预训练模型的权重,仅对特定的密集层进行高效训练,从而提升模型在中医任务中的表现。
技术框架:整体架构包括构建TCM特定语料库、应用LoRA技术进行模型训练和微调,以及在TCM检查和诊断任务上进行评估。主要模块包括数据预处理、模型训练和性能评估。
关键创新:本研究的主要创新在于首次在传统中医领域验证了具有70亿参数的大语言模型的领域适应性,利用LoRA技术实现了高效的模型训练。
关键设计:在模型训练中,采用了特定的损失函数和参数设置,以确保模型能够有效对齐TCM相关任务,具体细节包括冻结预训练权重和使用秩分解矩阵来优化训练过程。
🖼️ 关键图片
📊 实验亮点
在TCM检查和诊断任务中,TCM-GPT-7B模型的表现显著优于其他基线模型,准确率分别提升了17%和12%。这些结果表明,本文提出的方法在中医领域的应用具有显著的效果和潜力。
🎯 应用场景
该研究的潜在应用领域包括传统中医的智能问诊、诊断支持系统以及中医文献的自动化处理等。通过提升大语言模型在中医领域的适应性,能够促进中医与现代技术的结合,推动相关研究和应用的发展。
📄 摘要(原文)
Pre-training and fine-tuning have emerged as a promising paradigm across various natural language processing (NLP) tasks. The effectiveness of pretrained large language models (LLM) has witnessed further enhancement, holding potential for applications in the field of medicine, particularly in the context of Traditional Chinese Medicine (TCM). However, the application of these general models to specific domains often yields suboptimal results, primarily due to challenges like lack of domain knowledge, unique objectives, and computational efficiency. Furthermore, their effectiveness in specialized domains, such as Traditional Chinese Medicine, requires comprehensive evaluation. To address the above issues, we propose a novel domain specific TCMDA (TCM Domain Adaptation) approach, efficient pre-training with domain-specific corpus. Specifically, we first construct a large TCM-specific corpus, TCM-Corpus-1B, by identifying domain keywords and retreving from general corpus. Then, our TCMDA leverages the LoRA which freezes the pretrained model's weights and uses rank decomposition matrices to efficiently train specific dense layers for pre-training and fine-tuning, efficiently aligning the model with TCM-related tasks, namely TCM-GPT-7B. We further conducted extensive experiments on two TCM tasks, including TCM examination and TCM diagnosis. TCM-GPT-7B archived the best performance across both datasets, outperforming other models by relative increments of 17% and 12% in accuracy, respectively. To the best of our knowledge, our study represents the pioneering validation of domain adaptation of a large language model with 7 billion parameters in TCM domain. We will release both TCMCorpus-1B and TCM-GPT-7B model once accepted to facilitate interdisciplinary development in TCM and NLP, serving as the foundation for further study.