Bert Base Uncased Echr
模型概述
基於歐洲人權法院案例預訓練的法律領域專用BERT模型,適用於法律文本分析、案例研究等專業場景
模型特點
法律領域優化
使用12GB法律專業文本預訓練,包含歐盟立法、法院案例等專業語料
子領域專業化
針對歐洲人權法院案例特別優化的子模型,在相關任務上優於通用BERT
完整技術繼承
保持原始BERT-base架構,確保兼容現有工具鏈
模型能力
法律文本理解
法律實體識別
法律文本分類
法律問答系統支持
使用案例
司法研究
人權案例分析
分析歐洲人權法院案例中的法律論證模式
可識別案例中的關鍵法律要素和判決依據
法律科技
法律文件處理
自動化處理法律合同和訴訟文件
提高法律文件處理效率和準確性
🚀 LEGAL - BERT:剛從法學院畢業的“布偶秀明星”
LEGAL - BERT是一系列用於法律領域的BERT模型,旨在助力法律自然語言處理研究、計算法學以及法律科技應用。為了預訓練不同版本的LEGAL - BERT,我們從多個領域(如立法、法院案例、合同)的公開資源中收集了12GB多樣的英文法律文本。特定子領域變體(如CONTRACTS - 、EURLEX - 、ECHR - )和/或通用的LEGAL - BERT在特定領域任務上的表現優於直接使用BERT。這是在歐洲人權法院(ECHR)案例上進行預訓練的子領域變體模型。
🚀 快速開始
LEGAL - BERT是專門為法律領域打造的BERT模型家族,能為法律相關的自然語言處理研究和應用提供有力支持。以下將為你介紹該模型的相關信息,包括預訓練語料、使用方法等。
✨ 主要特性
- 領域針對性強:基於大量法律文本進行預訓練,在法律領域的特定任務上表現出色。
- 多種變體可選:有針對不同子領域(如合同、歐盟法律、歐洲人權法院案例)的變體模型。
- 性能優越:在法律相關任務中,比直接使用普通BERT模型效果更好。
📚 詳細文檔
預訓練語料
LEGAL - BERT的預訓練語料包括:
- 116,062份歐盟立法文件,可從EURLEX(http://eur - lex.europa.eu)獲取,這是由歐盟出版局運營的歐盟法律知識庫。
- 61,826份英國立法文件,可從英國立法門戶(http://www.legislation.gov.uk)獲取。
- 19,867份歐洲法院(ECJ)的案例,同樣可從EURLEX獲取。
- 12,554份歐洲人權法院(ECHR)的案例,可從HUDOC(http://hudoc.echr.coe.int/eng)獲取。
- 164,141份美國各地法院的案例,可從Case Law Access Project門戶(https://case.law)獲取。
- 76,366份美國合同,來自美國證券交易委員會(SECOM)的EDGAR數據庫(https://www.sec.gov/edgar.shtml)。
預訓練細節
- 我們使用Google BERT的GitHub倉庫(https://github.com/google - research/bert)中提供的官方代碼對BERT進行訓練。
- 我們發佈了一個類似於英文BERT - BASE模型(12層、768隱藏層、12頭、1.1億參數)的模型。
- 我們選擇遵循相同的訓練設置:進行100萬步訓練,批次大小為256個長度為512的序列,初始學習率為1e - 4。
- 我們使用了由TensorFlow研究雲(TFRC)免費提供的單個Google Cloud TPU v3 - 8,同時也利用了GCP研究信用。非常感謝谷歌的這兩個項目對我們的支持!
模型列表
屬性 | 詳情 |
---|---|
模型名稱 | CONTRACTS - BERT - BASE、EURLEX - BERT - BASE、ECHR - BERT - BASE、LEGAL - BERT - BASE、LEGAL - BERT - SMALL |
模型路徑 | nlpaueb/bert - base - uncased - contracts 、nlpaueb/bert - base - uncased - eurlex 、nlpaueb/bert - base - uncased - echr 、nlpaueb/legal - bert - base - uncased 、nlpaueb/legal - bert - small - uncased |
訓練數據 | 美國合同、歐盟立法、歐洲人權法院案例、所有上述數據、所有上述數據 |
注:
- LEGAL - BERT - BASE是Chalkidis等人(2020)中提到的LEGAL - BERT - SC模型;該模型是在下面提到的法律語料庫上從頭開始訓練的,使用了由在相同語料庫上訓練的sentence - piece分詞器創建的新詞彙表。
- 由於很多人對LEGAL - BERT - FP模型(依賴於原始BERT - BASE檢查點的模型)感興趣,這些模型已在Archive.org(https://archive.org/details/legal_bert_fp)上發佈,因為這些模型是次要的,可能僅對那些想深入研究Chalkidis等人(2020)中未解決問題的人有吸引力。
💻 使用示例
基礎用法
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-uncased-echr")
model = AutoModel.from_pretrained("nlpaueb/bert-base-uncased-echr")
作為語言模型使用
語料 | 模型 | 掩碼標記 | 預測結果 |
---|---|---|---|
BERT - BASE - UNCASED | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('new', '0.09'), ('current', '0.04'), ('proposed', '0.03'), ('marketing', '0.03'), ('joint', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.32'), ('rape', '0.22'), ('abuse', '0.14'), ('death', '0.04'), ('violence', '0.03') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('farm', '0.25'), ('livestock', '0.08'), ('draft', '0.06'), ('domestic', '0.05'), ('wild', '0.05') |
CONTRACTS - BERT - BASE | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('letter', '0.38'), ('dealer', '0.04'), ('employment', '0.03'), ('award', '0.03'), ('contribution', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('death', '0.39'), ('imprisonment', '0.07'), ('contempt', '0.05'), ('being', '0.03'), ('crime', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | (('domestic', '0.18'), ('laboratory', '0.07'), ('household', '0.06'), ('personal', '0.06'), ('the', '0.04') |
EURLEX - BERT - BASE | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('supply', '0.11'), ('cooperation', '0.08'), ('service', '0.07'), ('licence', '0.07'), ('distribution', '0.05') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.66'), ('death', '0.07'), ('imprisonment', '0.07'), ('murder', '0.04'), ('rape', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.43'), ('pet', '0.28'), ('certain', '0.05'), ('fur', '0.03'), ('the', '0.02') |
ECHR - BERT - BASE | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('second', '0.24'), ('latter', '0.10'), ('draft', '0.05'), ('bilateral', '0.05'), ('arbitration', '0.04') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.99'), ('death', '0.01'), ('inhuman', '0.00'), ('beating', '0.00'), ('rape', '0.00') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('pet', '0.17'), ('all', '0.12'), ('slaughtered', '0.10'), ('domestic', '0.07'), ('individual', '0.05') |
LEGAL - BERT - BASE | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('settlement', '0.26'), ('letter', '0.23'), ('dealer', '0.04'), ('master', '0.02'), ('supplemental', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '1.00'), ('detention', '0.00'), ('arrest', '0.00'), ('rape', '0.00'), ('death', '0.00') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.67'), ('beef', '0.17'), ('farm', '0.03'), ('pet', '0.02'), ('dairy', '0.01') |
LEGAL - BERT - SMALL | |||
(合同) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('license', '0.09'), ('transition', '0.08'), ('settlement', '0.04'), ('consent', '0.03'), ('letter', '0.03') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.59'), ('pain', '0.05'), ('ptsd', '0.05'), ('death', '0.02'), ('tuberculosis', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('all', '0.08'), ('live', '0.07'), ('certain', '0.07'), ('the', '0.07'), ('farm', '0.05') |
🔧 技術細節
可參考文章 "LEGAL - BERT: The Muppets straight out of Law School"(Chalkidis等人,2020)中的實驗內容(https://aclanthology.org/2020.findings - emnlp.261)。
📄 許可證
本項目採用CC - BY - SA - 4.0許可證。
引用
@inproceedings{chalkidis-etal-2020-legal,
title = "{LEGAL}-{BERT}: The Muppets straight out of Law School",
author = "Chalkidis, Ilias and
Fergadiotis, Manos and
Malakasiotis, Prodromos and
Aletras, Nikolaos and
Androutsopoulos, Ion",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
doi = "10.18653/v1/2020.findings-emnlp.261",
pages = "2898--2904"
}
關於我們
雅典經濟與商業大學自然語言處理小組致力於開發讓計算機處理和生成自然語言文本的算法、模型和系統。該小組目前的研究興趣包括:
- 數據庫、本體、文檔集合和網絡的問答系統,特別是生物醫學問答。
- 從數據庫和本體(特別是語義網絡本體)生成自然語言。
- 文本分類,包括過濾垃圾郵件和不良內容。
- 信息提取和觀點挖掘,包括法律文本分析和情感分析。
- 希臘語的自然語言處理工具,如解析器和命名實體識別器。
- 自然語言處理中的機器學習,特別是深度學習。
該小組隸屬於雅典經濟與商業大學信息學系信息處理實驗室。
Ilias Chalkidis 代表 雅典經濟與商業大學自然語言處理小組
| GitHub: @ilias.chalkidis | Twitter: @KiddoThe2B |
Phi 2 GGUF
其他
Phi-2是微軟開發的一個小型但強大的語言模型,具有27億參數,專注於高效推理和高質量文本生成。
大型語言模型 支持多種語言
P
TheBloke
41.5M
205
Roberta Large
MIT
基於掩碼語言建模目標預訓練的大型英語語言模型,採用改進的BERT訓練方法
大型語言模型 英語
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基礎模型的蒸餾版本,在保持相近性能的同時更輕量高效,適用於序列分類、標記分類等自然語言處理任務。
大型語言模型 英語
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一個多語言大語言模型,針對多語言對話用例進行了優化,在常見的行業基準測試中表現優異。
大型語言模型 英語
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基於100種語言的2.5TB過濾CommonCrawl數據預訓練的多語言模型,採用掩碼語言建模目標進行訓練。
大型語言模型 支持多種語言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基於Transformer架構的英語預訓練模型,通過掩碼語言建模目標在海量文本上訓練,支持文本特徵提取和下游任務微調
大型語言模型 英語
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI發佈的開放預訓練Transformer語言模型套件,參數量從1.25億到1750億,旨在對標GPT-3系列性能,同時促進大規模語言模型的開放研究。
大型語言模型 英語
O
facebook
6.3M
198
1
基於transformers庫的預訓練模型,適用於多種NLP任務
大型語言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多語言大語言模型系列,包含8B、70B和405B參數規模,支持8種語言和代碼生成,優化了多語言對話場景。
大型語言模型
Transformers 支持多種語言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基礎版是由Google開發的文本到文本轉換Transformer模型,參數規模2.2億,支持多語言NLP任務。
大型語言模型 支持多種語言
T
google-t5
5.4M
702
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98