
# legal_t5_small_summ_cs model

Model for Summarization of legal text written in Cszech. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.


## Model description

legal_t5_small_summ_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.

## Intended uses & limitations

The model could be used for summarization of legal texts written in Cszech.

### How to use

Here is how to use this model to summarize legal text written in Cszech in PyTorch:

```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline

pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_summ_cs"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_summ_cs", do_lower_case=False, 
                                            skip_special_tokens=True),
    device=0
)

cs_text = "(2006/C 67/15) (Text s významem pro EHP) Dne 10. března 2006 se Komise rozhodla nevznést námitky proti výše uvedenému spojení a prohlásit ho za slučitelné se společným trhem. Toto rozhodnutí je založeno na čl. 6 odst. 1 písm. b) nařízení Rady (ES) č. 139/2004. Celý text rozhodnutí je přístupný pouze v angličtině a bude uveřejněn poté, co bude zbaven obchodního tajemství, které může případně obsahovat. Text bude dosažitelný: - na webové stránce Europa – hospodářská soutěž (http://europa.eu.int/comm/competition/mergers/cases/). Tato webová stránka umožňuje vyhledat jednotlivá rozhodnutí o spojení, a to včetně společnosti, čísla případu, data a indexu odvětví hospodářství. - v elektronické podobě na webové stránce EUR-Lex, pod dokumentem č. 32006M4093. EUR-Lex umožňuje přístup k Evropskému právu přes Internet. (http://europa.eu.int/eur-lex/lex) -------------------------------------------------- "

pipeline([cs_text], max_length=512)
```

## Training data

The legal_t5_small_summ_cs model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 18 Thousand texts.

## Training procedure

The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing

An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.

### Pretraining



## Evaluation results

When the model is used for classification test dataset, achieves the following results:

Test results :

| Model | Rouge1  | Rouge2 | Rouge Lsum |
|:-----:|:-----:|:-----:|:-----:|
|   legal_t5_small_summ_cs | 75.86|65.82 |74.95|


### BibTeX entry and citation info

> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)

{"language": "Cszech", "tags": ["summarization Cszech model"], "datasets": ["jrc-acquis"], "widget": [{"text": "(2006/C 67/15) (Text s v\u00fdznamem pro EHP) Dne 10. b\u0159ezna 2006 se Komise rozhodla nevzn\u00e9st n\u00e1mitky proti v\u00fd\u0161e uveden\u00e9mu spojen\u00ed a prohl\u00e1sit ho za slu\u010diteln\u00e9 se spole\u010dn\u00fdm trhem. Toto rozhodnut\u00ed je zalo\u017eeno na \u010dl. 6 odst. 1 p\u00edsm. b) na\u0159\u00edzen\u00ed Rady (ES) \u010d. 139/2004. Cel\u00fd text rozhodnut\u00ed je p\u0159\u00edstupn\u00fd pouze v angli\u010dtin\u011b a bude uve\u0159ejn\u011bn pot\u00e9, co bude zbaven obchodn\u00edho tajemstv\u00ed, kter\u00e9 m\u016f\u017ee p\u0159\u00edpadn\u011b obsahovat. Text bude dosa\u017eiteln\u00fd: - na webov\u00e9 str\u00e1nce Europa \u2013 hospod\u00e1\u0159sk\u00e1 sout\u011b\u017e (http://europa.eu.int/comm/competition/mergers/cases/). Tato webov\u00e1 str\u00e1nka umo\u017e\u0148uje vyhledat jednotliv\u00e1 rozhodnut\u00ed o spojen\u00ed, a to v\u010detn\u011b spole\u010dnosti, \u010d\u00edsla p\u0159\u00edpadu, data a indexu odv\u011btv\u00ed hospod\u00e1\u0159stv\u00ed. - v elektronick\u00e9 podob\u011b na webov\u00e9 str\u00e1nce EUR-Lex, pod dokumentem \u010d. 32006M4093. EUR-Lex umo\u017e\u0148uje p\u0159\u00edstup k Evropsk\u00e9mu pr\u00e1vu p\u0159es Internet. (http://europa.eu.int/eur-lex/lex) -------------------------------------------------- "}]}
transformers pytorch jax t5 text2text-generation summarization Cszech model dataset:jrc-acquis autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #jax #t5 #text2text-generation #summarization Cszech model #dataset-jrc-acquis #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

legal\_t5\_small\_summ\_cs model
================================


Model for Summarization of legal text written in Cszech. It was first released in
this repository. This model is trained on three parallel corpus from jrc-acquis.


Model description
-----------------


legal\_t5\_small\_summ\_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.


Intended uses & limitations
---------------------------


The model could be used for summarization of legal texts written in Cszech.


### How to use


Here is how to use this model to summarize legal text written in Cszech in PyTorch:


Training data
-------------


The legal\_t5\_small\_summ\_cs model was trained on JRC-ACQUIS dataset consisting of 18 Thousand texts.


Training procedure
------------------


The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.


### Preprocessing


An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.


### Pretraining


Evaluation results
------------------


When the model is used for classification test dataset, achieves the following results:


Test results :



### BibTeX entry and citation info



> 
> Created by Ahmed Elnaggar/@Elnaggar\_AI | LinkedIn
> 
> 
> 



### How to use


Here is how to use this model to summarize legal text written in Cszech in PyTorch:


Training data
-------------


The legal\_t5\_small\_summ\_cs model was trained on JRC-ACQUIS dataset consisting of 18 Thousand texts.


Training procedure
------------------


The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training. ### Preprocessing


An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model. ### Pretraining


Evaluation results
------------------


When the model is used for classification test dataset, achieves the following results:


Test results : ### BibTeX entry and citation info



> 
> Created by Ahmed Elnaggar/@Elnaggar\_AI | LinkedIn
> 
> 
>
TAGS
#transformers #pytorch #jax #t5 #text2text-generation #summarization Cszech model #dataset-jrc-acquis #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 ### How to use


Here is how to use this model to summarize legal text written in Cszech in PyTorch:


Training data
-------------


The legal\_t5\_small\_summ\_cs model was trained on JRC-ACQUIS dataset consisting of 18 Thousand texts.


Training procedure
------------------


The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training. ### Preprocessing


An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model. ### Pretraining


Evaluation results
------------------


When the model is used for classification test dataset, achieves the following results:


Test results : ### BibTeX entry and citation info



> 
> Created by Ahmed Elnaggar/@Elnaggar\_AI | LinkedIn
> 
> 
>
passage: TAGS
#transformers #pytorch #jax #t5 #text2text-generation #summarization Cszech model #dataset-jrc-acquis #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
### How to use


Here is how to use this model to summarize legal text written in Cszech in PyTorch:


Training data
-------------


The legal\_t5\_small\_summ\_cs model was trained on JRC-ACQUIS dataset consisting of 18 Thousand texts.


Training procedure
------------------


The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.### Preprocessing


An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.### Pretraining


Evaluation results
------------------


When the model is used for classification test dataset, achieves the following results:


Test results :### BibTeX entry and citation info



> 
> Created by Ahmed Elnaggar/@Elnaggar\_AI | LinkedIn
> 
> 
>