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
| { | |
| "architectures": [ | |
| "Lfm2BidirP2ForTokenClassification" | |
| ], | |
| "auto_map": { | |
| "AutoModel": "modeling_phase2_tc.Lfm2BidirectionalModel_theirs", | |
| "AutoModelForTokenClassification": "modeling_phase2_tc.Lfm2BidirP2ForTokenClassification" | |
| }, | |
| "block_auto_adjust_ff_dim": true, | |
| "block_dim": 1024, | |
| "block_ffn_dim_multiplier": 1.0, | |
| "block_mlp_init_scale": 1.0, | |
| "block_multiple_of": 256, | |
| "block_norm_eps": 1e-05, | |
| "block_out_init_scale": 1.0, | |
| "block_use_swiglu": true, | |
| "block_use_xavier_init": true, | |
| "bos_token_id": 1, | |
| "classifier_dropout": 0.1, | |
| "conv_L_cache": 3, | |
| "conv_bias": false, | |
| "conv_dim": 1024, | |
| "conv_dim_out": 1024, | |
| "conv_use_xavier_init": true, | |
| "dtype": "float32", | |
| "eos_token_id": 7, | |
| "full_attn_idxs": null, | |
| "hidden_size": 1024, | |
| "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-credential.connection_string", | |
| "26": "I-credential.connection_string", | |
| "27": "E-credential.connection_string", | |
| "28": "S-credential.connection_string", | |
| "29": "B-credential.jwt", | |
| "30": "I-credential.jwt", | |
| "31": "E-credential.jwt", | |
| "32": "S-credential.jwt", | |
| "33": "B-credential.password", | |
| "34": "I-credential.password", | |
| "35": "E-credential.password", | |
| "36": "S-credential.password", | |
| "37": "B-credential.private_key", | |
| "38": "I-credential.private_key", | |
| "39": "E-credential.private_key", | |
| "40": "S-credential.private_key", | |
| "41": "B-developer.device_id", | |
| "42": "I-developer.device_id", | |
| "43": "E-developer.device_id", | |
| "44": "S-developer.device_id", | |
| "45": "B-developer.login_credentials", | |
| "46": "I-developer.login_credentials", | |
| "47": "E-developer.login_credentials", | |
| "48": "S-developer.login_credentials", | |
| "49": "B-device.imei", | |
| "50": "I-device.imei", | |
| "51": "E-device.imei", | |
| "52": "S-device.imei", | |
| "53": "B-device.mac_address", | |
| "54": "I-device.mac_address", | |
| "55": "E-device.mac_address", | |
| "56": "S-device.mac_address", | |
| "57": "B-financial.amount", | |
| "58": "I-financial.amount", | |
| "59": "E-financial.amount", | |
| "60": "S-financial.amount", | |
| "61": "B-financial.bank_account", | |
| "62": "I-financial.bank_account", | |
| "63": "E-financial.bank_account", | |
| "64": "S-financial.bank_account", | |
| "65": "B-financial.credit_card", | |
| "66": "I-financial.credit_card", | |
| "67": "E-financial.credit_card", | |
| "68": "S-financial.credit_card", | |
| "69": "B-financial.crypto_wallet", | |
| "70": "I-financial.crypto_wallet", | |
| "71": "E-financial.crypto_wallet", | |
| "72": "S-financial.crypto_wallet", | |
| "73": "B-financial.iban", | |
| "74": "I-financial.iban", | |
| "75": "E-financial.iban", | |
| "76": "S-financial.iban", | |
| "77": "B-financial.swift_bic", | |
| "78": "I-financial.swift_bic", | |
| "79": "E-financial.swift_bic", | |
| "80": "S-financial.swift_bic", | |
| "81": "B-healthcare.condition", | |
| "82": "I-healthcare.condition", | |
| "83": "E-healthcare.condition", | |
| "84": "S-healthcare.condition", | |
| "85": "B-healthcare.health_plan_id", | |
| "86": "I-healthcare.health_plan_id", | |
| "87": "E-healthcare.health_plan_id", | |
| "88": "S-healthcare.health_plan_id", | |
| "89": "B-healthcare.medical_record", | |
| "90": "I-healthcare.medical_record", | |
| "91": "E-healthcare.medical_record", | |
| "92": "S-healthcare.medical_record", | |
| "93": "B-healthcare.medication", | |
| "94": "I-healthcare.medication", | |
| "95": "E-healthcare.medication", | |
| "96": "S-healthcare.medication", | |
| "97": "B-identity.date_of_birth", | |
| "98": "I-identity.date_of_birth", | |
| "99": "E-identity.date_of_birth", | |
| "100": "S-identity.date_of_birth", | |
| "101": "B-identity.drivers_license", | |
| "102": "I-identity.drivers_license", | |
| "103": "E-identity.drivers_license", | |
| "104": "S-identity.drivers_license", | |
| "105": "B-identity.national_id", | |
| "106": "I-identity.national_id", | |
| "107": "E-identity.national_id", | |
| "108": "S-identity.national_id", | |
| "109": "B-identity.passport", | |
| "110": "I-identity.passport", | |
| "111": "E-identity.passport", | |
| "112": "S-identity.passport", | |
| "113": "B-identity.person_name", | |
| "114": "I-identity.person_name", | |
| "115": "E-identity.person_name", | |
| "116": "S-identity.person_name", | |
| "117": "B-identity.ssn", | |
| "118": "I-identity.ssn", | |
| "119": "E-identity.ssn", | |
| "120": "S-identity.ssn", | |
| "121": "B-identity.tax_id", | |
| "122": "I-identity.tax_id", | |
| "123": "E-identity.tax_id", | |
| "124": "S-identity.tax_id", | |
| "125": "B-legal.case_number", | |
| "126": "I-legal.case_number", | |
| "127": "E-legal.case_number", | |
| "128": "S-legal.case_number", | |
| "129": "B-location.gps_coordinates", | |
| "130": "I-location.gps_coordinates", | |
| "131": "E-location.gps_coordinates", | |
| "132": "S-location.gps_coordinates", | |
| "133": "B-online.url", | |
| "134": "I-online.url", | |
| "135": "E-online.url", | |
| "136": "S-online.url", | |
| "137": "B-online.username", | |
| "138": "I-online.username", | |
| "139": "E-online.username", | |
| "140": "S-online.username", | |
| "141": "B-org.company_name", | |
| "142": "I-org.company_name", | |
| "143": "E-org.company_name", | |
| "144": "S-org.company_name", | |
| "145": "B-special.health_status", | |
| "146": "I-special.health_status", | |
| "147": "E-special.health_status", | |
| "148": "S-special.health_status", | |
| "149": "B-special.orientation", | |
| "150": "I-special.orientation", | |
| "151": "E-special.orientation", | |
| "152": "S-special.orientation", | |
| "153": "B-special.political", | |
| "154": "I-special.political", | |
| "155": "E-special.political", | |
| "156": "S-special.political", | |
| "157": "B-special.religion", | |
| "158": "I-special.religion", | |
| "159": "E-special.religion", | |
| "160": "S-special.religion" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6656, | |
| "label2id": { | |
| "B-contact.address": 1, | |
| "B-contact.email": 5, | |
| "B-contact.ip_address": 9, | |
| "B-contact.phone": 13, | |
| "B-contact.postal_code": 17, | |
| "B-credential.api_key": 21, | |
| "B-credential.connection_string": 25, | |
| "B-credential.jwt": 29, | |
| "B-credential.password": 33, | |
| "B-credential.private_key": 37, | |
| "B-developer.device_id": 41, | |
| "B-developer.login_credentials": 45, | |
| "B-device.imei": 49, | |
| "B-device.mac_address": 53, | |
| "B-financial.amount": 57, | |
| "B-financial.bank_account": 61, | |
| "B-financial.credit_card": 65, | |
| "B-financial.crypto_wallet": 69, | |
| "B-financial.iban": 73, | |
| "B-financial.swift_bic": 77, | |
| "B-healthcare.condition": 81, | |
| "B-healthcare.health_plan_id": 85, | |
| "B-healthcare.medical_record": 89, | |
| "B-healthcare.medication": 93, | |
| "B-identity.date_of_birth": 97, | |
| "B-identity.drivers_license": 101, | |
| "B-identity.national_id": 105, | |
| "B-identity.passport": 109, | |
| "B-identity.person_name": 113, | |
| "B-identity.ssn": 117, | |
| "B-identity.tax_id": 121, | |
| "B-legal.case_number": 125, | |
| "B-location.gps_coordinates": 129, | |
| "B-online.url": 133, | |
| "B-online.username": 137, | |
| "B-org.company_name": 141, | |
| "B-special.health_status": 145, | |
| "B-special.orientation": 149, | |
| "B-special.political": 153, | |
| "B-special.religion": 157, | |
| "E-contact.address": 3, | |
| "E-contact.email": 7, | |
| "E-contact.ip_address": 11, | |
| "E-contact.phone": 15, | |
| "E-contact.postal_code": 19, | |
| "E-credential.api_key": 23, | |
| "E-credential.connection_string": 27, | |
| "E-credential.jwt": 31, | |
| "E-credential.password": 35, | |
| "E-credential.private_key": 39, | |
| "E-developer.device_id": 43, | |
| "E-developer.login_credentials": 47, | |
| "E-device.imei": 51, | |
| "E-device.mac_address": 55, | |
| "E-financial.amount": 59, | |
| "E-financial.bank_account": 63, | |
| "E-financial.credit_card": 67, | |
| "E-financial.crypto_wallet": 71, | |
| "E-financial.iban": 75, | |
| "E-financial.swift_bic": 79, | |
| "E-healthcare.condition": 83, | |
| "E-healthcare.health_plan_id": 87, | |
| "E-healthcare.medical_record": 91, | |
| "E-healthcare.medication": 95, | |
| "E-identity.date_of_birth": 99, | |
| "E-identity.drivers_license": 103, | |
| "E-identity.national_id": 107, | |
| "E-identity.passport": 111, | |
| "E-identity.person_name": 115, | |
| "E-identity.ssn": 119, | |
| "E-identity.tax_id": 123, | |
| "E-legal.case_number": 127, | |
| "E-location.gps_coordinates": 131, | |
| "E-online.url": 135, | |
| "E-online.username": 139, | |
| "E-org.company_name": 143, | |
| "E-special.health_status": 147, | |
| "E-special.orientation": 151, | |
| "E-special.political": 155, | |
| "E-special.religion": 159, | |
| "I-contact.address": 2, | |
| "I-contact.email": 6, | |
| "I-contact.ip_address": 10, | |
| "I-contact.phone": 14, | |
| "I-contact.postal_code": 18, | |
| "I-credential.api_key": 22, | |
| "I-credential.connection_string": 26, | |
| "I-credential.jwt": 30, | |
| "I-credential.password": 34, | |
| "I-credential.private_key": 38, | |
| "I-developer.device_id": 42, | |
| "I-developer.login_credentials": 46, | |
| "I-device.imei": 50, | |
| "I-device.mac_address": 54, | |
| "I-financial.amount": 58, | |
| "I-financial.bank_account": 62, | |
| "I-financial.credit_card": 66, | |
| "I-financial.crypto_wallet": 70, | |
| "I-financial.iban": 74, | |
| "I-financial.swift_bic": 78, | |
| "I-healthcare.condition": 82, | |
| "I-healthcare.health_plan_id": 86, | |
| "I-healthcare.medical_record": 90, | |
| "I-healthcare.medication": 94, | |
| "I-identity.date_of_birth": 98, | |
| "I-identity.drivers_license": 102, | |
| "I-identity.national_id": 106, | |
| "I-identity.passport": 110, | |
| "I-identity.person_name": 114, | |
| "I-identity.ssn": 118, | |
| "I-identity.tax_id": 122, | |
| "I-legal.case_number": 126, | |
| "I-location.gps_coordinates": 130, | |
| "I-online.url": 134, | |
| "I-online.username": 138, | |
| "I-org.company_name": 142, | |
| "I-special.health_status": 146, | |
| "I-special.orientation": 150, | |
| "I-special.political": 154, | |
| "I-special.religion": 158, | |
| "O": 0, | |
| "S-contact.address": 4, | |
| "S-contact.email": 8, | |
| "S-contact.ip_address": 12, | |
| "S-contact.phone": 16, | |
| "S-contact.postal_code": 20, | |
| "S-credential.api_key": 24, | |
| "S-credential.connection_string": 28, | |
| "S-credential.jwt": 32, | |
| "S-credential.password": 36, | |
| "S-credential.private_key": 40, | |
| "S-developer.device_id": 44, | |
| "S-developer.login_credentials": 48, | |
| "S-device.imei": 52, | |
| "S-device.mac_address": 56, | |
| "S-financial.amount": 60, | |
| "S-financial.bank_account": 64, | |
| "S-financial.credit_card": 68, | |
| "S-financial.crypto_wallet": 72, | |
| "S-financial.iban": 76, | |
| "S-financial.swift_bic": 80, | |
| "S-healthcare.condition": 84, | |
| "S-healthcare.health_plan_id": 88, | |
| "S-healthcare.medical_record": 92, | |
| "S-healthcare.medication": 96, | |
| "S-identity.date_of_birth": 100, | |
| "S-identity.drivers_license": 104, | |
| "S-identity.national_id": 108, | |
| "S-identity.passport": 112, | |
| "S-identity.person_name": 116, | |
| "S-identity.ssn": 120, | |
| "S-identity.tax_id": 124, | |
| "S-legal.case_number": 128, | |
| "S-location.gps_coordinates": 132, | |
| "S-online.url": 136, | |
| "S-online.username": 140, | |
| "S-org.company_name": 144, | |
| "S-special.health_status": 148, | |
| "S-special.orientation": 152, | |
| "S-special.political": 156, | |
| "S-special.religion": 160 | |
| }, | |
| "label_smoothing": 0.0, | |
| "layer_types": [ | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv" | |
| ], | |
| "max_position_embeddings": 128000, | |
| "model_type": "lfm2", | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 16, | |
| "num_heads": 16, | |
| "num_hidden_layers": 16, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 0, | |
| "rope_parameters": { | |
| "rope_theta": 1000000.0, | |
| "rope_type": "default" | |
| }, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.11.0", | |
| "use_cache": false, | |
| "use_pos_enc": true, | |
| "vocab_size": 65536 | |
| } |