Base Model
Qwen/Qwen3-4B
Training Dataset
ai4privacy/pii-masking-openpii-1m
- English subset
- 25,000 training samples
- 2,000 validation samples
- 19 PII entity types
Dataset credit: Ai4Privacy / Ai Suisse SA.
Fine-Tuning
- Method: QLoRA
- Quantization: 4-bit NF4
- LoRA rank: 16
- LoRA alpha: 32
- LoRA dropout: 0.05
- Epochs: 1
- Training hardware: NVIDIA L4
Evaluation
Evaluated on a frozen 3,000-sample OpenPII test set using strict exact-span and entity-type matching.
Table with columns: Metric, Base Qwen3-4B, Fine-Tuned| Metric | Base Qwen3-4B | Fine-Tuned |
|---|
| Precision | 0.7207 | 0.9562 |
| Recall | 0.6280 | 0.9508 |
| F1 | 0.6712 | 0.9535 |
| F2 | 0.6446 | 0.9519 |
| PII Leakage Rate | 0.3720 | 0.0492 |
| JSON Validity | 0.8997 |
Supported PII Types
- DATE
- GIVENNAME
- SURNAME
- EMAIL
- CITY
- TITLE
- TELEPHONENUM
- AGE
- STREET
- BUILDINGNUM
- ZIPCODE
- IDCARDNUM
- CREDITCARDNUMBER
- DRIVERLICENSENUM
- GENDER
- TAXNUM
- SEX
- SOCIALNUM
- PASSPORTNUM
Intended Use
This adapter is intended for:
- PII extraction
- sensitive-data detection
- privacy-preserving text redaction
- structured information extraction
Usage
This repository contains a PEFT LoRA adapter.
Use it with the base model:
Qwen/Qwen3-4B
The adapter can be loaded using PEFT-compatible Transformers tooling.
Limitations
- Primarily trained on English synthetic PII data.
- Supports the 19 PII categories listed above.
- Performance may decrease on different domains or data distributions.
- Outputs should be validated before use in compliance-critical or high-risk systems.