arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.19299cs.CLeess.SP
收藏

计算与数据约束下 LoRA 适配器对 LLM 临床文本分类的影响

The Impact of LoRA Adapters on LLMs for Clinical Text Classification Under Computational and Data Constraints

Biomedical Information Processing Lab, \' E cole de Technologie Sup\' e rieure, Montr\' e al, Qu\' e bec, Canada;The Interdisciplinary Centre for Security, Reliability;Trust (SnT), University of Luxembourg, Luxembourg;CHU Sainte-Justine Research Center, CHU Sainte-Justine Hospital, University of Montreal, Montr\' e al, Qu\' e bec, Canada

Thanh-Dung Le, Ti Ti Nguyen, Vu Nguyen Ha, Symeon Chatzinotas, Philippe Jouvet, Rita Noumeir

AI总结:

本文在低数据、2GB GPU 约束下比较临床文本分类中的 LoRA 类适配器,发现轻量级从头训练 Transformer 优于适配器增强生物医学 LLM,GRN 表现最佳。

摘要:

由于领域差距、数据有限和严格的硬件约束,微调大型语言模型(LLM)用于临床自然语言处理(NLP)面临重大挑战。本研究在真实、资源受限条件下评估四种等价于低秩适应(LoRA)的适配器技术——Adapter、Lightweight、TinyAttention 和门控残差网络(GRN)——用于临床笔记分类。所有实验均在单块 NVIDIA Quadro P620 GPU(2 GB VRAM、512 个 CUDA 核心、1.386 TFLOPS FP32)上进行,这将批量大小限制为少于 8 个序列,最大序列长度限制为 256 个 token。我们的临床语料库仅包含 580000 个 token,比标准 LLM 预训练数据集小数个数量级。我们微调了三个生物医学预训练 LLM(CamemBERT-bio、AliBERT、DrBERT)以及两个从头训练的轻量级 Transformer 模型。结果表明:1)在这些约束下微调生物医学 LLM 时,适配器结构并未带来一致收益;2)参数量极少且训练时间低于 6 小时的更简单 Transformer,优于需要超过 1000 GPU 小时的适配器增强 LLM。在各适配器中,GRN 取得最佳指标(准确率、精确率、召回率、F1=0.88)。这些发现证明,在数据和计算有限的低资源临床场景中,从头训练的轻量级 Transformer 比大型 LLM 提供更实用、高效的解决方案;而当需要最小化适应时,GRN 仍是可行的适配器选择。

英文摘要:

Fine-tuning Large Language Models (LLMs) for clinical Natural Language Processing (NLP) poses significant challenges due to domain gap, limited data, and stringent hardware constraints. In this study, we evaluate four adapter techniques-Adapter, Lightweight, TinyAttention, and Gated Residual Network (GRN) - equivalent to Low-Rank Adaptation (LoRA), for clinical note classification under real-world, resource-constrained conditions. All experiments were conducted on a single NVIDIA Quadro P620 GPU (2 GB VRAM, 512 CUDA cores, 1.386 TFLOPS FP32), limiting batch sizes to <8 sequences and maximum sequence length to 256 tokens. Our clinical corpus comprises only 580 000 tokens, several orders of magnitude smaller than standard LLM pre-training datasets. We fine-tuned three biomedical pre-trained LLMs (CamemBERT-bio, AliBERT, DrBERT) and two lightweight Transformer models trained from scratch. Results show that 1) adapter structures provide no consistent gains when fine-tuning biomedical LLMs under these constraints, and 2) simpler Transformers, with minimal parameter counts and training times under six hours, outperform adapter-augmented LLMs, which required over 1000 GPU-hours. Among adapters, GRN achieved the best metrics (accuracy, precision, recall, F1 = 0.88). These findings demonstrate that, in low-resource clinical settings with limited data and compute, lightweight Transformers trained from scratch offer a more practical and efficient solution than large LLMs, while GRN remains a viable adapter choice when minimal adaptation is needed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