/ Модель

Характеристики

Контекст
8 194 токена
Параметры
659 млн
Лицензия
Apache 2.0
Архитектура
xlm-roberta · dense
Базовая модель
bge-m3
Библиотека
transformers
Опубликована
17 фев 2026

OpenMed-PII-Spanish-ClinicalBGE-Large-568M-v1

Разметка токеновТекст → label3 профессии

Модель OpenMed находит и классифицирует персональные и медицинские данные в испанских текстах для деидентификации и аудита конфиденциальности.

8 559скачиваний за 30 дней0лайковвеса обновлены18 фев 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

OpenMed-PII-Spanish-ClinicalBGE-Large-568M-v1 — модель OpenMed для поиска и классификации персональных и других чувствительных данных в испанском тексте. Это дообученная на базе BAAI/bge-m3 модель XLM-RoBERTa для разметки токенов; в метаданных указаны 658,7 млн параметров и контекст до 8194 токенов. Модель распространяется в формате safetensors и предназначена для использования с Transformers.

Модель выявляет 54 типа сущностей, включая имена, адреса, идентификаторы, медицинские записи, контактные и финансовые сведения. Её применяют для деидентификации клинических заметок и документов, подготовки наборов данных к исследованиям и аудита документов на наличие чувствительной информации. В оценке на испанской части AI4Privacy указана micro F1 0,9391.

Модель обучалась на тексте без диакритических знаков; README рекомендует удалять акценты перед обработкой. Возможны пропуски сущностей, а качество зависит от терминологии и может быть ниже вне испанского языка, поэтому результаты в критичных сценариях следует проверять. Лицензия — Apache-2.0.

Сценарии применения

  • Поиск персональных данных в испанских клинических заметках
  • Деидентификация медицинских карт и документов
  • Подготовка испанских текстовых данных для исследований
  • Аудит документов на наличие чувствительных сведений

Ограничения

Модель обучалась на тексте без диакритических знаков, поэтому README рекомендует предварительно удалять акценты. Возможны пропуски чувствительных данных; качество может снижаться на специализированной терминологии и языках, отличных от испанского, поэтому важные результаты требуют проверки.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

OpenMed-PII-Spanish-ClinicalBGE-568M-v1

Spanish PII Detection Model | 568M Parameters | Open Source

F1 Score Precision Recall

Model Description

OpenMed-PII-Spanish-ClinicalBGE-568M-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:

MetricScore
Micro F10.9391
Precision0.9348
Recall0.9434
Macro F10.9424
Weighted F10.9382
Accuracy0.9949

Top 10 Spanish PII Models

RankModelF1PrecisionRecall
1OpenMed-PII-Spanish-SnowflakeMed-Large-568M-v10.94950.95010.9490
2OpenMed-PII-Spanish-SuperClinical-Large-434M-v10.94910.95150.9468
3OpenMed-PII-Spanish-BigMed-Large-560M-v10.94360.94470.9426
4OpenMed-PII-Spanish-EuroMed-210M-v10.94190.94430.9395
5OpenMed-PII-Spanish-mClinicalE5-Large-560M-v10.94050.93620.9448
6OpenMed-PII-Spanish-ClinicalBGE-568M-v10.93910.93480.9434
7OpenMed-PII-Spanish-NomicMed-Large-395M-v10.93790.94180.9339
8OpenMed-PII-Spanish-mSuperClinical-Base-279M-v10.93520.93120.9392
9OpenMed-PII-Spanish-SuperMedical-Large-355M-v10.93460.93700.9323
10OpenMed-PII-Spanish-SuperClinical-Base-184M-v10.92560.92080.9303

Supported Entity Types

This model detects 54 PII entity types organized into categories:

EntityDescription
ACCOUNTNAMEAccountname
BANKACCOUNTBankaccount
BICBic
BITCOINADDRESSBitcoinaddress
CREDITCARDCreditcard
CREDITCARDISSUERCreditcardissuer
CVVCvv
ETHEREUMADDRESSEthereumaddress
IBANIban
IMEIImei
...and 12 more
EntityDescription
AGEAge
DATEOFBIRTHDateofbirth
EYECOLOREyecolor
FIRSTNAMEFirstname
GENDERGender
HEIGHTHeight
LASTNAMELastname
MIDDLENAMEMiddlename
OCCUPATIONOccupation
PREFIXPrefix
...and 1 more
EntityDescription
EMAILEmail
PHONEPhone
EntityDescription
BUILDINGNUMBERBuildingnumber
CITYCity
COUNTYCounty
GPSCOORDINATESGpscoordinates
ORDINALDIRECTIONOrdinaldirection
SECONDARYADDRESSSecondaryaddress
STATEState
STREETStreet
ZIPCODEZipcode
EntityDescription
JOBDEPARTMENTJobdepartment
JOBTITLEJobtitle
ORGANIZATIONOrganization
EntityDescription
AMOUNTAmount
CURRENCYCurrency
CURRENCYCODECurrencycode
CURRENCYNAMECurrencyname
CURRENCYSYMBOLCurrencysymbol
EntityDescription
DATEDate
TIMETime

Usage

Quick Start

from transformers import pipeline

# Load the PII detection pipeline
ner = pipeline("ner", model="OpenMed/OpenMed-PII-Spanish-ClinicalBGE-568M-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.

import 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-ClinicalBGE-568M-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-ClinicalBGE-568M-v1: Spanish PII Detection Model},
  author = {OpenMed Science},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/OpenMed/OpenMed-PII-Spanish-ClinicalBGE-568M-v1}
}

Links

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaForTokenClassification
Ревизия весов
4755fac

0 моделей