Instructions to use TensorGreed/brewslm-sensitive-data-tagger with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TensorGreed/brewslm-sensitive-data-tagger with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="TensorGreed/brewslm-sensitive-data-tagger")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("TensorGreed/brewslm-sensitive-data-tagger") model = AutoModelForTokenClassification.from_pretrained("TensorGreed/brewslm-sensitive-data-tagger", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Card: for education only, no claim to subject-matter expertise; links to BrewSLM and the build write-up
Browse files
README.md
CHANGED
|
@@ -14,7 +14,16 @@ language:
|
|
| 14 |
# Sensitive-data tagger (PCI / GDPR / HIPAA + custom) span tagger
|
| 15 |
|
| 16 |
A token-classification model that finds spans of text and labels each with a type, fine-tuned from `microsoft/deberta-v3-base`.
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Model
|
| 20 |
|
|
@@ -147,6 +156,8 @@ def find_spans(text):
|
|
| 147 |
|
| 148 |
## Limitations
|
| 149 |
|
|
|
|
|
|
|
| 150 |
- Scores come from small held-out sets — 44 texts (answer key), 44 texts (test examples) — so expect a few points of noise either way.
|
| 151 |
- Types with fewer than 10 reference spans in an evaluation (`address`, `api_key`, `bank_account`, `cvv`, `date_of_birth`, `employee_id`, `health_plan_id`, `iban`, `ip_address`, `medical_record_number`, `passport`, `routing_number`, `ticket_id`, `username`) have unreliable per-type scores.
|
| 152 |
- The training data is synthetic or model-labelled, not human-annotated; real documents with other layouts, formats or languages may score lower.
|
|
|
|
| 14 |
# Sensitive-data tagger (PCI / GDPR / HIPAA + custom) span tagger
|
| 15 |
|
| 16 |
A token-classification model that finds spans of text and labels each with a type, fine-tuned from `microsoft/deberta-v3-base`.
|
| 17 |
+
|
| 18 |
+
> **For education only.** This model is a demonstration of a training method. It is not a privacy, security or
|
| 19 |
+
> compliance expert, and it makes no claim to subject-matter expertise. It is not legal or compliance advice. It can
|
| 20 |
+
> miss sensitive data and can tag text that isn't sensitive. Don't rely on it as a safeguard for real personal data:
|
| 21 |
+
> consult a qualified privacy or compliance professional.
|
| 22 |
+
|
| 23 |
+
**Trained with [BrewSLM](https://brewslm.com)** (project “Sensitive-data tagger (PCI / GDPR / HIPAA + custom)”, run #143),
|
| 24 |
+
a platform for building small language models from your own data. How this model was built, step by step:
|
| 25 |
+
[*Build a sensitive-data detector from zero, with no labelled data*](https://brewslm.com/blog-sensitive-data-detector-from-zero.html),
|
| 26 |
+
and more on the [BrewSLM blog](https://brewslm.com/blog.html). Non-commercial showcase; no warranty.
|
| 27 |
|
| 28 |
## Model
|
| 29 |
|
|
|
|
| 156 |
|
| 157 |
## Limitations
|
| 158 |
|
| 159 |
+
- Educational demonstration only, with no claim to privacy, security or compliance expertise. Not legal or compliance
|
| 160 |
+
advice.
|
| 161 |
- Scores come from small held-out sets — 44 texts (answer key), 44 texts (test examples) — so expect a few points of noise either way.
|
| 162 |
- Types with fewer than 10 reference spans in an evaluation (`address`, `api_key`, `bank_account`, `cvv`, `date_of_birth`, `employee_id`, `health_plan_id`, `iban`, `ip_address`, `medical_record_number`, `passport`, `routing_number`, `ticket_id`, `username`) have unreliable per-type scores.
|
| 163 |
- The training data is synthetic or model-labelled, not human-annotated; real documents with other layouts, formats or languages may score lower.
|