antoinelouis commited on
Commit
3d6d7e4
1 Parent(s): cd86f29

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -11
README.md CHANGED
@@ -1,25 +1,23 @@
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
15
 
16
- * Legal-DistilCamemBERT is a [DistilCamemBERT](https://huggingface.co/cmarkea/distilcamembert-base)-based model further pre-trained on [23,000+ statutory 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 +26,32 @@ tokenizer = AutoTokenizer.from_pretrained("maastrichtlawtech/legal-distilcamembe
28
  model = AutoModel.from_pretrained("maastrichtlawtech/legal-distilcamembert")
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-DistilCamemBERT-base
17
 
18
+ This is a [DistilCamemBERT](https://huggingface.co/cmarkea/distilcamembert-base) model further pre-trained on 22,000+ legal articles from the Belgian legislation in French.
 
 
19
 
20
+ ## Usage
 
 
21
 
22
  ```python
23
  from transformers import AutoTokenizer, AutoModel
 
26
  model = AutoModel.from_pretrained("maastrichtlawtech/legal-distilcamembert")
27
  ```
28
 
29
+ ## Training
30
+
31
+ #### Background
32
+
33
+ We utilize the [distilcamembert-base](https://huggingface.co/cmarkea/distilcamembert-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.
34
+
35
+ #### Hyperparameters
36
 
37
+ 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.
38
 
39
+ #### Data
40
+
41
+ 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.
42
+
43
+ ## Citation
44
+
45
+ ```bibtex
46
+ @inproceedings{louis2023finding,
47
+ title = {Finding the Law: Enhancing Statutory Article Retrieval via Graph Neural Networks},
48
+ author = {Louis, Antoine and van Dijck, Gijs and Spanakis, Gerasimos},
49
+ booktitle = {Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics},
50
+ month = may,
51
+ year = {2023},
52
+ address = {Dubrovnik, Croatia},
53
+ publisher = {Association for Computational Linguistics},
54
+ url = {https://aclanthology.org/2023.eacl-main.203/},
55
+ pages = {2753–2768},
56
+ }
57
+ ```