Openmed Pii Spanish Biomedbert Large 340m V1
| Entity Passport | |
| Registry ID | hf-model--openmed--openmed-pii-spanish-biomedbert-large-340m-v1 |
| License | Apache-2.0 |
| Provider | huggingface |
Cite this model
Academic & Research Attribution
@misc{hf_model__openmed__openmed_pii_spanish_biomedbert_large_340m_v1,
author = {OpenMed},
title = {Openmed Pii Spanish Biomedbert Large 340m V1 Model},
year = {2026},
howpublished = {\url{https://huggingface.co/openmed/openmed-pii-spanish-biomedbert-large-340m-v1}},
note = {Accessed via Free2AITools Knowledge Fortress}
} 🔬Technical Deep Dive
Full Specifications [+]▾
Quick Commands
huggingface-cli download openmed/openmed-pii-spanish-biomedbert-large-340m-v1 pip install -U transformers ⚖️ Nexus Index V2.0
💬 Index Insight
FNI V2.0 for Openmed Pii Spanish Biomedbert Large 340m V1: Semantic (S:50), Authority (A:0), Popularity (P:46), Recency (R:87), Quality (Q:65).
Verification Authority
🚀 What's Next?
Technical Deep Dive
OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1
Spanish PII Detection Model | 340M Parameters | Open Source
Model Description
OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1 is a transformer-based token classification model fine-tuned for Personally Identifiable Information (PII) detection in Spanish text. This model identifies and classifies 54 types of sensitive information including names, addresses, social security numbers, medical record numbers, and more.
Key Features
- Spanish-Optimized: Specifically trained on Spanish text for optimal performance
- High Accuracy: Achieves strong F1 scores across diverse PII categories
- Comprehensive Coverage: Detects 55+ entity types spanning personal, financial, medical, and contact information
- Privacy-Focused: Designed for de-identification and compliance with GDPR and other privacy regulations
- Production-Ready: Optimized for real-world text processing pipelines
Performance
Evaluated on the Spanish subset of AI4Privacy dataset:
| Metric | Score |
|---|---|
| Micro F1 | 0.8799 |
| Precision | 0.8768 |
| Recall | 0.8829 |
| Macro F1 | 0.8957 |
| Weighted F1 | 0.8791 |
| Accuracy | 0.9896 |
Top 10 Spanish PII Models
| Rank | Model | F1 | Precision | Recall |
|---|---|---|---|---|
| 1 | OpenMed-PII-Spanish-SnowflakeMed-Large-568M-v1 | 0.9495 | 0.9501 | 0.9490 |
| 2 | OpenMed-PII-Spanish-SuperClinical-Large-434M-v1 | 0.9491 | 0.9515 | 0.9468 |
| 3 | OpenMed-PII-Spanish-BigMed-Large-560M-v1 | 0.9436 | 0.9447 | 0.9426 |
| 4 | OpenMed-PII-Spanish-EuroMed-210M-v1 | 0.9419 | 0.9443 | 0.9395 |
| 5 | OpenMed-PII-Spanish-mClinicalE5-Large-560M-v1 | 0.9405 | 0.9362 | 0.9448 |
| 6 | OpenMed-PII-Spanish-ClinicalBGE-568M-v1 | 0.9391 | 0.9348 | 0.9434 |
| 7 | OpenMed-PII-Spanish-NomicMed-Large-395M-v1 | 0.9379 | 0.9418 | 0.9339 |
| 8 | OpenMed-PII-Spanish-mSuperClinical-Base-279M-v1 | 0.9352 | 0.9312 | 0.9392 |
| 9 | OpenMed-PII-Spanish-SuperMedical-Large-355M-v1 | 0.9346 | 0.9370 | 0.9323 |
| 10 | OpenMed-PII-Spanish-SuperClinical-Base-184M-v1 | 0.9256 | 0.9208 | 0.9303 |
Supported Entity Types
This model detects 54 PII entity types organized into categories:
Identifiers (22 types)
| Entity | Description |
|---|---|
ACCOUNTNAME |
Accountname |
BANKACCOUNT |
Bankaccount |
BIC |
Bic |
BITCOINADDRESS |
Bitcoinaddress |
CREDITCARD |
Creditcard |
CREDITCARDISSUER |
Creditcardissuer |
CVV |
Cvv |
ETHEREUMADDRESS |
Ethereumaddress |
IBAN |
Iban |
IMEI |
Imei |
| ... | and 12 more |
Personal Info (11 types)
| Entity | Description |
|---|---|
AGE |
Age |
DATEOFBIRTH |
Dateofbirth |
EYECOLOR |
Eyecolor |
FIRSTNAME |
Firstname |
GENDER |
Gender |
HEIGHT |
Height |
LASTNAME |
Lastname |
MIDDLENAME |
Middlename |
OCCUPATION |
Occupation |
PREFIX |
Prefix |
| ... | and 1 more |
Contact Info (2 types)
| Entity | Description |
|---|---|
EMAIL |
|
PHONE |
Phone |
Location (9 types)
| Entity | Description |
|---|---|
BUILDINGNUMBER |
Buildingnumber |
CITY |
City |
COUNTY |
County |
GPSCOORDINATES |
Gpscoordinates |
ORDINALDIRECTION |
Ordinaldirection |
SECONDARYADDRESS |
Secondaryaddress |
STATE |
State |
STREET |
Street |
ZIPCODE |
Zipcode |
Organization (3 types)
| Entity | Description |
|---|---|
JOBDEPARTMENT |
Jobdepartment |
JOBTITLE |
Jobtitle |
ORGANIZATION |
Organization |
Financial (5 types)
| Entity | Description |
|---|---|
AMOUNT |
Amount |
CURRENCY |
Currency |
CURRENCYCODE |
Currencycode |
CURRENCYNAME |
Currencyname |
CURRENCYSYMBOL |
Currencysymbol |
Temporal (2 types)
| Entity | Description |
|---|---|
DATE |
Date |
TIME |
Time |
Usage
Quick Start
from transformers import pipeline
# Load the PII detection pipeline
ner = pipeline("ner", model="OpenMed/OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1", aggregation_strategy="simple")
text = """
Paciente María López (nacida el 15/03/1985, DNI: 87654321B) fue atendida hoy.
Contacto: maria.lopez@email.es, Teléfono: +34 612 345 678.
Dirección: Calle Serrano 42, 28001 Madrid.
"""
entities = ner(text)
for entity in entities:
print(f"{entity['entity_group']}: {entity['word']} (score: {entity['score']:.3f})")
Important — Accent Handling: This model was trained on text without diacritical marks (accents). For best results, strip accents from your input before inference. Character offsets are preserved, so you can map entities back to the original text.
pythonimport unicodedata def strip_accents(text: str) -> str: nfc = unicodedata.normalize("NFC", text) nfd = unicodedata.normalize("NFD", nfc) stripped = "".join(ch for ch in nfd if unicodedata.category(ch) != "Mn") return unicodedata.normalize("NFC", stripped) text = strip_accents(text) # call before passing to the pipeline entities = ner(text)
De-identification Example
def redact_pii(text, entities, placeholder='[REDACTED]'):
"""Replace detected PII with placeholders."""
# Sort entities by start position (descending) to preserve offsets
sorted_entities = sorted(entities, key=lambda x: x['start'], reverse=True)
redacted = text
for ent in sorted_entities:
redacted = redacted[:ent['start']] + f"[{ent['entity_group']}]" + redacted[ent['end']:]
return redacted
# Apply de-identification
redacted_text = redact_pii(text, entities)
print(redacted_text)
Batch Processing
from transformers import AutoModelForTokenClassification, AutoTokenizer
import torch
model_name = "OpenMed/OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1"
model = AutoModelForTokenClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
texts = [
"Paciente María López (nacida el 15/03/1985, DNI: 87654321B) fue atendida hoy.",
"Contacto: maria.lopez@email.es, Teléfono: +34 612 345 678.",
]
inputs = tokenizer(texts, return_tensors='pt', padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=-1)
Training Details
Dataset
- Source: AI4Privacy PII Masking 400k (Spanish subset)
- Format: BIO-tagged token classification
- Labels: 109 total (54 entity types × 2 BIO tags + O)
Training Configuration
- Max Sequence Length: 512 tokens
- Epochs: 3
- Framework: Hugging Face Transformers + Trainer API
Intended Use & Limitations
Intended Use
- De-identification: Automated redaction of PII in Spanish clinical notes, medical records, and documents
- Compliance: Supporting GDPR, and other privacy regulation compliance
- Data Preprocessing: Preparing datasets for research by removing sensitive information
- Audit Support: Identifying PII in document collections
Limitations
Important: This model is intended as an assistive tool, not a replacement for human review.
- False Negatives: Some PII may not be detected; always verify critical applications
- Context Sensitivity: Performance may vary with domain-specific terminology
- Language: Optimized for Spanish text; may not perform well on other languages
Citation
@misc{openmed-pii-2026,
title = {OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1: Spanish PII Detection Model},
author = {OpenMed Science},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/OpenMed/OpenMed-PII-Spanish-BiomedBERT-Large-340M-v1}
}
Links
- Organization: OpenMed
⚠️ Incomplete Data
Some information about this model is not available. Use with Caution - Verify details from the original source before relying on this data.
View Original Source →📝 Limitations & Considerations
- • Benchmark scores may vary based on evaluation methodology and hardware configuration.
- • VRAM requirements are estimates; actual usage depends on quantization and batch size.
- • FNI scores are relative rankings and may change as new models are added.
- ⚠ License Unknown: Verify licensing terms before commercial use.
Social Proof
AI Summary: Based on Hugging Face metadata. Not a recommendation.
🛡️ Model Transparency Report
Technical metadata sourced from upstream repositories.
🆔 Identity & Source
- id
- hf-model--openmed--openmed-pii-spanish-biomedbert-large-340m-v1
- slug
- openmed--openmed-pii-spanish-biomedbert-large-340m-v1
- source
- huggingface
- author
- OpenMed
- license
- Apache-2.0
- tags
- transformers, safetensors, bert, token-classification, ner, pii, pii-detection, de-identification, privacy, healthcare, medical, clinical, phi, spanish, pytorch, openmed, es, license:apache-2.0, model-index, endpoints_compatible, region:us
⚙️ Technical Specs
- architecture
- null
- params billions
- null
- context length
- null
- pipeline tag
- token-classification
📊 Engagement & Metrics
- downloads
- 13,173
- stars
- 0
- forks
- 0
Data indexed from public sources. Updated daily.