Token Classification
Transformers
ONNX
Safetensors
Portuguese
bert
pii
lgpd
privacy
anonymization
ner
brazilian-portuguese
Instructions to use brennocm/PII-BR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brennocm/PII-BR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="brennocm/PII-BR")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("brennocm/PII-BR") model = AutoModelForTokenClassification.from_pretrained("brennocm/PII-BR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from brennocm/PII-BR: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/brennocm/PII-BR/resolve/main/config.json
- Command line
-
hf download hf://brennocm/PII-BR/config.json
-
curl -L -o config.json https://huggingface.co/brennocm/PII-BR/resolve/main/config.json
1.67 kB
| { | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": null, | |
| "classifier_dropout": null, | |
| "directionality": "bidi", | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-NOME", | |
| "2": "I-NOME", | |
| "3": "B-CPF", | |
| "4": "I-CPF", | |
| "5": "B-CNPJ", | |
| "6": "I-CNPJ", | |
| "7": "B-RG", | |
| "8": "I-RG", | |
| "9": "B-TELEFONE", | |
| "10": "I-TELEFONE", | |
| "11": "B-EMAIL", | |
| "12": "I-EMAIL", | |
| "13": "B-ENDERECO", | |
| "14": "I-ENDERECO", | |
| "15": "B-CEP", | |
| "16": "I-CEP", | |
| "17": "B-DATA_NASC", | |
| "18": "I-DATA_NASC" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "is_decoder": false, | |
| "label2id": { | |
| "B-CEP": 15, | |
| "B-CNPJ": 5, | |
| "B-CPF": 3, | |
| "B-DATA_NASC": 17, | |
| "B-EMAIL": 11, | |
| "B-ENDERECO": 13, | |
| "B-NOME": 1, | |
| "B-RG": 7, | |
| "B-TELEFONE": 9, | |
| "I-CEP": 16, | |
| "I-CNPJ": 6, | |
| "I-CPF": 4, | |
| "I-DATA_NASC": 18, | |
| "I-EMAIL": 12, | |
| "I-ENDERECO": 14, | |
| "I-NOME": 2, | |
| "I-RG": 8, | |
| "I-TELEFONE": 10, | |
| "O": 0 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "output_past": true, | |
| "pad_token_id": 0, | |
| "pooler_fc_size": 768, | |
| "pooler_num_attention_heads": 12, | |
| "pooler_num_fc_layers": 3, | |
| "pooler_size_per_head": 128, | |
| "pooler_type": "first_token_transform", | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.23.0", | |
| "type_vocab_size": 2, | |
| "use_cache": false, | |
| "vocab_size": 29794 | |
| } | |