shay681 commited on
Commit
33e3f5f
โ€ข
1 Parent(s): 74c70ec

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -3
README.md CHANGED
@@ -1,3 +1,69 @@
1
- ---
2
- license: unlicense
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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