sentinel-qwen3-4b-kr-sensitive-guard-v3

Overview

sentinel-qwen3-4b-kr-sensitive-guard-v3 is a Korean guardrail-oriented model fine-tuned from Qwen/Qwen3-4B to detect sensitive entities using a strict whitelist-only label set.

This repository provides the merged full-weight model (LoRA adapter merged into the base model) for straightforward deployment.

Intended Use

  • Detect sensitive information in Korean text (e.g., prompts, chat messages, logs) before sending content to external LLM services.
  • Build enterprise DLP / LLM guardrails (warn / block / mask / redact).
  • Extract sensitive entities using a fixed whitelist of labels (no extra categories).

Not Intended Use

  • Real-person identification, re-identification, or privacy-invasive profiling.
  • Treating model outputs as ground truth without validation.
  • Assuming real-world distributions (training used synthetic data; domain shift may occur).

Training Data

This model was trained on the following synthetic dataset:

  • Dataset: BoB14TeamSentinel/sentinel-kr-sensitive-entities-synthetic-v3
  • Notes: All sensitive values were AI-generated synthetic values (not collected from real people or incidents).

Important: The dataset is released under CC BY 4.0. If you reuse the dataset or derivatives, please provide appropriate attribution.

Whitelist Label Set (Allowed Labels)

The model is expected to output only the following labels:

Basic identity

  • NAME โ€” Person name
  • PHONE โ€” Phone number
  • EMAIL โ€” Email address
  • ADDRESS โ€” Address (road name / district / detailed address)
  • POSTAL_CODE โ€” Postal/ZIP code

Government / official identifiers

  • PERSONAL_CUSTOMS_ID โ€” Personal Customs Clearance Code (KR)
  • RESIDENT_ID โ€” Resident Registration Number (KR)
  • PASSPORT โ€” Passport number
  • DRIVER_LICENSE โ€” Driverโ€™s license number
  • FOREIGNER_ID โ€” Foreigner registration number
  • HEALTH_INSURANCE_ID โ€” Health insurance ID
  • BUSINESS_ID โ€” Business registration number
  • MILITARY_ID โ€” Military service number

Authentication / secrets

  • JWT โ€” JSON Web Token
  • API_KEY โ€” API key (vendor-agnostic)
  • GITHUB_PAT โ€” GitHub Personal Access Token
  • PRIVATE_KEY โ€” Private key material (SSH/TLS/PGP)

Financial

  • CARD_NUMBER โ€” Card number
  • CARD_EXPIRY โ€” Card expiry (MM/YY etc.)
  • BANK_ACCOUNT โ€” Bank account number
  • CARD_CVV โ€” CVC/CVV
  • PAYMENT_PIN โ€” Payment/ATM PIN
  • MOBILE_PAYMENT_PIN โ€” Mobile payment PIN

Crypto

  • MNEMONIC โ€” Recovery seed phrase / mnemonic
  • CRYPTO_PRIVATE_KEY โ€” Crypto private key
  • HD_WALLET โ€” HD wallet extended key
  • PAYMENT_URI_QR โ€” Payment URI / QR payload (BTC/ETH/XRP/SOL/TRON etc.)

Network / device

  • IPV4 โ€” IPv4 address
  • IPV6 โ€” IPv6 address
  • MAC_ADDRESS โ€” MAC address
  • IMEI โ€” IMEI

Output Contract (Recommended)

This model was fine-tuned for guardrail usage where the assistant returns JSON only with:

  • text: the original input text
  • has_sensitive: boolean
  • entities: list of { value, begin, end, label }
    • begin / end are 0-based character offsets (begin inclusive, end exclusive)

Example:

{
  "text": "๋ฌธ์˜: minseo.kim@example.com / 010-1234-5678",
  "has_sensitive": true,
  "entities": [
    {"value": "minseo.kim@example.com", "begin": 4, "end": 24, "label": "EMAIL"},
    {"value": "010-1234-5678", "begin": 27, "end": 40, "label": "PHONE"}
  ]
}

How to Use (Transformers)

Note: This is a chat/instruct-style model. Use your preferred chat template and enforce JSON-only output in the system prompt.

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "BoB14TeamSentinel/sentinel-qwen3-4b-kr-sensitive-guard-v3"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="auto",
    trust_remote_code=True,
)

system = (
    "You are a strict whitelist-only detector for sensitive entities. "
    "Given the user's text, return ONLY a JSON object with keys "
    "`text`, `has_sensitive`, `entities`. "
    "Do not output any labels outside the whitelist. No extra commentary."
    "<List of the whitelist>"
)

user_text = "๋ฌธ์˜: minseo.kim@example.com / 010-1234-5678"

messages = [
    {"role": "system", "content": system},
    {"role": "user", "content": user_text},
]

input_ids = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt"
).to(model.device)

with torch.no_grad():
    out = model.generate(
        input_ids,
        max_new_tokens=512,
        do_sample=False,
        temperature=0.0,
    )

print(tokenizer.decode(out[0], skip_special_tokens=True))

Limitations

  • Synthetic generation may not perfectly match real-world traffic (domain shift).
  • Certain formats may be over/under-represented depending on generation prompts.
  • Ambiguous numeric strings may cause false positives in some settings.

Safety & Ethics

  • Trained on synthetic data to reduce privacy risk.
  • Do not use for real-person identification or any privacy-invasive purpose.
  • Always validate outputs before applying automated enforcement in production.

License

  • Model weights: Apache-2.0
  • Training dataset: CC BY 4.0 (attribution required)

Citation / Attribution

If you use this model or the dataset, please attribute:

  • BoB14TeamSentinel, sentinel-qwen3-4b-kr-sensitive-guard-v3 (Hugging Face model)
  • BoB14TeamSentinel, sentinel-kr-sensitive-entities-synthetic-v3 (Hugging Face dataset)

Project

  • Project: Sentinel Solution
  • Organization: Team.๋ ๊ฒƒ๊ฐ™์€๋ฐ
Downloads last month
1
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for BoB14TeamSentinel/sentinel-qwen3-4b-kr-sensitive-guard-v3

Finetuned
Qwen/Qwen3-4B
Finetuned
(576)
this model