This model is a fine-tuned version of monologg/koelectra-small-v3-discriminator on an unknown dataset. It achieves the following results on the evaluation set: 태깅 시스템: BIO 시스템 한국정보통신기술협회(TTA) 대분류 기준을 따르는 15 가지의 태그셋 You can use this model with Transformers pipeline for NER. 개체명 인식(NER) 모델 학습 데이터 셋 - https://corpus.korean.go.kr/request/reausetMain.do The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 64 - evalbatchsize: 64 - lrschedulertype: linear - lrschedulerwarmupsteps: 15151 - numepochs: 20 - mixedprecisiontraining: Native AMP - Transformers 4.27.4 - Pytorch 2.0.0+cu118 - Datasets 2.11.0 - Tokenizers 0.13.3
Open-weight model · Token classification
bert-small-pii-detection
by Gravitee.io gravitee-io/bert-small-pii-detection
Token-classification model for PII detection, fine-tuned from prajjwal1/bert-small on Detect personally identifiable information (PII) spans in english text.
Runs On
What it takes to serve bert-small-pii-detection (29M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.0 GB | 0.0 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.0 GB | 0.0 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.
Model Card
By Gravitee.io, published under apache-2.0, revision f8c27a85c51c.
Token-classification model for PII detection, fine-tuned from prajjwal1/bert-small on
gravitee-io/pii-detection-dataset.
Label Set
AGE, COORDINATE, CREDIT_CARD, DATE_TIME, EMAIL_ADDRESS, FINANCIAL, HONORIFIC, IBAN_CODE, IMEI,
IP_ADDRESS, LOCATION, MAC_ADDRESS, NRP, ORGANIZATION, PASSWORD, PERSON, PHONE_NUMBER,
TITLE, URL, US_BANK_NUMBER, US_DRIVER_LICENSE, US_ITIN, US_LICENSE_PLATE, US_PASSPORT, US_SSN
How to Use
Quick start (pipeline)
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
repo = "gravitee-io/bert-small-pii-detection"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForTokenClassification.from_pretrained(repo)
pipe = pipeline("token-classification", model=model, tokenizer=tok, aggregation_strategy="simple")
text = "Contact John Smith at [email protected]"
pipe(text)
ONNX
pip install transformers onnxruntime huggingface_hub
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer, AutoConfig
import onnxruntime as ort
model_id = "gravitee-io/bert-small-pii-detection"
tokenizer = AutoTokenizer.from_pretrained(model_id)
id2label = AutoConfig.from_pretrained(model_id).id2label
session = ort.InferenceSession(hf_hub_download(model_id, "model.quant.onnx"))
text = "Contact John Smith at [email protected]"
enc = tokenizer(text, return_tensors="np")
inputs = {"input_ids": enc["input_ids"], "attention_mask": enc["attention_mask"]}
logits = session.run(None, inputs)[0][0]
tokens = tokenizer.convert_ids_to_tokens(enc["input_ids"][0])
labels = [id2label[i] for i in logits.argmax(-1)]
for tok, label in zip(tokens, labels):
print(f"{tok:<20} {label}")
Intended use
Configuration
- Architecture
- BertForTokenClassification
- Context length (tokens)
- 512
- Layers
- 4
- Hidden size
- 512
- Feed-forward size
- 2,048
- Attention heads
- 8
- Vocabulary size
- 30,522
- Model type
- bert
Identity and Version
- Repository
- gravitee-io/bert-small-pii-detection
- Publisher
- Gravitee.io
- Task
- Token classification
- Modality
- Text
- Library
- Not stated by the source
- Parameters
- 29M parameters
- Languages
- en
- Revision
- f8c27a85c51c0168f07b9dcf00265bf0a4097939
- First published
- 2025-09-17
- Last updated
- 2026-05-21
Files and Weights
10 files, 258.0 MB in total. The weights are 3 files totalling 257.0 MB in onnx, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.onnx | Weights | 114.2 MB | 5fc1642b7400 |
| model.quant.onnx | Weights | 28.7 MB | b227845ff498 |
| model.safetensors | Weights | 114.1 MB | a6319abf8718 |
| config.json | Configuration | 3.0 KB | — |
| special_tokens_map.json | Configuration | 695 B | — |
| README.md | Documentation | 13.5 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
| tokenizer.json | Tokenizer | 711.4 KB | — |
| tokenizer_config.json | Tokenizer | 1.4 KB | — |
| vocab.txt | Tokenizer | 231.5 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 257.0 MB
Released by Gravitee.io through its official repository on Hugging Face. Read the license.
Built From
- Derived from prajjwal1/bert-small
- Described by arXiv:1908.08962
- Described by arXiv:2110.01518
- Quantized from prajjwal1/bert-small
- Trained on (disclosed) gravitee-io/pii-detection-dataset
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 257.0 MB |
| 16-bit | 0.1 GB |
| 8-bit | 0.0 GB |
| 4-bit | 0.0 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About bert-small-pii-detection
How much GPU memory does bert-small-pii-detection need?
About 0.1 GB at 16-bit and 0 GB at 4-bit: the weights (29M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run bert-small-pii-detection on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use bert-small-pii-detection commercially?
Yes. bert-small-pii-detection is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
What is bert-small-pii-detection's context length?
512 tokens, from the maximum position embeddings in its published configuration.
Similar Models
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)
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
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…
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
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…