Views
No views yet
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.1from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
2
3pipeline = TranslationPipeline(
4model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_en"),
5tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_en", do_lower_case=False,
6 skip_special_tokens=True),
7 device=0
8)
9
10en_text = "Appointment of members of the Conciliation Body instituted by Commission Decision 94/442/EC of 1 July 1994 setting up a conciliation procedure in the context of the clearance of the accounts of the European Agricultural Guidance and Guarantee Fund (EAGGF) Guarantee Section (2006/C 193/09) (1) The Commission has renewed the term of office of: Mr José Luis SAENZ GARCIA-BAQUERO (ES) (from 1 August 2006 to 31 July 2007). (2) The Commission has appointed as members: - Mr Peter BAUMANN (DA) (from 1 August 2006 to 31 July 2009); - Mr Daniel PERRIN (FR) (from 1 August 2006 to 31 July 2009). (3) The Commission has appointed as substitute members: - Mr Robert BURIAN (A) (from 1 August 2006); - Mr Eduardo DIEZ PATIER (ES) (from 1 August 2006). --------------------------------------------------"
11
12pipeline([en_text], max_length=512)| Model | F1 score |
|---|---|
| legal_t5_small_cls_en | 0.6247 |
Created by Ahmed Elnaggar/@Elnaggar_AI | LinkedIn