SAVRN
Search Contact SAVRN

Open-weight model · Token classification

bert-portuguese-ner

by Luís Filipe Cunha lfcc/bert-portuguese-ner

This model is a fine-tuned version of neuralmind/bert-base-portuguese-cased It achieves the following results on the evaluation set: This model was fine-tunned on token classification task (NER) on Portuguese archival documents.

Parameters
Context512
Weights433.5 MB
Licensemit
AccessOpen weights
Monthly Downloads1M

Model Card

By Luís Filipe Cunha, published under mit, revision 62e38bcb90c1.

This model is a fine-tuned version of neuralmind/bert-base-portuguese-cased It achieves the following results on the evaluation set: This model was fine-tunned on token classification task (NER) on Portuguese archival documents. The annotated labels are: Date, Profession, Person, Place, Organization All the training and evaluation data is available at: http://ner.epl.di.uminho.pt/ The following hyperparameters were used during training: - learningrate: 2e-05 - trainbatchsize: 16 - evalbatchsize: 16 - lrschedulertype: linear - numepochs: 4 - Transformers 4.10.0.dev0 - Pytorch 1.9.0+cu111 - Datasets 1.10.2 - Tokenizers 0.10.3

Read Luís Filipe Cunha's full model card

This model is a fine-tuned version of neuralmind/bert-base-portuguese-cased It achieves the following results on the evaluation set: - Loss: 0.1140 - Precision: 0.9147 - Recall: 0.9483 - F1: 0.9312 - Accuracy: 0.9700

Model description

This model was fine-tunned on token classification task (NER) on Portuguese archival documents. The annotated labels are: Date, Profession, Person, Place, Organization

Datasets

All the training and evaluation data is available at: http://ner.epl.di.uminho.pt/

Training hyperparameters

The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 4

Training results

Training Loss Epoch Step Validation Loss Precision Recall F1 Accuracy
No log 1.0 192 0.1438 0.8917 0.9392 0.9148 0.9633
0.2454 2.0 384 0.1222 0.8985 0.9417 0.9196 0.9671
0.0526 3.0 576 0.1098 0.9150 0.9481 0.9312 0.9698
0.0372 4.0 768 0.1140 0.9147 0.9483 0.9312 0.9700

Framework versions

  • Transformers 4.10.0.dev0
  • Pytorch 1.9.0+cu111
  • Datasets 1.10.2
  • Tokenizers 0.10.3

Citation


@Article{make4010003,
AUTHOR = {Cunha, Luís Filipe and Ramalho, José Carlos},
TITLE = {NER in Archival Finding Aids: Extended},
JOURNAL = {Machine Learning and Knowledge Extraction},
VOLUME = {4},
YEAR = {2022},
NUMBER = {1},
PAGES = {42--65},
URL = {https://www.mdpi.com/2504-4990/4/1/3},
ISSN = {2504-4990},
ABSTRACT = {The amount of information preserved in Portuguese archives has increased over the years. These documents represent a national heritage of high importance, as they portray the country’s history. Currently, most Portuguese archives have made their finding aids available to the public in digital format, however, these data do not have any annotation, so it is not always easy to analyze their content. In this work, Named Entity Recognition solutions were created that allow the identification and classification of several named entities from the archival finding aids. These named entities translate into crucial information about their context and, with high confidence results, they can be used for several purposes, for example, the creation of smart browsing tools by using entity linking and record linking techniques. In order to achieve high result scores, we annotated several corpora to train our own Machine Learning algorithms in this context domain. We also used different architectures, such as CNNs, LSTMs, and Maximum Entropy models. Finally, all the created datasets and ML models were made available to the public with a developed web platform, NER@DI.},
DOI = {10.3390/make4010003}
}




Configuration

Architecture
BertForTokenClassification
Context length (tokens)
512
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
29,794
Stored precision
float32
Model type
bert

Identity and Version

Repository
lfcc/bert-portuguese-ner
Publisher
Luís Filipe Cunha
Task
Token classification
Modality
Text
Library
transformers
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
62e38bcb90c1b0e8e520aa73d73afe67cae67c7c
First published
2022-03-02
Last updated
2024-10-11

Files and Weights

12 files, 434.1 MB in total. The weights are 2 files totalling 433.5 MB in bin.

Weights2 files · 433.5 MB
Configuration2 files · 1.5 KB
Tokenizer3 files · 648.5 KB
Documentation1 file · 3.6 KB
Other2 files · 10.9 KB
Repository2 files · 1.2 KB
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights433.4 MB 4db77fd2e094
training_args.binWeights2.8 KB 690bcf693caa
config.jsonConfiguration1.4 KB
special_tokens_map.jsonConfiguration112 B
README.mdDocumentation3.6 KB
runs/Jan18_17-09-47_DESKTOP-GRC5L8E/1642526051.624885/events.out.tfevents.1642526051.DESKTOP-GRC5L8E.7444.1Other4.3 KB 04b17c461651
runs/Jan18_17-09-47_DESKTOP-GRC5L8E/events.out.tfevents.1642526051.DESKTOP-GRC5L8E.7444.0Other6.5 KB 47829cbffa3e
.gitattributesRepository1.2 KB
.gitignoreRepository13 B
tokenizer.jsonTokenizer438.5 KB
tokenizer_config.jsonTokenizer544 B
vocab.txtTokenizer209.5 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
433.5 MB
Download from Luís Filipe Cunha

Released by Luís Filipe Cunha through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published433.5 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About bert-portuguese-ner

Can I use bert-portuguese-ner commercially?

Yes. bert-portuguese-ner is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is bert-portuguese-ner's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Token classification

stanford-deidentifier-base

Stanford AIMI

Stanford de-identifier was trained on a variety of radiology and biomedical documents with the goal of automatising the de-identification process while reaching satisfactory accuracy for use in production. Manuscript in-proceedings. These model weights are the recommended ones among all available deidentifier weights. This work was supported in part by the Medical Imaging and Data Resource Center (MIDRC), which is funded by the National Institute of Biomedical Imaging and Bioengineering (NIBIB) of the National Institutes of Health under contract 75N92020D00021 and through The Advanced Research Projects Agency for Health (ARPA-H)

Open weights mit 512 tokens transformers

Model · Token classification

privacy-filter-nemotron-GGUF

LocalAI-io

GGUF conversion of OpenMed/privacy-filter-nemotron, a fine-grained PII token-classification model — a fine-tune of openai/privacy-filter on the nvidia/Nemotron-PII dataset. It labels every token with a BIOES tag over 55 PII categories (221 classes) in a single forward pass, then decodes coherent spans with a constrained Viterbi procedure — so it can be served locally with no Python as the encoder/NER tier of a PII redactor. Where the base openai/privacy-filter covers 8 coarse categories, this fine-tune trades multilingual breadth for category depth: 55 fine-grained English categories (first/last name, government IDs, financial, healthcare, vehicle, digital, …). For the full model…

Open weights apache-2.0 gguf

Model · Token classification

punctuate-all

KREDOR

This is based on Oliver Guhr's work. The difference is that it is a finetuned xlm-roberta-base instead of an xlm-roberta-large and on twelve languages instead of four. The languages are: English, German, French, Spanish, Bulgarian, Italian, Polish, Dutch, Czech, Portugese, Slovak, Slovenian. precision recall f1-score support accuracy 0.98 84425503 macro avg 0.83 0.74 0.77 84425503 weighted avg 0.98 0.98 0.98 84425503

Open weights mit 514 tokens transformers

Model · Token classification

privacy-filter-multilingual-GGUF

LocalAI-io

GGUF conversion of OpenMed/privacy-filter-multilingual, a multilingual PII token-classification model (a fine-tune of openai/privacy-filter). It labels every token with a BIOES tag over 54 PII categories (217 classes) across 16 languages, so it can be served locally with no Python as the encoder/NER tier of a PII redactor. For the full model description, label space, evaluation, limitations, and citations, see the source model card — this card only covers the GGUF packaging and how to run it. This GGUF uses a custom architecture, openai-privacy-filter, that is not (yet) part of 1. privacy-filter.cpp (recommended) — a small standalone GGML engine for exactly this model family, on stock…

Open weights apache-2.0 gguf

Model · Token classification

unbiased-toxic-roberta-onnx

Protect AI

This model is a conversion of unitary/unbiased-toxic-roberta to ONNX format using the Optimum library. Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary. The huggingface models currently give different results to the detoxify library (see issue here). All challenges have a toxicity label. The toxicity labels represent the aggregate ratings of up to 10 annotators according the following schema: - Very Toxic (a very hateful, aggressive, or disrespectful comment that is very likely to make you leave a discussion or give up on sharing…

Open weights apache-2.0 514 tokens transformers

Model · Token classification

ner-english

Flair

This is the standard 4-class NER model for English that ships with Flair. Based on Flair embeddings and LSTM-CRF. So, the entities "George Washington" (labeled as a person) and "Washington" (labeled as a location) are found in the sentence "George Washington went to Washington". The following Flair script was used to train this model: Please cite the following paper when using this model. The Flair issue tracker is available here.

Open weights flair