Skip to main content
QUICK REVIEW

[Paper Review] SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domain

Pierre Colombo, Telmo Pires|arXiv (Cornell University)|Jul 28, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

This paper introduces SaulLM-54B and SaulLM-141B, large language models (LLMs) specialized for the legal domain using a three-stage domain adaptation pipeline: continued pretraining on over 540 billion legal tokens, instruction fine-tuning with synthetic and real legal data, and human preference alignment. The models achieve state-of-the-art performance on LegalBench-Instruct, outperforming GPT-4, Llama3, and Mixtral, and are released under the MIT license for open research use.

ABSTRACT

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.

Motivation & Objective

  • To investigate the impact of scaling model size and training corpus size on legal domain adaptation.
  • To address the limitations of prior legal LLMs, which were constrained by small model size (≤12B parameters) and limited training data (≤30B tokens).
  • To develop a scalable, open-source pipeline for adapting large language models to the legal domain using continued pretraining, instruction tuning, and preference alignment.
  • To release high-quality, domain-specialized LLMs under the MIT license to enable broader research and application in legal NLP.

Proposed method

  • The models are based on the Mixtral architecture, leveraging a Mixture of Experts (MoE) design with 54B and 141B parameters, respectively.
  • A base corpus of over 540 billion legal tokens was used for continued pretraining, significantly expanding the in-domain data compared to prior works.
  • Instruction fine-tuning was applied using a specialized legal instruction-following protocol, incorporating both real and synthetically generated legal instruction data.
  • Preference alignment was performed using human feedback on legal interpretations, employing algorithms such as DPO or PPO to refine model outputs.
  • The training pipeline was executed on high-performance computing infrastructure, including Adastra (ranked 3rd in Green500) and Jeanzay, with energy consumption meticulously tracked.
  • The models were released in base, instruct, and aligned variants under the MIT license to support open research and collaboration.
SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domain

Experimental results

Research questions

  • RQ1How does scaling model size and training corpus size impact performance on legal NLP tasks?
  • RQ2To what extent do continued pretraining, instruction fine-tuning, and preference alignment contribute to legal domain specialization?
  • RQ3Can open-source LLMs achieve state-of-the-art performance on legal benchmarks when trained at scale with domain-specific data?
  • RQ4What are the trade-offs involved in scaling domain adaptation for legal LLMs using MoE architectures?
  • RQ5How does energy efficiency compare in large-scale legal LLM training when using continued pretraining versus full pretraining?

Key findings

  • SaulLM-54B and SaulLM-141B outperform GPT-4, Llama3, and Mixtral-Instruct on the LegalBench-Instruct benchmark, achieving state-of-the-art results in legal reasoning and text generation.
  • The models demonstrate a consistent decrease in normalized log loss over training time, indicating no saturation and suggesting that further pretraining could yield additional gains.
  • Despite overall performance improvements with scaling, 20% of legal tasks exhibited inverse scaling, where larger models underperformed smaller ones, particularly in interpretation and rule-based reasoning.
  • The total energy consumption for training was 65,480.4 kWh, significantly lower than typical full LLM training, highlighting the energy efficiency of continued pretraining as a specialization strategy.
  • The training process involved over 1800 jobs across more than 160,000 GPU-hours, with high node utilization and notable hardware challenges due to AMD GPU inefficiencies and failures.
  • The instruction fine-tuning and alignment procedures remain challenging to replicate without access to proprietary datasets and substantial computational resources, indicating a gap in open-source alignment capabilities.
Figure 1: Domain adaptation method model for turning a Mixtral to a SaulLM-141B . Training involves different stages: legal domain pretraining, instruction filtering, and preference filtering.
Figure 1: Domain adaptation method model for turning a Mixtral to a SaulLM-141B . Training involves different stages: legal domain pretraining, instruction filtering, and preference filtering.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.