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.
from transformers import AutoTokenizer # Or BertTokenizerfrom transformers import AutoModelForPreTraining # Or BertForPreTraining for loading pretraining headsfrom transformers import AutoModel # or BertModel, for BERT without pretraining heads
model = AutoModelForPreTraining.from_pretrained('neuralmind/bert-base-portuguese-cased')
tokenizer = AutoTokenizer.from_pretrained('neuralmind/bert-base-portuguese-cased', do_lower_case=False)
Masked language modeling prediction example
from transformers import pipeline
pipe = pipeline('fill-mask', model=model, tokenizer=tokenizer)
pipe('Tinha uma [MASK] no meio do caminho.')
# [{'score': 0.14287759363651276,# 'sequence': '[CLS] Tinha uma pedra no meio do caminho. [SEP]',# 'token': 5028,# 'token_str': 'pedra'},# {'score': 0.06213393807411194,# 'sequence': '[CLS] Tinha uma árvore no meio do caminho. [SEP]',# 'token': 7411,# 'token_str': 'árvore'},# {'score': 0.05515013635158539,# 'sequence': '[CLS] Tinha uma estrada no meio do caminho. [SEP]',# 'token': 5675,# 'token_str': 'estrada'},# {'score': 0.0299188531935215,# 'sequence': '[CLS] Tinha uma casa no meio do caminho. [SEP]',# 'token': 1105,# 'token_str': 'casa'},# {'score': 0.025660505518317223,# 'sequence': '[CLS] Tinha uma cruz no meio do caminho. [SEP]',# 'token': 3466,# 'token_str': 'cruz'}]
@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 neuralmind bert-base-portuguese-cased on huggingface.co
3.1M
Total runs
96.4K
24-hour runs
122.3K
3-day runs
431.9K
7-day runs
-304.0K
30-day runs
More Information About bert-base-portuguese-cased huggingface.co Model
More bert-base-portuguese-cased license Visit here:
bert-base-portuguese-cased huggingface.co is an AI model on huggingface.co that provides bert-base-portuguese-cased's model effect (), which can be used instantly with this neuralmind bert-base-portuguese-cased model. huggingface.co supports a free trial of the bert-base-portuguese-cased model, and also provides paid use of the bert-base-portuguese-cased. Support call bert-base-portuguese-cased model through api, including Node.js, Python, http.
bert-base-portuguese-cased huggingface.co is an online trial and call api platform, which integrates bert-base-portuguese-cased's modeling effects, including api services, and provides a free online trial of bert-base-portuguese-cased, you can try bert-base-portuguese-cased online for free by clicking the link below.
neuralmind bert-base-portuguese-cased online free url in huggingface.co:
bert-base-portuguese-cased is an open source model from GitHub that offers a free installation service, and any user can find bert-base-portuguese-cased on GitHub to install. At the same time, huggingface.co provides the effect of bert-base-portuguese-cased install, users can directly use bert-base-portuguese-cased installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
bert-base-portuguese-cased install url in huggingface.co: