Table of Contents
Fetching ...

MultiLegalPile: A 689GB Multilingual Legal Corpus

Joel Niklaus, Veton Matoshi, Matthias Stürmer, Ilias Chalkidis, Daniel E. Ho

TL;DR

The paper tackles the scarcity of multilingual, domain-specific corpora for legal NLP by introducing MultiLegalPile, a 689GB dataset spanning 24 languages and 17 jurisdictions. It details a four-way construction pipeline (Native Multi Legal Pile, Eurlex Resources, Legal mC4, Pile of Law), licensing considerations, and extensive pretraining of 2 multilingual PLMs and 24 monolingual models, plus a Longformer variant. Evaluations on LEXTREME and LexGLUE yield state-of-the-art results for several configurations, with notable gains in Greek legal code and cross-lingual benchmarks. The work emphasizes open science, releasing data, models, and code to foster further research in multilingual legal NLP. Future work includes expanding linguistic and jurisdictional coverage and exploring larger generative multilingual legal models.

Abstract

Large, high-quality datasets are crucial for training Large Language Models (LLMs). However, so far, there are few datasets available for specialized critical domains such as law and the available ones are often only for the English language. We curate and release MultiLegalPile, a 689GB corpus in 24 languages from 17 jurisdictions. The MultiLegalPile corpus, which includes diverse legal data sources with varying licenses, allows for pretraining NLP models under fair use, with more permissive licenses for the Eurlex Resources and Legal mC4 subsets. We pretrain two RoBERTa models and one Longformer multilingually, and 24 monolingual models on each of the language-specific subsets and evaluate them on LEXTREME. Additionally, we evaluate the English and multilingual models on LexGLUE. Our multilingual models set a new SotA on LEXTREME and our English models on LexGLUE. We release the dataset, the trained models, and all of the code under the most open possible licenses.

MultiLegalPile: A 689GB Multilingual Legal Corpus

TL;DR

The paper tackles the scarcity of multilingual, domain-specific corpora for legal NLP by introducing MultiLegalPile, a 689GB dataset spanning 24 languages and 17 jurisdictions. It details a four-way construction pipeline (Native Multi Legal Pile, Eurlex Resources, Legal mC4, Pile of Law), licensing considerations, and extensive pretraining of 2 multilingual PLMs and 24 monolingual models, plus a Longformer variant. Evaluations on LEXTREME and LexGLUE yield state-of-the-art results for several configurations, with notable gains in Greek legal code and cross-lingual benchmarks. The work emphasizes open science, releasing data, models, and code to foster further research in multilingual legal NLP. Future work includes expanding linguistic and jurisdictional coverage and exploring larger generative multilingual legal models.

Abstract

Large, high-quality datasets are crucial for training Large Language Models (LLMs). However, so far, there are few datasets available for specialized critical domains such as law and the available ones are often only for the English language. We curate and release MultiLegalPile, a 689GB corpus in 24 languages from 17 jurisdictions. The MultiLegalPile corpus, which includes diverse legal data sources with varying licenses, allows for pretraining NLP models under fair use, with more permissive licenses for the Eurlex Resources and Legal mC4 subsets. We pretrain two RoBERTa models and one Longformer multilingually, and 24 monolingual models on each of the language-specific subsets and evaluate them on LEXTREME. Additionally, we evaluate the English and multilingual models on LexGLUE. Our multilingual models set a new SotA on LEXTREME and our English models on LexGLUE. We release the dataset, the trained models, and all of the code under the most open possible licenses.
Paper Structure (27 sections, 3 figures, 9 tables)

This paper contains 27 sections, 3 figures, 9 tables.

Figures (3)

  • Figure 1: MultiLegalPile Source Distribution
  • Figure 2: MultiLegalPile Text Type Distribution
  • Figure 3: MultiLegalPile Language Distribution (Note the log-scaled y-axis)