A full fine-tune of
LFM2.5-Encoder-350M
with a token-classification head, covering
40 PII types
across
16 languages
.
Find more details about our encoders in our
blog post
.
💻
Demos
: Try this fine-tuned model running in a CPU-only Hugging Face space:
PII detection
— spot and remove 40 kinds of personal information across 16 languages.
Best on every benchmark except MAPA
, whose idiosyncratic date-as-
date_of_birth
labeling
convention penalises correctly-typed predictions. Only two external scores land higher
anywhere — Piiranha-v1's 0.946 on ai4privacy and OpenMed's 0.918 on Nemotron — and both are
in-distribution: each model trains on that exact corpus, as did our own encoder's pretraining
on those same two.
Detection tier
is the same model and the same predictions, scored with the type label
ignored — did it find the PII span at all, which is the metric that matters for redaction. The
gap to exact-type is the type-confusion rate, e.g. SPY 0.428 → 0.509.
Usage
⚠️ Loads custom code via
trust_remote_code=True
(the model wraps a
trust_remote_code
encoder).
Install the required packages:
pip install torch transformers huggingface_hub
Run PII detection:
import importlib.util
import sys
from huggingface_hub import hf_hub_download
from transformers import AutoModelForTokenClassification, AutoTokenizer
model_id = "LiquidAI/LFM2.5-Encoder-350-PII-Detector"
helper_path = hf_hub_download(model_id, "pii_hybrid_decode.py")
hf_hub_download(model_id, "context_cued.py")
sys.path.insert(0, helper_path.rsplit("/", 1)[0])
spec = importlib.util.spec_from_file_location("pii_hybrid_decode", helper_path)
hd = importlib.util.module_from_spec(spec)
spec.loader.exec_module(hd)
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForTokenClassification.from_pretrained(model_id, trust_remote_code=True).eval()
spans = hd.predict("Email Dr. Laura Schmidt at [email protected].", tok, model)
print(spans)
If you are interested in custom solutions with edge deployment, please contact
our sales team
.
Citation
@article{liquidAI2026Encoders,
author = {Liquid AI},
title = {LFM2.5-Encoders: Fast at Long Context, Even on CPU},
journal = {Liquid AI Blog},
year = {2026},
note = {www.liquid.ai/blog/lfm2-5-encoders},
}
Runs of LiquidAI LFM2.5-Encoder-350M-PII-Detector on huggingface.co
6.1K
Total runs
0
24-hour runs
-595
3-day runs
-975
7-day runs
4.9K
30-day runs
More Information About LFM2.5-Encoder-350M-PII-Detector huggingface.co Model
More LFM2.5-Encoder-350M-PII-Detector license Visit here:
LFM2.5-Encoder-350M-PII-Detector huggingface.co is an AI model on huggingface.co that provides LFM2.5-Encoder-350M-PII-Detector's model effect (), which can be used instantly with this LiquidAI LFM2.5-Encoder-350M-PII-Detector model. huggingface.co supports a free trial of the LFM2.5-Encoder-350M-PII-Detector model, and also provides paid use of the LFM2.5-Encoder-350M-PII-Detector. Support call LFM2.5-Encoder-350M-PII-Detector model through api, including Node.js, Python, http.
LFM2.5-Encoder-350M-PII-Detector huggingface.co is an online trial and call api platform, which integrates LFM2.5-Encoder-350M-PII-Detector's modeling effects, including api services, and provides a free online trial of LFM2.5-Encoder-350M-PII-Detector, you can try LFM2.5-Encoder-350M-PII-Detector online for free by clicking the link below.
LiquidAI LFM2.5-Encoder-350M-PII-Detector online free url in huggingface.co:
LFM2.5-Encoder-350M-PII-Detector is an open source model from GitHub that offers a free installation service, and any user can find LFM2.5-Encoder-350M-PII-Detector on GitHub to install. At the same time, huggingface.co provides the effect of LFM2.5-Encoder-350M-PII-Detector install, users can directly use LFM2.5-Encoder-350M-PII-Detector installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
LFM2.5-Encoder-350M-PII-Detector install url in huggingface.co: