Legal_BERTimbau Large is a fine-tuned BERT model based on
BERTimbau
Large.
"BERTimbau Base is a pretrained BERT model for Brazilian Portuguese that achieves state-of-the-art performances on three downstream NLP tasks: Named Entity Recognition, Sentence Textual Similarity and Recognizing Textual Entailment. It is available in two sizes: Base and Large.
The performance of Language Models can change drastically when there is a domain shift between training and test data. In order create a Portuguese Language Model adapted to a Legal domain, the original BERTimbau model was submitted to a fine-tuning stage where it was performed 1 "PreTraining" epoch over 30 000 legal Portuguese Legal documents available online.
Available models
Model
Arch.
#Layers
#Params
rufimelo/Legal-BERTimbau-base
BERT-Base
12
110M
rufimelo/Legal-BERTimbau-large
BERT-Large
24
335M
Usage
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("rufimelo/Legal-BERTimbau-base")
model = AutoModelForMaskedLM.from_pretrained("rufimelo/Legal-BERTimbau-base")
Masked language modeling prediction example
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("rufimelo/Legal-BERTimbau-base")
model = AutoModelForMaskedLM.from_pretrained("rufimelo/Legal-BERTimbau-base")
pipe = pipeline('fill-mask', model=model, tokenizer=tokenizer)
pipe('O advogado apresentou [MASK] para o juíz')
# [{'score': 0.5034703612327576, #'token': 8190, #'token_str': 'recurso', #'sequence': 'O advogado apresentou recurso para o juíz'}, #{'score': 0.07347951829433441, #'token': 21973, #'token_str': 'petição', #'sequence': 'O advogado apresentou petição para o juíz'}, #{'score': 0.05165359005331993, #'token': 4299, #'token_str': 'resposta', #'sequence': 'O advogado apresentou resposta para o juíz'}, #{'score': 0.04611917585134506,#'token': 5265, #'token_str': 'exposição', #'sequence': 'O advogado apresentou exposição para o juíz'}, #{'score': 0.04068068787455559, #'token': 19737, 'token_str': #'alegações', #'sequence': 'O advogado apresentou alegações para o juíz'}]
If you use this work, please cite BERTimbau's work:
@inproceedings{souza2020bertimbau,
author = {F{\'a}bio Souza and
Rodrigo Nogueira and
Roberto Lotufo},
title = {{BERT}imbau: pretrained {BERT} models for {B}razilian {P}ortuguese},
booktitle = {9th Brazilian Conference on Intelligent Systems, {BRACIS}, Rio Grande do Sul, Brazil, October 20-23 (to appear)},
year = {2020}
}
Runs of rufimelo Legal-BERTimbau-base on huggingface.co
3.1K
Total runs
0
24-hour runs
-94
3-day runs
-2.9K
7-day runs
-2.1K
30-day runs
More Information About Legal-BERTimbau-base huggingface.co Model
Legal-BERTimbau-base huggingface.co is an AI model on huggingface.co that provides Legal-BERTimbau-base's model effect (), which can be used instantly with this rufimelo Legal-BERTimbau-base model. huggingface.co supports a free trial of the Legal-BERTimbau-base model, and also provides paid use of the Legal-BERTimbau-base. Support call Legal-BERTimbau-base model through api, including Node.js, Python, http.
Legal-BERTimbau-base huggingface.co is an online trial and call api platform, which integrates Legal-BERTimbau-base's modeling effects, including api services, and provides a free online trial of Legal-BERTimbau-base, you can try Legal-BERTimbau-base online for free by clicking the link below.
rufimelo Legal-BERTimbau-base online free url in huggingface.co:
Legal-BERTimbau-base is an open source model from GitHub that offers a free installation service, and any user can find Legal-BERTimbau-base on GitHub to install. At the same time, huggingface.co provides the effect of Legal-BERTimbau-base install, users can directly use Legal-BERTimbau-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Legal-BERTimbau-base install url in huggingface.co: