Mainak Manna commited on
Commit
ff290b5
1 Parent(s): 4152a1a

First version of the model

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ language: Cszech
4
+ tags:
5
+ - classification Cszech model
6
+ datasets:
7
+ - jrc-acquis
8
+ widget:
9
+ - text: "Jmenování členů smírčí komise zřízené rozhodnutím Komise ze dne 1. července 1994 č. 94/442/ES o zavedení smírčího řízení v rámci schválení účetní závěrky záruční sekce Evropského zemědělského orientačního a záručního fondu (EZOZF) (2006/C 193/09) (1) Komise obnovila mandát: pana José Luis SAENZ GARCIA-BAQUERA (ES) (od 1. srpna 2006 do 31. července 2007). (2) Komise jmenovala členy: - pana Petera BAUMANNA (DA) (od 1. srpna 2006 do 31. července 2009); - pana Daniela PERRINA (FR) (od 1. srpna 2006 do 31. července 2009). (3) Komise jmenovala náhradníky: - pana Roberta BURIANA (A) (od 1. srpna 2006); - pana Eduardo DIEZ PATIERA (ES) (od 1. srpna 2006). --------------------------------------------------"
10
+
11
+ ---
12
+
13
+ # legal_t5_small_cls_cs model
14
+
15
+ Model for classification of legal text written in Cszech. It was first released in
16
+ [this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
17
+
18
+
19
+ ## Model description
20
+
21
+ legal_t5_small_cls_cs is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
22
+
23
+ ## Intended uses & limitations
24
+
25
+ The model could be used for classification of legal texts written in Cszech.
26
+
27
+ ### How to use
28
+
29
+ Here is how to use this model to classify legal text written in Cszech in PyTorch:
30
+
31
+ ```python
32
+ from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
33
+
34
+ pipeline = TranslationPipeline(
35
+ model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_cs"),
36
+ tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_cs", do_lower_case=False,
37
+ skip_special_tokens=True),
38
+ device=0
39
+ )
40
+
41
+ cs_text = "Jmenování členů smírčí komise zřízené rozhodnutím Komise ze dne 1. července 1994 č. 94/442/ES o zavedení smírčího řízení v rámci schválení účetní závěrky záruční sekce Evropského zemědělského orientačního a záručního fondu (EZOZF) (2006/C 193/09) (1) Komise obnovila mandát: pana José Luis SAENZ GARCIA-BAQUERA (ES) (od 1. srpna 2006 do 31. července 2007). (2) Komise jmenovala členy: - pana Petera BAUMANNA (DA) (od 1. srpna 2006 do 31. července 2009); - pana Daniela PERRINA (FR) (od 1. srpna 2006 do 31. července 2009). (3) Komise jmenovala náhradníky: - pana Roberta BURIANA (A) (od 1. srpna 2006); - pana Eduardo DIEZ PATIERA (ES) (od 1. srpna 2006). --------------------------------------------------"
42
+
43
+ pipeline([cs_text], max_length=512)
44
+ ```
45
+
46
+ ## Training data
47
+
48
+ The legal_t5_small_cls_cs model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 13 Thousand texts.
49
+
50
+ ## Training procedure
51
+
52
+ ### Preprocessing
53
+
54
+ ### Pretraining
55
+ An unigram model with 88M parameters is trained over the complete parallel corpus to get the vocabulary (with byte pair encoding), which is used with this model.
56
+
57
+
58
+ ## Evaluation results
59
+
60
+ When the model is used for classification test dataset, achieves the following results:
61
+
62
+ Test results :
63
+
64
+ | Model | F1 score |
65
+ |:-----:|:-----:|
66
+ | legal_t5_small_cls_cs | 0.6297|
67
+
68
+
69
+ ### BibTeX entry and citation info