shay681 commited on
Commit
7095ee2
โ€ข
1 Parent(s): 33e3f5f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -68
README.md CHANGED
@@ -1,69 +1,78 @@
1
- # HeBERT Finetuned Legal Clauses
2
-
3
- This model fine-tunes avichr/heBERT model on LevMuchnik/SupremeCourtOfIsrael dataset.
4
-
5
-
6
- ## Training and evaluation data
7
-
8
-
9
- | Dataset | Split | # samples |
10
- | -------- | ----- | --------- |
11
- | SupremeCourtOfIsrael | train | 147,946 |
12
- | SupremeCourtOfIsrael | validation | 36,987 |
13
-
14
-
15
- ## Training procedure
16
-
17
- ### Training hyperparameters
18
-
19
- The following hyperparameters were used during training:
20
- - evaluation_strategy: "epoch"
21
- - learning_rate: 2e-5
22
- - train_batch_size: 16
23
- - eval_batch_size: 16
24
- - num_train_epochs: 3
25
- - weight_decay: 0.01
26
-
27
-
28
- ### Framework versions
29
-
30
- - Transformers 4.17.0
31
- - Pytorch 1.10.0+cu111
32
- - Datasets 1.18.4
33
- - Tokenizers 0.11.6
34
-
35
- ### Results
36
-
37
- | Metric | # Value |
38
- | ------ | --------- |
39
- | **Accuracy** | **0.96** |
40
- | **F1** | **0.96** |
41
-
42
-
43
- ## Example Usage
44
-
45
- ```python
46
- from transformers import pipeline
47
-
48
- model_checkpoint = "shay681/HeBERT_finetuned_Legal_Clauses"
49
- qa_pipeline = pipeline(
50
- "question-answering",
51
- model=model_checkpoint,
52
- )
53
-
54
- predictions = qa_pipeline({
55
- 'context': "ื‘ ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ื‘ื™ืจื•ืฉืœื™ื ืจืข"ื 2225/01 ื‘ืคื ื™: ื›ื‘ื•ื“ ื”ืฉื•ืคื˜ืช ื˜' ืฉื˜ืจืกื‘ืจื’-ื›ื”ืŸ ื”ืžื‘ืงืฉืช: ืฉื™ืจื•ืชื™ ื‘ืจื™ืื•ืช ื›ืœืœื™ืช ื ื’ื“ ื”ืžืฉื™ื‘ ื” : ื—ื ื™ืชื” ืžื™ื™ื˜ืœืก, ืขื•"ื“ ื‘ืงืฉืช ืจืฉื•ืช ืขืจืขื•ืจ ืขืœ ื”ื—ืœื˜ืช ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืžื—ื•ื–ื™ ื‘ืชืœ-ืื‘ื™ื‘-ื™ืคื• ืžื™ื•ื 21.2.01 ื‘ื”"ืค 11571/99 ื•ื”"ืค 11243/99 ืฉื ื™ืชื ื” ืขืœ ื™ื“ื™ ื›ื‘ื•ื“ ื”ืฉื•ืคื˜ ื' ืกื˜ืจืฉื ื•ื‘ ื”ื—ืœื˜ื” 1. ื”ื•ื—ืœื˜ ืฉื”ื‘ืงืฉื” ืžืฆืจื™ื›ื” ืชืฉื•ื‘ื”. 2. ื”ืžืฉื™ื‘ื” ืชื’ื™ืฉ ืชืฉื•ื‘ืชื” ืœื‘ืงืฉื” ื‘ืชื•ืš 15 ื™ืžื™ื ืžืžื•ืขื“ ื”ื”ืžืฆืื”. 3. ืขืœ ื ื•ืกื— ื”ืชืฉื•ื‘ื” ื™ื—ื•ืœื• ื”ื•ืจืื•ืชื™ื” ืฉืœ ืชืงื ื” 406(ื‘) ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984-. 4. ื”ืชืฉื•ื‘ื” ืชื•ื’ืฉ ื‘ืžืงื‘ื™ืœ, ื”ืŸ ืœื‘ื™ืช-ืžืฉืคื˜ ื–ื”, ื•ื”ืŸ ื‘ืžื™ืฉืจื™ืŸ ืœืžื‘ืงืฉืช. 5. ื‘ืชืฉื•ื‘ื” ืชื™ื›ืœืœ ื”ืชื™ื™ื—ืกื•ืช ืœืืคืฉืจื•ืช ืฉื‘ื™ืช-ื”ืžืฉืคื˜ ื™ื‘ืงืฉ ืœืคืขื•ืœ ืขืœ-ืคื™ ืกืžื›ื•ืชื• ืœืคื™ ืชืงื ื” 410 ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984-. ืžืชื‘ืงืฉืช ื”ืชื™ื™ื—ืกื•ืช ืœืฉืืœื” ืื ื‘ืžืงืจื” ื›ื–ื” ื ื™ืชืŸ ื™ื”ื™ื” ืœืจืื•ืช ื‘ื“ื‘ืจื™ ื”ืชื’ื•ื‘ื” ืกื™ื›ื•ืžื™ื ื‘ื›ืชื‘. ื”ืขื“ืจ ื”ืชื™ื™ื—ืกื•ืช ื›ืžื•ื”ื• ื›ื”ืกื›ืžื”. ื”ืขื“ืจ ืชื’ื•ื‘ื” ื›ืžื•ื”ื• ื›ืื™-ื”ืชื™ื™ืฆื‘ื•ืช, ืขืœ ื”ื›ืจื•ืš ื‘ื›ืš. ื ื™ืชื ื” ื”ื™ื•ื, ื™"ื’ ื‘ืกื™ื•ื•ืŸ ืชืฉืก"ื (4.6.01). ืฉ ื• ืค ื˜ ืช _________________ ื”ืขืชืง ืžืชืื™ื ืœืžืงื•ืจ 01022250. J01 ื ื•ืกื— ื–ื” ื›ืคื•ืฃ ืœืฉื™ื ื•ื™ื™ ืขืจื™ื›ื” ื˜ืจื ืคืจืกื•ืžื• ื‘ืงื•ื‘ืฅ ืคืกืงื™ ื”ื“ื™ืŸ ืฉืœ ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ื‘ื™ืฉืจืืœ. ืฉืžืจื™ื”ื• ื›ื”ืŸ - ืžื–ื›ื™ืจ ืจืืฉื™ ื‘ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ืคื•ืขืœ ืžืจื›ื– ืžื™ื“ืข, ื˜ืœ' 02-6750444",
56
-
57
- 'question': "ืื™ืœื• ืกืขื™ืคื™ื\ื—ื•ืงื™ื\ืชืงื ื•ืช ืžืฆื•ื™ื™ื ื™ื ื‘ืžืกืžืš ?"
58
- })
59
-
60
- print(predictions)
61
- # output:
62
- # {'score': 0.9999890327453613, 'start': 0, 'end': 7, 'answer': 'ืชืงื ื” 406(ื‘) ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984'}
63
- ```
64
-
65
- ### About Me
66
- Created by Shay Doner.
67
- This is my final project as part of intelligent systems M.Sc studies at Afeka College in Tel-Aviv.
68
- For more cooperation, please contact email:
 
 
 
 
 
 
 
 
 
