🚀 LEGIT - BARTシリーズのモデルカード
LEGIT - BARTモデルは、イタリア語の法的テキスト処理のための事前学習済みトランスフォーマーベースのモデルのファミリーです。これらのモデルはBART - IT ([morenolq/bart - it
](https://huggingface.co/morenolq/bart - it))をベースに、イタリア語の法的コーパスでさらに事前学習されています。
🚀 クイックスタート
モデルの概要
LEGIT - BARTモデルは、イタリア語の法的テキスト処理に特化した事前学習済みトランスフォーマーベースのモデルです。BART - ITをベースに、イタリア語の法的コーパスでさらに事前学習されています。
コードによる使用例
from transformers import BartForConditionalGeneration, AutoTokenizer
model_name = "morenolq/LEGIT-BART"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = BartForConditionalGeneration.from_pretrained(model_name)
input_text = "<mask> 1234: Il contratto si intende concluso quando..."
inputs = tokenizer(input_text, return_tensors="pt", max_length=512, truncation=True)
output_ids = model.generate(inputs.input_ids, max_length=150, num_beams=4, early_stopping=True)
output_text = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print("📝:", output_text)
✨ 主な機能
- Local - Sparse - Global (LSG) Attentionによる拡張コンテキスト長(最大16,384トークン)📜
- 法令、判例、契約書などの法的文書で学習 📑
- 特定のタスクにはファインチューニングされていない(さらなる適応が必要)
📦 利用可能なモデル
モデル |
説明 |
リンク |
LEGIT - BART |
morenolq/bart - it をイタリア語の法的テキストで継続事前学習 |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - BART) |
LEGIT - BART - LSG - 4096 |
morenolq/bart - it を継続事前学習し、4,096トークンをサポート |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - BART - LSG - 4096) |
LEGIT - BART - LSG - 16384 |
morenolq/bart - it を継続事前学習し、16,384トークンをサポート |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - BART - LSG - 16384) |
LEGIT - SCRATCH - BART |
イタリア語の法的テキストからゼロから学習 |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - SCRATCH - BART) |
LEGIT - SCRATCH - BART - LSG - 4096 |
LSGアテンションでゼロから学習し、4,096トークンをサポート |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - SCRATCH - BART - LSG - 4096) |
LEGIT - SCRATCH - BART - LSG - 16384 |
LSGアテンションでゼロから学習し、16,384トークンをサポート |
[🔗 リンク](https://huggingface.co/morenolq/LEGIT - SCRATCH - BART - LSG - 16384) |
BART - IT - LSG - 4096 |
morenolq/bart - it にLSGアテンションを適用し、4,096トークンをサポート(法的適応なし) |
[🔗 リンク](https://huggingface.co/morenolq/BART - IT - LSG - 4096) |
BART - IT - LSG - 16384 |
morenolq/bart - it にLSGアテンションを適用し、16,384トークンをサポート(法的適応なし) |
[🔗 リンク](https://huggingface.co/morenolq/BART - IT - LSG - 16384) |
🔧 技術詳細
アーキテクチャ
- ベースモデル: [
morenolq/bart - it
](https://huggingface.co/morenolq/bart - it)
- トランスフォーマーエンコーダー - デコーダー
- 長文書用のLSGアテンション
- ゼロから学習したモデル用の特定のトークナイザー(実験では継続事前学習より性能が低い)
学習データ
📚 ドキュメント
LEGIT - BARTモデルを紹介する論文は現在レビュー中で、公開され次第ここに更新されます。
@article{benedetto2025legitbart,
title = {LegItBART: a summarization model for Italian legal documents},
author = {Benedetto, Irene and La Quatra, Moreno and Cagliero, Luca},
year = 2025,
journal = {Artificial Intelligence and Law},
publisher = {Springer},
pages = {1--31},
doi = {10.1007/s10506-025-09436-y},
url = {doi.org/10.1007/s10506-025-09436-y}
}
📄 ライセンス
このモデルはMITライセンスの下で提供されています。
⚠️ 重要提示
- 特定のタスクにはファインチューニングされていない:これらのモデルは法的テキストで事前学習されており、特定の法的NLPタスク(要約、質問応答など)にはさらなる適応が必要です。
- バイアスと公正性:法的テキストには法制度に存在するバイアスが含まれる場合があります。モデルの公正で倫理的な使用を確保するように注意する必要があります。
- 法的アドバイス:これらのモデルは専門的な法的アドバイスの代替品ではありません。法的問題については常に資格のある法的専門家に相談してください。