Instructions to use limbo23/holdback-student with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use limbo23/holdback-student with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="limbo23/holdback-student")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("limbo23/holdback-student") model = AutoModelForTokenClassification.from_pretrained("limbo23/holdback-student", device_map="auto") - Notebooks
- Google Colab
- Kaggle
holdback student detector
A token classifier that finds personal data and secrets in what coding agents send to cloud models. It is the distilled replacement for OpenAI's Privacy Filter (a 1.5B-parameter mixture of experts) in holdback, a local proxy and Claude Code hook that replaces private values with placeholders before a request leaves the machine.
6 layers, hidden size 384, 28.3M parameters, a 45,338-piece vocabulary pruned from multilingual-e5-small, and the Privacy Filter's eight categories (account_number, private_address, private_date, private_email, private_person, private_phone, private_url, secret) as BIO tags.
Use with holdback
holdback 0.2.0 and later use this model by default: the first start downloads it, checks each file against a
pinned SHA-256 and runs it natively, followed by holdback's structure rules. holdback doctor shows which detector
runs. holdback 0.1.2 runs it only from a folder that HOLDBACK_STUDENT_DIR names:
hf download limbo23/holdback-student --local-dir ~/.cache/holdback/student
HOLDBACK_STUDENT_DIR=~/.cache/holdback/student holdback run claude
Use from Python
from transformers import pipeline
detect = pipeline("token-classification", model="limbo23/holdback-student", aggregation_strategy="simple")
detect("Ask Maria Gonzalez at maria.gonzalez@example.com")
The model was trained on windows of up to 254 tokens. Split longer text first, as holdback does: at a line break, else a separator such as a comma, else a space. The results below include holdback's rules, which keep hosts, ports, paths, dates and IDs that the model alone would replace.
Results
Leaked labeled values and false-positive characters, both detectors followed by holdback's rules. No training row comes from these sets.
| Test | Privacy Filter | This model |
|---|---|---|
| PrivacyBench, persona never trained on | 9.7% / 0.6% | 1.0% / 0.5% |
| PrivacyBench, three more personas | 18.8% / 0.3% | 3.2% / 0.4% |
| ai4privacy EN validation, a dataset never trained on | 12.8% / 11.1% | 5.8% / 11.2% |
| CredData, credentials from files no earlier sample used | 20.2% / 6.0% | 19.9% / 4.6% |
| holdback's generated agent tasks (seeds 7 and 11), values leaked of 288 and tasks broken of 186 | 1 and 0; 6 and 6 | 0 and 0; 6 and 6 |
| Developer text, false replacements per 100 KB (tuning, held-out) | 3, 0 | 2, 2 |
Maintainers in the authors lists of 9 public crates: names replaced of 14, emails of 12 |
8, 11 | 12, 12 |
| Claude Code (Haiku 5.5) on those crates, 45 tasks in hook mode: tasks passed; maintainers' details sent | 44/45; 7 | 45/45; 2 |
| Chinese names in news, MSRA NER test odd rows, 1,301 names (evaluation only) | 67.3% / 0.6% | 8.7% / 1.5% |
| 30 Chinese developer requests written for this check, 10 values | 2 of 10 / 0.8% | 0 of 10 / 0.5% |
| ai4privacy validation in French, German, Italian, Spanish and Dutch, 100 rows each (evaluation only) | 4.7% to 16.2% leaked | 9.2% to 17.8% leaked |
Four of the maintainers also appear in the training text, from their other crates; the model replaces the others too, except a lone first name and a one-word handle. Neither detector let a planted secret through in the Claude Code sessions.
Speed and memory in holdback 0.1.2 on an Apple M5 CPU, measured with the previous version of this model, which has the same architecture and size; 0.2.0 runs it with the same inference code. For inputs of 16, 128, 2,048 and 8,192 tokens as the Privacy Filter's tokenizer counts them, labeling takes 1.8, 7.6, 66 and 260 ms (Privacy Filter: 24.5, 88, 520 and 1,879 ms), medians of three alternating rounds on an idle machine. A fresh process peaks at 76 MB of memory for 16 tokens and 135 MB for 8,192 (Privacy Filter: 84 and 145 MB).
Reproduce
This model is the output of distill/
in holdback at commit a270fc6 with the default settings: data.py constructed, data.py natural, then train.py.
Its README has the steps and the commands behind the numbers above: holdback's benchmark scripts with
HOLDBACK_STUDENT_DIR set, and distill/heldout.py. The commit pins the training rows; GPU arithmetic is not
exactly repeatable.
Training data
Labels on public datasets: the Privacy Filter's spans plus the dataset's own labels where it found nothing. On
developer text taken from repositories: the planted values, and the names and emails of real people, such as the
authors of a Cargo.toml, a Name <email> line or a copyright holder. Constructed rows with exact labels:
lockfile and checksum text, code and config where values of the same shape are secrets under secret names and plain
under other names, generated agent output (logs, cluster and CI output, chat, payments, configs), secrets as source
code writes them, and Chinese documentation labeled by the Privacy Filter with holdback's rules.
| Source | License |
|---|---|
| intfloat/multilingual-e5-small, the starting weights (6 of its 12 layers) | MIT |
| nvidia/Nemotron-PII, 16,000 training rows | CC BY 4.0, NVIDIA |
| asgdaudahu/pii-bench-zh, 6,000 rows from row 1,000 on, without the rows holdback's benchmark reads | Apache-2.0 |
| Teacher labels from openai/privacy-filter | Apache-2.0 |
| Source of the crates in holdback's Cargo.lock and of Python packages, as developer text | the packages' own licenses |
| Lockfiles and checksums of those crates, and git object listings of ripgrep, serde and fd | the projects' own licenses |
| Chinese documentation of ant-design, vant, ahooks and umi, with planted values | MIT |
| Generated rows (Faker values) |
No training row repeats a text that holdback's benchmark reads. ai4privacy/pii-masking-400k is not in the training data: its license allows academic and non-commercial use only.
Limits
- Secrets in code are found about as often as by the Privacy Filter, not more often; UUIDs are kept by holdback's policy and count as leaks in CredData.
- In French, German, Italian, Spanish and Dutch it misses more than the Privacy Filter, mostly dates of birth, building numbers, postcodes and ID numbers.
- In Chinese it finds far more names than the Privacy Filter and sometimes takes a common word for a name (0.5% of characters in developer requests, 1.5% in news, against 0.8% and 0.6%).
- It sometimes takes a number that stands alone, such as a count or a process id, for an account number.
- It keeps a lone first name or a handle in an authors list: its training text has such entries unlabeled.
- Scripts beyond the training data fall back to single-character pieces.
- This is seed 0 of two training runs, chosen before either was scored. The other seed differed by up to 3.2 points of leaked values on the tests above.
Versions
- 2026-11-20, this version: built by holdback's
distill/at commit a270fc6. Its training data fixes four faults in the previous version's: the names and emails of real maintainers in developer text were labeled as not private, so that version kept those in aCargo.tomlauthors list; 300 of its PII Bench ZH rows were rows holdback's benchmark reads; MAC addresses were labeled as street addresses; and some generated city names depended on Python's hash seed. - 2026-11-19, revision f1898f0: built by
distill/at commit 362aa9e. - 2026-11-19, first upload: trained with the same recipe before the code moved into holdback's repository, with developer text from other crates and packages.
License
Apache-2.0. The sources above keep their own licenses; Nemotron-PII is used under CC BY 4.0 with attribution to NVIDIA.
- Downloads last month
- 87
Model tree for limbo23/holdback-student
Base model
intfloat/multilingual-e5-small