69
  shay681@gmail.com
 
1
+ ---
2
+ datasets:
3
+ - shay681/Legal_Clauses
4
+ language:
5
+ - he
6
+ base_model:
7
+ - avichr/heBERT
8
+ pipeline_tag: question-answering
9
+ ---
10
+ # HeBERT Finetuned Legal Clauses
11
+
12
+ This model fine-tunes avichr/heBERT model on LevMuchnik/SupremeCourtOfIsrael dataset.
13
+
14
+
15
+ ## Training and evaluation data
16
+
17
+
18
+ | Dataset | Split | # samples |
19
+ | -------- | ----- | --------- |
20
+ | SupremeCourtOfIsrael | train | 147,946 |
21
+ | SupremeCourtOfIsrael | validation | 36,987 |
22
+
23
+
24
+ ## Training procedure
25
+
26
+ ### Training hyperparameters
27
+
28
+ The following hyperparameters were used during training:
29
+ - evaluation_strategy: "epoch"
30
+ - learning_rate: 2e-5
31
+ - train_batch_size: 16
32
+ - eval_batch_size: 16
33
+ - num_train_epochs: 3
34
+ - weight_decay: 0.01
35
+
36
+
37
+ ### Framework versions
38
+
39
+ - Transformers 4.17.0
40
+ - Pytorch 1.10.0+cu111
41
+ - Datasets 1.18.4
42
+ - Tokenizers 0.11.6
43
+
44
+ ### Results
45
+
46
+ | Metric | # Value |
47
+ | ------ | --------- |
48
+ | **Accuracy** | **0.96** |
49
+ | **F1** | **0.96** |
50
+
51
+
52
+ ## Example Usage
53
+
54
+ ```python
55
+ from transformers import pipeline
56
+
57
+ model_checkpoint = "shay681/HeBERT_finetuned_Legal_Clauses"
58
+ qa_pipeline = pipeline(
59
+ "question-answering",
60
+ model=model_checkpoint,
61
+ )
62
+
63
+ predictions = qa_pipeline({
64
+ 'context': "ื‘ ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ื‘ื™ืจื•ืฉืœื™ื ืจืข"ื 2225/01 ื‘ืคื ื™: ื›ื‘ื•ื“ ื”ืฉื•ืคื˜ืช ื˜' ืฉื˜ืจืกื‘ืจื’-ื›ื”ืŸ ื”ืžื‘ืงืฉืช: ืฉื™ืจื•ืชื™ ื‘ืจื™ืื•ืช ื›ืœืœื™ืช ื ื’ื“ ื”ืžืฉื™ื‘ ื” : ื—ื ื™ืชื” ืžื™ื™ื˜ืœืก, ืขื•"ื“ ื‘ืงืฉืช ืจืฉื•ืช ืขืจืขื•ืจ ืขืœ ื”ื—ืœื˜ืช ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืžื—ื•ื–ื™ ื‘ืชืœ-ืื‘ื™ื‘-ื™ืคื• ืžื™ื•ื 21.2.01 ื‘ื”"ืค 11571/99 ื•ื”"ืค 11243/99 ืฉื ื™ืชื ื” ืขืœ ื™ื“ื™ ื›ื‘ื•ื“ ื”ืฉื•ืคื˜ ื' ืกื˜ืจืฉื ื•ื‘ ื”ื—ืœื˜ื” 1. ื”ื•ื—ืœื˜ ืฉื”ื‘ืงืฉื” ืžืฆืจื™ื›ื” ืชืฉื•ื‘ื”. 2. ื”ืžืฉ๏ฟฝ๏ฟฝื‘ื” ืชื’ื™ืฉ ืชืฉื•ื‘ืชื” ืœื‘ืงืฉื” ื‘ืชื•ืš 15 ื™ืžื™ื ืžืžื•ืขื“ ื”ื”ืžืฆืื”. 3. ืขืœ ื ื•ืกื— ื”ืชืฉื•ื‘ื” ื™ื—ื•ืœื• ื”ื•ืจืื•ืชื™ื” ืฉืœ ืชืงื ื” 406(ื‘) ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984-. 4. ื”ืชืฉื•ื‘ื” ืชื•ื’ืฉ ื‘ืžืงื‘ื™ืœ, ื”ืŸ ืœื‘ื™ืช-ืžืฉืคื˜ ื–ื”, ื•ื”ืŸ ื‘ืžื™ืฉืจื™ืŸ ืœืžื‘ืงืฉืช. 5. ื‘ืชืฉื•ื‘ื” ืชื™ื›ืœืœ ื”ืชื™ื™ื—ืกื•ืช ืœืืคืฉืจื•ืช ืฉื‘ื™ืช-ื”ืžืฉืคื˜ ื™ื‘ืงืฉ ืœืคืขื•ืœ ืขืœ-ืคื™ ืกืžื›ื•ืชื• ืœืคื™ ืชืงื ื” 410 ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984-. ืžืชื‘ืงืฉืช ื”ืชื™ื™ื—ืกื•ืช ืœืฉืืœื” ืื ื‘ืžืงืจื” ื›ื–ื” ื ื™ืชืŸ ื™ื”ื™ื” ืœืจืื•ืช ื‘ื“ื‘ืจื™ ื”ืชื’ื•ื‘ื” ืกื™ื›ื•ืžื™ื ื‘ื›ืชื‘. ื”ืขื“ืจ ื”ืชื™ื™ื—ืกื•ืช ื›ืžื•ื”ื• ื›ื”ืกื›ืžื”. ื”ืขื“ืจ ืชื’ื•ื‘ื” ื›ืžื•ื”ื• ื›ืื™-ื”ืชื™ื™ืฆื‘ื•ืช, ืขืœ ื”ื›ืจื•ืš ื‘ื›ืš. ื ื™ืชื ื” ื”ื™ื•ื, ื™"ื’ ื‘ืกื™ื•ื•ืŸ ืชืฉืก"ื (4.6.01). ืฉ ื• ืค ื˜ ืช _________________ ื”ืขืชืง ืžืชืื™ื ืœืžืงื•ืจ 01022250. J01 ื ื•ืกื— ื–ื” ื›ืคื•ืฃ ืœืฉื™ื ื•ื™ื™ ืขืจื™ื›ื” ื˜ืจื ืคืจืกื•ืžื• ื‘ืงื•ื‘ืฅ ืคืกืงื™ ื”ื“ื™ืŸ ืฉืœ ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ื‘ื™ืฉืจืืœ. ืฉืžืจื™ื”ื• ื›ื”ืŸ - ืžื–ื›ื™ืจ ืจืืฉื™ ื‘ื‘ื™ืช ื”ืžืฉืคื˜ ื”ืขืœื™ื•ืŸ ืคื•ืขืœ ืžืจื›ื– ืžื™ื“ืข, ื˜ืœ' 02-6750444",
65
+
66
+ 'question': "ืื™ืœื• ืกืขื™ืคื™ื\ื—ื•ืงื™ื\ืชืงื ื•ืช ืžืฆื•ื™ื™ื ื™ื ื‘ืžืกืžืš ?"
67
+ })
68
+
69
+ print(predictions)
70
+ # output:
71
+ # {'score': 0.9999890327453613, 'start': 0, 'end': 7, 'answer': 'ืชืงื ื” 406(ื‘) ืœืชืงื ื•ืช ืกื“ืจ ื”ื“ื™ืŸ ื”ืื–ืจื—ื™, ืชืฉืž"ื“1984'}
72
+ ```
73
+
74
+ ### About Me
75
+ Created by Shay Doner.
76
+ This is my final project as part of intelligent systems M.Sc studies at Afeka College in Tel-Aviv.
77
+ For more cooperation, please contact email:
78
  shay681@gmail.com