Downloads · 30 days
10
7% of all-time downloads
negentropi/belgin-privacy-filter
belgin-privacy-filter is a token classification model from negentropi. Use it when you need labels on individual words, such as names. It is set up for peft. The card lists the license as apache-2.0.
Belgin Privacy Filter is a Turkish-focused LoRA adapter for openai/privacy-filter. It detects privacy-sensitive spans in Turkish complaint and customer-support style text so downstream systems can mask values such as…
Downloads · 30 days
10
7% of all-time downloads
All-time downloads
140
Public
Repo size
32.6 MB
Likes
2
Public
Click a slice to open those files.
.json27.9 MB · 85%
From the Hugging Face model README
Belgin Privacy Filter is a Turkish-focused LoRA adapter for openai/privacy-filter. It detects privacy-sensitive spans in Turkish complaint and customer-support style text so downstream systems can mask values such as <private_person>, <private_email>, <private_phone>, <account_number>, and <secret>.
This repository contains a PEFT adapter, not a standalone model. Load it on top of the original openai/privacy-filter base model and review the base model card, license, and usage terms before deployment.
openai/privacy-filterThe adapter keeps the base model label space:
private_personprivate_addressprivate_emailprivate_phoneprivate_urlprivate_dateaccount_numbersecretThe model uses BIOES boundary tags internally. Each privacy category can appear as B-, I-, E-, or S- variants, plus the background class O.
The public companion dataset is negentropi/belgin-pii-dataset. It is a synthetic Turkish hard-case release intended for testing and improving PII masking behavior.
The model was trained with a broader internal hardmix that included sanitized/syntheticized complaint-support style context and synthetic hard cases. The public dataset intentionally excludes raw complaint text, source IDs, scraped records, and private user content.
Use this adapter as one layer in a Turkish PII/KVKK filtering pipeline:
Good fit:
Not a good fit:
from peft import AutoPeftModelForTokenClassification
from transformers import AutoTokenizer
model_id = "negentropi/belgin-privacy-filter"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoPeftModelForTokenClassification.from_pretrained(model_id)
model.eval()
Explicit base model loading:
from peft import PeftModel
from transformers import AutoModelForTokenClassification, AutoTokenizer
base_model_id = "openai/privacy-filter"
adapter_id = "negentropi/belgin-privacy-filter"
tokenizer = AutoTokenizer.from_pretrained(adapter_id, use_fast=True)
base_model = AutoModelForTokenClassification.from_pretrained(base_model_id)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
For production masking, use strict BIOES span decoding plus a deterministic post-processing layer rather than raw argmax token labels alone.
This adapter was selected and evaluated with strict exact span matching. Strict BIOES decoding is recommended for deployment.
Repair/start decoding is not recommended as the default deployment mode. In validation, it was substantially less precise because invalid BIOES fragments can become false-positive spans.
Final selected checkpoint:
outputs/privacy-filter-sikayetvar-v3-hardmix-quality-r32/best
Validation metrics from the selected hardmix run:
| Metric | Value |
|---|---|
| strict exact micro precision | 0.7859 |
| strict exact micro recall | 0.7033 |
| strict exact micro F1 | 0.7423 |
| macro F1 | 0.7158 |
| invalid BIOES transition rate | 0.01797 |
| token accuracy diagnostic | 0.9650 |
These metrics should not be treated as a general production guarantee. Evaluate on your own in-domain data before deployment.
32640.05q_proj, k_proj, v_proj, o_proj102457e-5See run_config.yaml for the full run configuration.
private_handle label.adapter_config.jsonadapter_model.safetensorstokenizer.jsontokenizer_config.jsonlabel_mapping.jsonrun_config.yamlinference_config.yamleval_metrics.jsonThis adapter is built on top of openai/privacy-filter. Please cite and comply with the base model's model card, license, and terms where applicable.