Instructions to use PlanTL-GOB-ES/RoBERTalex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PlanTL-GOB-ES/RoBERTalex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="PlanTL-GOB-ES/RoBERTalex")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("PlanTL-GOB-ES/RoBERTalex") model = AutoModelForMaskedLM.from_pretrained("PlanTL-GOB-ES/RoBERTalex", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Asier Gutiérrez Fandiño commited on
Commit ·
38cc31e
1
Parent(s): 92b420c
Initial commit
Browse filesFiles changed (9)
- .gitattributes+1
- README.mdAdded+30
- config.jsonAdded+25
- dict.txtAdded
- merges.txtAdded
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+1
- tokenizer_config.jsonAdded+1
- vocab.jsonAdded
24 unmodified lines25262724 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text24 unmodified lines2526272824 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textpytorch_model.bin filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930---language:- eslicense: apache-2.0tags:- legal- spanishdatasets:- legal_ES- temu_legal metrics:- pplwidget:- text: "La ley fue <mask> finalmente." - text: "El Tribunal <mask> desestimó el recurso de amparo."- text: "Hay base legal dentro del marco <mask> actual."
---# Spanish Legal-domain RoBERTa
There are two main models made specifically for the Spanish language, the BETO model and a GPT-2. There is also a multilingual BERT (mBERT) that is often used as it might be better sometimes.
Both BETO and GPT-2 models for Spanish have been trained with rather low resources, 4GB and 3GB of data respectively. The data used for training both models might be various but the amount is not enough to cover all domains. Furthermore, training a BERT-like domain-specific model is better as it effectively covers the vocabulary and understands the legal jargon. We present our model trained on 9GB that are specifically of the legal domain.
## Citing ```TBA```
For more information visit our [GitHub repository](https://github.com/PlanTL-SANIDAD/lm-legal-es)12345678910111213141516171819202122232425{
"architectures": [
"RobertaForMaskedLM"
],
"attention_probs_dropout_prob": 0.1,
"bos_token_id": 0,
"eos_token_id": 2,
"gradient_checkpointing": false,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 514,
"model_type": "roberta",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"pad_token_id": 1,
"position_embedding_type": "absolute",
"transformers_version": "4.4.2",
"type_vocab_size": 1,
"use_cache": true,
"vocab_size": 52000
}123version https://git-lfs.github.com/spec/v1oid sha256:7fd3da1f60a3d1212338f5b79c020681ac303495ba1b9aebf035b70db623fa81size 5044226711{"bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}1{"unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": true, "errors": "replace", "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "max_len": 512, "special_tokens_map_file": null, "name_or_path": "D:\\BSC\\corpus-utils-lm\\output\\model-ready_output\\test-2021-06-09-0211-139b-008b\\train_tokenizer_output\\train-tokenizer-2021-06-09-0231-139b-4086"}.gitattributes+1
README.mdAdded+30
config.jsonAdded+25
dict.txtAdded
merges.txtAdded
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+1
tokenizer_config.jsonAdded+1
vocab.jsonAdded