Token Classification
Transformers
Safetensors
lfm2
liquid
lfm2.5
bidirectional
masked-lm
encoder
pii
ner
privacy
multilingual
custom_code
Run this model with HF Jobs
Run LiquidAI/LFM2.5-Encoder-350M-PII-Detector on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M-PII-Detector. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M-PII-Detector on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use LiquidAI/LFM2.5-Encoder-350M-PII-Detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2.5-Encoder-350M-PII-Detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="LiquidAI/LFM2.5-Encoder-350M-PII-Detector", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-PII-Detector", trust_remote_code=True) model = AutoModelForTokenClassification.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-PII-Detector", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Ship context-cued ID decode tier (internal F1 .641->.691; Group-A IDs ~0->.6-.75)
Browse files25 unmodified lines26272829303125 unmodified linesprint(hd.predict("Email laura@charite.de or call +49 30 4505 1234.", tok, model)) # recommended```## Evaluation (type-level micro-F1; one shared harness)v4 is the previous release. We report the **best decode** per benchmark. NOTE: nemotron &25 unmodified lines262728293031323334353637383940414225 unmodified linesprint(hd.predict("Email laura@charite.de or call +49 30 4505 1234.", tok, model)) # recommended```> **Decode update (same v8 weights — context-cued ID tier added).** The hybrid decode now has a> third tier: a high-precision, cue-gated multilingual matcher that captures the value after an ID> field-label ("Passport No:", "Policy #", "MRN:", "Steuer-ID:" … across 33 languages). Arbitrary> alphanumeric IDs have no learnable shape, so the model alone couldn't detect them (recall ~0); the> cue gate recovers them at high precision. **Internal (realistic, partial) F1 0.641 → 0.691, recall> 0.516 → 0.591, exact 0.429 → 0.461; Group-A ID recall (passport, tax_id, national_id, MRN,> health_plan_id, bank_account) rescued from ~0.0–0.2 to ~0.6–0.75**, with only a small precision> cost (0.847 → 0.830) and no new precision-trap failures of note. Public/ShieldFlow numbers in the> tables below predate this tier and will be refreshed.## Evaluation (type-level micro-F1; one shared harness)v4 is the previous release. We report the **best decode** per benchmark. NOTE: nemotron &
README.md+11