Token Classification
Transformers
Safetensors
lfm2
liquid
lfm2.5
bidirectional
masked-lm
encoder
pii
ner
privacy
multilingual
custom_code
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)# 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
| { | |
| "num_labels": 109, | |
| "scheme": "BIOES", | |
| "types_in_order": [ | |
| "contact.address", | |
| "contact.email", | |
| "contact.ip_address", | |
| "contact.phone", | |
| "contact.postal_code", | |
| "credential.api_key", | |
| "device.mac_address", | |
| "financial.bank_account", | |
| "financial.credit_card", | |
| "financial.iban", | |
| "financial.swift_bic", | |
| "healthcare.condition", | |
| "healthcare.medical_record", | |
| "healthcare.medication", | |
| "identity.date_of_birth", | |
| "identity.drivers_license", | |
| "identity.national_id", | |
| "identity.passport", | |
| "identity.person_name", | |
| "identity.ssn", | |
| "legal.case_number", | |
| "location.gps_coordinates", | |
| "online.url", | |
| "online.username", | |
| "org.company_name", | |
| "special.political", | |
| "special.religion" | |
| ], | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-contact.address", | |
| "2": "I-contact.address", | |
| "3": "E-contact.address", | |
| "4": "S-contact.address", | |
| "5": "B-contact.email", | |
| "6": "I-contact.email", | |
| "7": "E-contact.email", | |
| "8": "S-contact.email", | |
| "9": "B-contact.ip_address", | |
| "10": "I-contact.ip_address", | |
| "11": "E-contact.ip_address", | |
| "12": "S-contact.ip_address", | |
| "13": "B-contact.phone", | |
| "14": "I-contact.phone", | |
| "15": "E-contact.phone", | |
| "16": "S-contact.phone", | |
| "17": "B-contact.postal_code", | |
| "18": "I-contact.postal_code", | |
| "19": "E-contact.postal_code", | |
| "20": "S-contact.postal_code", | |
| "21": "B-credential.api_key", | |
| "22": "I-credential.api_key", | |
| "23": "E-credential.api_key", | |
| "24": "S-credential.api_key", | |
| "25": "B-device.mac_address", | |
| "26": "I-device.mac_address", | |
| "27": "E-device.mac_address", | |
| "28": "S-device.mac_address", | |
| "29": "B-financial.bank_account", | |
| "30": "I-financial.bank_account", | |
| "31": "E-financial.bank_account", | |
| "32": "S-financial.bank_account", | |
| "33": "B-financial.credit_card", | |
| "34": "I-financial.credit_card", | |
| "35": "E-financial.credit_card", | |
| "36": "S-financial.credit_card", | |
| "37": "B-financial.iban", | |
| "38": "I-financial.iban", | |
| "39": "E-financial.iban", | |
| "40": "S-financial.iban", | |
| "41": "B-financial.swift_bic", | |
| "42": "I-financial.swift_bic", | |
| "43": "E-financial.swift_bic", | |
| "44": "S-financial.swift_bic", | |
| "45": "B-healthcare.condition", | |
| "46": "I-healthcare.condition", | |
| "47": "E-healthcare.condition", | |
| "48": "S-healthcare.condition", | |
| "49": "B-healthcare.medical_record", | |
| "50": "I-healthcare.medical_record", | |
| "51": "E-healthcare.medical_record", | |
| "52": "S-healthcare.medical_record", | |
| "53": "B-healthcare.medication", | |
| "54": "I-healthcare.medication", | |
| "55": "E-healthcare.medication", | |
| "56": "S-healthcare.medication", | |
| "57": "B-identity.date_of_birth", | |
| "58": "I-identity.date_of_birth", | |
| "59": "E-identity.date_of_birth", | |
| "60": "S-identity.date_of_birth", | |
| "61": "B-identity.drivers_license", | |
| "62": "I-identity.drivers_license", | |
| "63": "E-identity.drivers_license", | |
| "64": "S-identity.drivers_license", | |
| "65": "B-identity.national_id", | |
| "66": "I-identity.national_id", | |
| "67": "E-identity.national_id", | |
| "68": "S-identity.national_id", | |
| "69": "B-identity.passport", | |
| "70": "I-identity.passport", | |
| "71": "E-identity.passport", | |
| "72": "S-identity.passport", | |
| "73": "B-identity.person_name", | |
| "74": "I-identity.person_name", | |
| "75": "E-identity.person_name", | |
| "76": "S-identity.person_name", | |
| "77": "B-identity.ssn", | |
| "78": "I-identity.ssn", | |
| "79": "E-identity.ssn", | |
| "80": "S-identity.ssn", | |
| "81": "B-legal.case_number", | |
| "82": "I-legal.case_number", | |
| "83": "E-legal.case_number", | |
| "84": "S-legal.case_number", | |
| "85": "B-location.gps_coordinates", | |
| "86": "I-location.gps_coordinates", | |
| "87": "E-location.gps_coordinates", | |
| "88": "S-location.gps_coordinates", | |
| "89": "B-online.url", | |
| "90": "I-online.url", | |
| "91": "E-online.url", | |
| "92": "S-online.url", | |
| "93": "B-online.username", | |
| "94": "I-online.username", | |
| "95": "E-online.username", | |
| "96": "S-online.username", | |
| "97": "B-org.company_name", | |
| "98": "I-org.company_name", | |
| "99": "E-org.company_name", | |
| "100": "S-org.company_name", | |
| "101": "B-special.political", | |
| "102": "I-special.political", | |
| "103": "E-special.political", | |
| "104": "S-special.political", | |
| "105": "B-special.religion", | |
| "106": "I-special.religion", | |
| "107": "E-special.religion", | |
| "108": "S-special.religion" | |
| }, | |
| "label2id": { | |
| "O": 0, | |
| "B-contact.address": 1, | |
| "I-contact.address": 2, | |
| "E-contact.address": 3, | |
| "S-contact.address": 4, | |
| "B-contact.email": 5, | |
| "I-contact.email": 6, | |
| "E-contact.email": 7, | |
| "S-contact.email": 8, | |
| "B-contact.ip_address": 9, | |
| "I-contact.ip_address": 10, | |
| "E-contact.ip_address": 11, | |
| "S-contact.ip_address": 12, | |
| "B-contact.phone": 13, | |
| "I-contact.phone": 14, | |
| "E-contact.phone": 15, | |
| "S-contact.phone": 16, | |
| "B-contact.postal_code": 17, | |
| "I-contact.postal_code": 18, | |
| "E-contact.postal_code": 19, | |
| "S-contact.postal_code": 20, | |
| "B-credential.api_key": 21, | |
| "I-credential.api_key": 22, | |
| "E-credential.api_key": 23, | |
| "S-credential.api_key": 24, | |
| "B-device.mac_address": 25, | |
| "I-device.mac_address": 26, | |
| "E-device.mac_address": 27, | |
| "S-device.mac_address": 28, | |
| "B-financial.bank_account": 29, | |
| "I-financial.bank_account": 30, | |
| "E-financial.bank_account": 31, | |
| "S-financial.bank_account": 32, | |
| "B-financial.credit_card": 33, | |
| "I-financial.credit_card": 34, | |
| "E-financial.credit_card": 35, | |
| "S-financial.credit_card": 36, | |
| "B-financial.iban": 37, | |
| "I-financial.iban": 38, | |
| "E-financial.iban": 39, | |
| "S-financial.iban": 40, | |
| "B-financial.swift_bic": 41, | |
| "I-financial.swift_bic": 42, | |
| "E-financial.swift_bic": 43, | |
| "S-financial.swift_bic": 44, | |
| "B-healthcare.condition": 45, | |
| "I-healthcare.condition": 46, | |
| "E-healthcare.condition": 47, | |
| "S-healthcare.condition": 48, | |
| "B-healthcare.medical_record": 49, | |
| "I-healthcare.medical_record": 50, | |
| "E-healthcare.medical_record": 51, | |
| "S-healthcare.medical_record": 52, | |
| "B-healthcare.medication": 53, | |
| "I-healthcare.medication": 54, | |
| "E-healthcare.medication": 55, | |
| "S-healthcare.medication": 56, | |
| "B-identity.date_of_birth": 57, | |
| "I-identity.date_of_birth": 58, | |
| "E-identity.date_of_birth": 59, | |
| "S-identity.date_of_birth": 60, | |
| "B-identity.drivers_license": 61, | |
| "I-identity.drivers_license": 62, | |
| "E-identity.drivers_license": 63, | |
| "S-identity.drivers_license": 64, | |
| "B-identity.national_id": 65, | |
| "I-identity.national_id": 66, | |
| "E-identity.national_id": 67, | |
| "S-identity.national_id": 68, | |
| "B-identity.passport": 69, | |
| "I-identity.passport": 70, | |
| "E-identity.passport": 71, | |
| "S-identity.passport": 72, | |
| "B-identity.person_name": 73, | |
| "I-identity.person_name": 74, | |
| "E-identity.person_name": 75, | |
| "S-identity.person_name": 76, | |
| "B-identity.ssn": 77, | |
| "I-identity.ssn": 78, | |
| "E-identity.ssn": 79, | |
| "S-identity.ssn": 80, | |
| "B-legal.case_number": 81, | |
| "I-legal.case_number": 82, | |
| "E-legal.case_number": 83, | |
| "S-legal.case_number": 84, | |
| "B-location.gps_coordinates": 85, | |
| "I-location.gps_coordinates": 86, | |
| "E-location.gps_coordinates": 87, | |
| "S-location.gps_coordinates": 88, | |
| "B-online.url": 89, | |
| "I-online.url": 90, | |
| "E-online.url": 91, | |
| "S-online.url": 92, | |
| "B-online.username": 93, | |
| "I-online.username": 94, | |
| "E-online.username": 95, | |
| "S-online.username": 96, | |
| "B-org.company_name": 97, | |
| "I-org.company_name": 98, | |
| "E-org.company_name": 99, | |
| "S-org.company_name": 100, | |
| "B-special.political": 101, | |
| "I-special.political": 102, | |
| "E-special.political": 103, | |
| "S-special.political": 104, | |
| "B-special.religion": 105, | |
| "I-special.religion": 106, | |
| "E-special.religion": 107, | |
| "S-special.religion": 108 | |
| } | |
| } |