Downloads · 30 days
4
11% of all-time downloads
bharath-0201/omni-shield-qwen2vl-pii-adapter
omni-shield-qwen2vl-pii-adapter is a machine learning model from bharath-0201. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Fine-tuned adapter for Qwen2-VL-2B-Instruct trained on synthetic identity documents for PII detection and redaction.
Downloads · 30 days
4
11% of all-time downloads
All-time downloads
37
Public
Repo size
28.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors17.5 MB · 60%
From the Hugging Face model README
Fine-tuned adapter for Qwen2-VL-2B-Instruct trained on synthetic identity documents for PII detection and redaction.
ID cards and driving licences from: Australia, Canada, Germany, India, UK, USA
names, faces, signatures, phones, emails, dob,
id_numbers, addresses, org_names, dates
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from peft import PeftModel
import torch
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct")
base_model = Qwen2VLForConditionalGeneration.from_pretrained(
"Qwen/Qwen2-VL-2B-Instruct",
load_in_4bit=True,
device_map="auto",
torch_dtype=torch.bfloat16,
)
model = PeftModel.from_pretrained(
base_model,
"bharath-0201/omni-shield-qwen2vl-pii-adapter"
)
model = model.merge_and_unload()
model.eval()
Fine-tuning teaches the model to emit structured LABEL | VALUE pairs
consistently. The base model detects values correctly but frequently omits
field labels, causing downstream pipeline failures. Fine-tuning fixes this
without degrading value detection accuracy.
Example (German ID card):
| Field | Base model output | Fine-tuned output |
|---|---|---|
| Name | Name | Leonie Dörr | Name | Leonie Dörr |
| DOB | Date of Birth | 01.08.1991 | Date of Birth | 01.08.1991 |
| ID Number | [empty] | M898585166 | ID No. | M898585166 |
| Signature | Signature | [none] | Signature | [none] |
@article{{omni-shield-2025,
title={{Omni-Shield: Local-First Multi-Modal PII Redaction
with Cryptographic Audit Trail}},
author={{[Anonymous for review]}},
year={{2025}}
}}
Submitted to PETS 2026. arXiv preprint forthcoming.