[论文解读] SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domain
本文介绍了SaulLM-54B和SaulLM-141B,这两款专为法律领域设计的大规模语言模型(LLMs),采用三阶段领域适应流程:在超过5400亿个法律token上进行持续预训练,使用合成和真实法律数据进行指令微调,并通过人类偏好对齐。这些模型在LegalBench-Instruct基准上达到最先进性能,优于GPT-4、Llama3和Mixtral,并以MIT许可证发布,供开放研究使用。
In this paper, we introduce SaulLM-54B and SaulLM-141B, two large language models (LLMs) tailored for the legal sector. These models, which feature architectures of 54 billion and 141 billion parameters, respectively, are based on the Mixtral architecture. The development of SaulLM-54B and SaulLM-141B is guided by large-scale domain adaptation, divided into three strategies: (1) the exploitation of continued pretraining involving a base corpus that includes over 540 billion of legal tokens, (2) the implementation of a specialized legal instruction-following protocol, and (3) the alignment of model outputs with human preferences in legal interpretations. The integration of synthetically generated data in the second and third steps enhances the models' capabilities in interpreting and processing legal texts, effectively reaching state-of-the-art performance and outperforming previous open-source models on LegalBench-Instruct. This work explores the trade-offs involved in domain-specific adaptation at this scale, offering insights that may inform future studies on domain adaptation using strong decoder models. Building upon SaulLM-7B, this study refines the approach to produce an LLM better equipped for legal tasks. We are releasing base, instruct, and aligned versions on top of SaulLM-54B and SaulLM-141B under the MIT License to facilitate reuse and collaborative research.
研究动机与目标
- 探究模型规模和训练语料规模扩大对法律领域适应的影响。
- 解决先前法律LLM的局限性,这些局限性源于模型规模较小(≤120亿参数)和训练数据有限(≤300亿token)。
- 开发一种可扩展的开源管道,通过持续预训练、指令微调和偏好对齐,将大规模语言模型适配至法律领域。
- 以MIT许可证发布高质量、领域专业化LLM,以促进法律NLP领域的更广泛应用和研究。
提出的方法
- 这些模型基于Mixtral架构,分别采用540亿和1410亿参数的专家混合(MoE)设计。
- 使用超过5400亿个法律token的语料库进行持续预训练,显著扩展了领域内数据量,相较以往工作有大幅提升。
- 通过专门设计的法律指令遵循协议应用指令微调,整合了真实和合成生成的法律指令数据。
- 通过人类对法律解释的反馈执行偏好对齐,采用DPO或PPO等算法优化模型输出。
- 训练管道在高性能计算基础设施上执行,包括排名全球第三的Adastra(Green500榜单)和Jeanzay,能量消耗得到精确追踪。
- 模型以基础版、指令版和对齐版三种形式发布,采用MIT许可证,以支持开放研究与协作。

实验结果
研究问题
- RQ1扩大模型规模和训练语料规模对法律NLP任务性能有何影响?
- RQ2持续预训练、指令微调和偏好对齐在多大程度上促进了法律领域的专业化?
- RQ3当使用领域特定数据大规模训练时,开源LLM能否在法律基准上实现最先进性能?
- RQ4使用MoE架构扩展法律LLM领域适应时,存在哪些权衡?
- RQ5在大规模法律LLM训练中,与全量预训练相比,持续预训练的能量效率如何?
主要发现
- SaulLM-54B和SaulLM-141B在LegalBench-Instruct基准上优于GPT-4、Llama3和Mixtral-Instruct,实现了法律推理和文本生成的最先进结果。
- 模型在训练过程中表现出归一化对数损失的持续下降,表明未出现性能饱和,暗示进一步预训练可能带来额外收益。
- 尽管整体性能随规模扩大而提升,但20%的法律任务出现反向缩放现象,即大模型在某些任务上表现劣于小模型,尤其在解释和基于规则的推理方面。
- 训练总能耗为65,480.4千瓦时,显著低于典型全量LLM训练,凸显了持续预训练作为专业化策略的能量效率优势。
- 训练过程涉及超过1800个作业,累计使用超过160,000 GPU小时,节点利用率高,但因AMD GPU效率低下和故障频发,面临显著硬件挑战。
- 在缺乏专有数据集和大量计算资源的情况下,指令微调和对齐流程难以复现,表明开源对齐能力仍存在明显差距。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。