# Modele językowe uczone na tekstach prawnych

EN: **Domain-adapted legal language models** · id `legallm` · aliases: legal language models, legal LLM, LEGAL-BERT, SaulLM, legal domain pretraining, prawnicze modele językowe

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w prawie](https://aiatlasgraph.com/t/legalai.md) › [Przetwarzanie tekstów prawnych](https://aiatlasgraph.com/t/legalnlp.md) › Modele językowe uczone na tekstach prawnych

## Description

- PL: Modele językowe dotrenowane lub trenowane od zera na korpusach prawnych, czasem z własnym słownikiem i dostrajaniem instrukcyjnym na zadaniach prawnych.
- EN: Language models further pretrained or trained from scratch on legal corpora, sometimes with a custom vocabulary and instruction tuning on legal tasks.

## In one sentence

- PL: Modele, które oprócz zwykłych tekstów przeczytały ogromne zbiory ustaw, wyroków i umów, żeby lepiej rozumieć prawniczy język.
- EN: Models that, besides ordinary text, have read huge collections of statutes, rulings and contracts to understand legal language better.

## Problem it solves

- PL: Ogólne modele mylą się na prawniczym żargonie i zawiłych konstrukcjach zdań, a kancelarie nie zawsze mogą wysyłać dokumenty na zewnątrz.
- EN: General models stumble on legal jargon and convoluted sentences, and law firms cannot always send documents outside.

## What it does

- PL: Jak tłumacz, który najpierw kilka lat przepracował w kancelarii: zna te same słowa co inni, ale lepiej czuje ich prawny sens.
- EN: Like a translator who spent a few years at a law firm: same words as everyone, but a better feel for their legal meaning.

## Everyday example

- PL: Dział prawny banku uruchamia na własnym serwerze mały model dotrenowany na umowach, który klasyfikuje klauzule bez wysyłania ich do chmury.
- EN: A bank's legal department runs a small model further trained on contracts on its own server, classifying clauses without sending them to the cloud.

## This concerns you if you…

- PL: potrzebujesz modelu do zadań prawniczych na własnym sprzęcie
- PL: zastanawiasz się, czy dotrenować model na swoich dokumentach
- EN: need a model for legal tasks on your own hardware
- EN: wonder whether to further train a model on your documents

## Keywords

LEGAL-BERT · SaulLM-7B · CaseHOLD · Pile of Law · continued pretraining · domain-specific vocabulary · legal instruction tuning · LexGLUE

## How it works

- PL: Stosuje się kontynuację pretreningu ogólnego modelu na korpusie prawnym albo pretrening od zera z własnym słownikiem dopasowanym do terminologii. Większe modele dodatkowo dostraja się instrukcyjnie na zbiorach zadań prawnych. Badania pokazują, że zysk rośnie, im bardziej zadanie wymaga wiedzy i języka prawniczego.
- EN: Either a general model's pretraining is continued on a legal corpus, or a model is pretrained from scratch with a vocabulary fitted to legal terminology. Larger models are additionally instruction-tuned on legal task collections. Studies show the gain grows the more a task depends on legal knowledge and language.

## Limits

- PL: Zysk bywa marginalny na zadaniach mało domenowych, a staranne strojenie hiperparametrów ogólnego modelu potrafi dać zbliżony efekt. Modele są głównie anglojęzyczne i odzwierciedlają jurysdykcje z korpusu. Duże modele ogólne szybko doganiają mniejsze modele domenowe.
- EN: The gain can be marginal on less domain-specific tasks, and careful hyperparameter tuning of a general model can achieve a similar effect. Models are mostly English and reflect the jurisdictions in their corpus. Large general models quickly catch up with smaller domain models.

## Key terms

- PL: **słownik (vocabulary)**: Zestaw fragmentów słów, na które model dzieli tekst.
- PL: **CaseHOLD**: Test wskazywania zasady prawnej wynikającej z cytowanej sprawy.
- PL: **pretrening domenowy**: Dalsze uczenie modelu na tekstach z jednej dziedziny.
- EN: **vocabulary**: The set of word pieces a model splits text into.
- EN: **CaseHOLD**: A test of identifying the legal holding of a cited case.
- EN: **domain pretraining**: Further training a model on text from a single field.

## Know first

- [Dotrenowanie na tekstach z dziedziny (continued pretraining) (Continued (domain-adaptive) pretraining)](https://aiatlasgraph.com/t/continuedpretraining.md)
- [SFT / instruction tuning (Supervised fine-tuning)](https://aiatlasgraph.com/t/sft.md)

## Related topics

Untyped, symmetric "see also" links.

- [Dotrenowanie na tekstach z dziedziny (continued pretraining) (Continued (domain-adaptive) pretraining)](https://aiatlasgraph.com/t/continuedpretraining.md)
- [Modele językowe uczone na tekstach finansowych (Finance-specific language models)](https://aiatlasgraph.com/t/finllm.md)

## Sources

- [LEGAL-BERT: The Muppets straight out of Law School](<https://arxiv.org/abs/2010.02559>) `chalkidis-legal-bert-2020` · by Ilias Chalkidis, Manos Fergadiotis, Prodromos Malakasiotis, Nikolaos Aletras, Ion Androutsopoulos
- [When Does Pretraining Help? Assessing Self-Supervised Learning for Law and the CaseHOLD Dataset](<https://arxiv.org/abs/2104.08671>) `zheng-casehold-2021` · by Lucia Zheng, Neel Guha, Brandon R. Anderson, Peter Henderson, Daniel E. Ho
- [SaulLM-7B: A pioneering Large Language Model for Law](<https://arxiv.org/abs/2403.03883>) `colombo-saullm-2024` · by Pierre Colombo i in. · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/legallm · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
