antoinelouis commited on
Commit
7e4a790
1 Parent(s): e5a285f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -11
README.md CHANGED
@@ -1,25 +1,24 @@
1
  ---
2
  language: fr
3
- license: mit
4
  tags:
5
  - legal
 
6
  datasets: maastrichtlawtech/bsard
7
  pipeline_tag: fill-mask
8
  widget:
9
  - text: >-
10
  Chaque commune de la Région peut adopter un <mask> communal de
11
  développement, applicable à l'ensemble de son territoire.
 
12
  ---
13
 
14
- # Legal-CamemBERT-Base
15
 
16
- * Legal-CamemBERT-Base is a [CamemBERT-Base](https://huggingface.co/camembert-base) model further pre-trained on [23,000+ legislative articles](https://huggingface.co/datasets/maastrichtlawtech/bsard) from the Belgian legislation.
17
- * We chose the following training set-up: 50k training steps (200 epochs) with batches of 32 sequences of length 512 with an initial learning rate of 5e-5.
18
- * Training was performed on one Tesla V100 GPU with 32 GB using the [code](https://github.com/huggingface/transformers/blob/main/examples/pytorch/language-modeling/run_mlm.py) provided by Hugging Face.
19
 
20
- ---
21
-
22
- ### Load Pretrained Model
23
 
24
  ```python
25
  from transformers import AutoTokenizer, AutoModel
@@ -28,8 +27,33 @@ tokenizer = AutoTokenizer.from_pretrained("maastrichtlawtech/legal-camembert-bas
28
  model = AutoModel.from_pretrained("maastrichtlawtech/legal-camembert-base")
29
  ```
30
 
31
- ### About Us
 
 
 
 
 
 
 
32
 
33
- The [Maastricht Law & Tech Lab](https://www.maastrichtuniversity.nl/about-um/faculties/law/research/law-and-tech-lab) develops algorithms, models, and systems that allow computers to process natural language texts from the legal domain.
34
 
35
- Author: [Antoine Louis](https://antoinelouis.co) on behalf of the [Maastricht Law & Tech Lab](https://www.maastrichtuniversity.nl/about-um/faculties/law/research/law-and-tech-lab).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  language: fr
3
+ license: apache-2.0
4
  tags:
5
  - legal
6
+ - feature-extraction
7
  datasets: maastrichtlawtech/bsard
8
  pipeline_tag: fill-mask
9
  widget:
10
  - text: >-
11
  Chaque commune de la Région peut adopter un <mask> communal de
12
  développement, applicable à l'ensemble de son territoire.
13
+ library_name: transformers
14
  ---
15
 
16
+ # Legal-CamemBERT-base
17
 
18
+ Legal-CamemBERT-base is a [CamemBERT-base](https://huggingface.co/camembert-base) model further pre-trained on [23,000+ statutory articles](https://huggingface.co/datasets/maastrichtlawtech/bsard) from the Belgian legislation.
 
 
19
 
20
+ ## Usage
21
+ ***
 
22
 
23
  ```python
24
  from transformers import AutoTokenizer, AutoModel
 
27
  model = AutoModel.from_pretrained("maastrichtlawtech/legal-camembert-base")
28
  ```
29
 
30
+ ## Training
31
+ ***
32
+
33
+ #### Background
34
+
35
+ We utilize the [camembert-base](https://huggingface.co/camembert-base) checkpoint and further pre-train it with a masked language modeling (MLM) objective on legislation in French using the [script](https://github.com/huggingface/transformers/blob/main/examples/pytorch/language-modeling/run_mlm.py) from Hugging Face.
36
+
37
+ #### Hyperparameters
38
 
39
+ We train the model on a single Tesla V100 GPU with 32GBs of memory during 200 epochs (i.e., ~50k steps) using a batch size of 32. We use the AdamW optimizer with an initial learning rate of 5e-05, weight decay of 0.01, learning rate warmup over the first 500 steps, and linear decay of the learning rate. The sequence length was limited to 512 tokens.
40
 
41
+ #### Data
42
+
43
+ We use the [Belgian Statutory Article Retrieval Dataset (BSARD)](https://huggingface.co/datasets/maastrichtlawtech/bsard) to further pre-train the model. BSARD is a French native dataset for studying legal information retrieval, which consists of more than 22,600 statutory articles from Belgian law and about 1,100 legal questions posed by Belgian citizens and labeled by experienced jurists with relevant articles from the corpus.
44
+
45
+ ## Citation
46
+
47
+ ```bibtex
48
+ @inproceedings{louis2023finding,
49
+ title = {Finding the Law: Enhancing Statutory Article Retrieval via Graph Neural Networks},
50
+ author = {Louis, Antoine and van Dijck, Gijs and Spanakis, Gerasimos},
51
+ booktitle = {Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics},
52
+ month = may,
53
+ year = {2023},
54
+ address = {Dubrovnik, Croatia},
55
+ publisher = {Association for Computational Linguistics},
56
+ url = {https://aclanthology.org/2023.eacl-main.203/},
57
+ pages = {2753–2768},
58
+ }
59
+ ```