Mix-CPT:一种通过解耦知识学习与格式对齐的领域自适应框架
Mix-CPT: A Domain Adaptation Framework via Decoupling Knowledge Learning and Format Alignment
AI总结:
针对大语言模型领域适配中知识记忆效率低、需同时学习知识利用与格式对齐的难题,提出解耦二者的Mix-CPT框架,结合知识混合预训练与自蒸馏约束,用少量样本实现格式对齐,同时提升目标与通用领域性能。
摘要:
通用大语言模型(LLM)适配特定领域时,因数据分布差异面临巨大挑战。这类适配通常需要先在大规模领域语料上进行持续预训练以实现知识记忆,随后开展训练,让模型遵循人类指令与偏好运用这些知识。但该方法由于对知识利用的认知不足,可能导致知识记忆效率低下,同时要求大语言模型在有限训练样本下同时学习知识利用与格式对齐,带来了极高的训练要求。为推动大语言模型的领域自适应,我们调整了这一流程,提出一种包含领域知识学习与通用格式对齐的新型领域自适应框架Mix-CPT。具体而言,我们首先开展知识混合持续预训练,同时聚焦知识记忆与利用,实现二者的相互强化。为避免持续预训练过程中的灾难性遗忘,我们进一步引入了logit交换自蒸馏约束。随后,依托持续预训练阶段习得的知识与能力,我们仅用少量通用训练样本就能高效完成指令微调与对齐,实现格式对齐。大量实验表明,与传统自适应方法相比,本文提出的Mix-CPT框架能够同时提升大语言模型在目标领域和通用领域的任务求解能力。
英文摘要:
Adapting general large language models (LLMs) to specialized domains presents great challenges due to varied data distributions. This adaptation typically requires continual pre-training on massive domain-specific corpora to facilitate knowledge memorization, followed by training to apply this knowledge following human instructions and preferences. However, this method may result in inefficient knowledge memorization due to a lack of awareness of knowledge utilization and imposes substantial demands on LLMs to simultaneously learn knowledge utilization and format alignment with limited training samples. To facilitate the domain adaptation of LLM, we revise this process and propose a new domain adaptation framework including domain knowledge learning and general format alignment, called Mix-CPT. Specifically, we first conduct a knowledge mixture continual pre-training that concurrently focuses on knowledge memorization and utilization, allowing for mutual reinforcement. To avoid catastrophic forgetting during the continual pre-training process, we further incorporate a logit swap self-distillation constraint. Subsequently, leveraging the knowledge and capabilities acquired during continual pre-training, we efficiently perform instruction tuning and alignment with a few general training samples to achieve format alignment. Extensive experiments demonstrate that our proposed Mix-CPT framework can simultaneously improve the task-solving capabilities of LLMs on the target and general domains compared to the traditional adaptation methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。