Views
No views yet
morenolq/bart-it) and are further pre-trained on Italian legal corpora.| Model | Description | Link |
|---|---|---|
| LEGIT-BART | Continued pre-training of morenolq/bart-it on Italian legal texts | 🔗 Link |
| LEGIT-BART-LSG-4096 | Continued pre-training of morenolq/bart-it, supporting 4,096 tokens | 🔗 Link |
| LEGIT-BART-LSG-16384 | Continued pre-training of morenolq/bart-it, supporting 16,384 tokens | 🔗 Link |
| LEGIT-SCRATCH-BART | Trained from scratch on Italian legal texts | 🔗 Link |
| LEGIT-SCRATCH-BART-LSG-4096 | Trained from scratch with LSG attention, supporting 4,096 tokens | 🔗 Link |
| LEGIT-SCRATCH-BART-LSG-16384 | Trained from scratch with LSG attention, supporting 16,384 tokens | 🔗 Link |
| BART-IT-LSG-4096 | morenolq/bart-it with LSG attention, supporting 4,096 tokens (no legal adaptation) | 🔗 Link |
| BART-IT-LSG-16384 | morenolq/bart-it with LSG attention, supporting 16,384 tokens (no legal adaptation) | 🔗 Link |
morenolq/bart-itjoelniklaus/Multi_Legal_Pile1from transformers import BartForConditionalGeneration, AutoTokenizer
2
3# Load tokenizer and model
4model_name = "morenolq/LEGIT-SCRATCH-BART"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = BartForConditionalGeneration.from_pretrained(model_name)
7
8# Example input
9input_text = "<mask> 1234: Il contratto si intende concluso quando..."
10inputs = tokenizer(input_text, return_tensors="pt", max_length=512, truncation=True)
11
12# Pre-trained model fill the mask
13output_ids = model.generate(inputs.input_ids, max_length=150, num_beams=4, early_stopping=True)
14output_text = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
15print("📝:", output_text)1@article{benedetto2025legitbart,
2 title = {LegItBART: a summarization model for Italian legal documents},
3 author = {Benedetto, Irene and La Quatra, Moreno and Cagliero, Luca},
4 year = 2025,
5 journal = {Artificial Intelligence and Law},
6 publisher = {Springer},
7 pages = {1--31},
8 doi = {10.1007/s10506-025-09436-y},
9 url = {doi.org/10.1007/s10506-025-09436-y}
10}