Token Classification
Transformers
Safetensors
English
Chinese
distilbert
pii-detection
ner
presidio
gdpr
ccpa
hong-kong
singapore
china
Instructions to use ohhsj/rail-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ohhsj/rail-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ohhsj/rail-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ohhsj/rail-v2") model = AutoModelForTokenClassification.from_pretrained("ohhsj/rail-v2") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "distilbert-base-uncased", | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForTokenClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-PERSON_NAME", | |
| "2": "I-PERSON_NAME", | |
| "3": "B-EMAIL", | |
| "4": "I-EMAIL", | |
| "5": "B-USERNAME", | |
| "6": "I-USERNAME", | |
| "7": "B-ID_NUM", | |
| "8": "I-ID_NUM", | |
| "9": "B-PHONE_NUM", | |
| "10": "I-PHONE_NUM", | |
| "11": "B-URL_PERSONAL", | |
| "12": "I-URL_PERSONAL", | |
| "13": "B-STREET_ADDRESS", | |
| "14": "I-STREET_ADDRESS", | |
| "15": "B-NAME_ZH_BILINGUAL", | |
| "16": "I-NAME_ZH_BILINGUAL", | |
| "17": "B-ADDRESS_SG", | |
| "18": "I-ADDRESS_SG", | |
| "19": "B-ADDRESS_CN", | |
| "20": "I-ADDRESS_CN", | |
| "21": "B-SG_PHONE", | |
| "22": "I-SG_PHONE", | |
| "23": "B-CN_PHONE", | |
| "24": "I-CN_PHONE", | |
| "25": "B-BANK_ACCOUNT_SG", | |
| "26": "I-BANK_ACCOUNT_SG", | |
| "27": "B-BANK_ACCOUNT_CN", | |
| "28": "I-BANK_ACCOUNT_CN", | |
| "29": "B-COMPANY_NAME", | |
| "30": "I-COMPANY_NAME", | |
| "31": "B-TAX_ID", | |
| "32": "I-TAX_ID", | |
| "33": "B-EMPLOYEE_ID", | |
| "34": "I-EMPLOYEE_ID", | |
| "35": "B-LICENSE_NUM", | |
| "36": "I-LICENSE_NUM", | |
| "37": "B-HK_ID", | |
| "38": "I-HK_ID", | |
| "39": "B-ADDRESS_HK", | |
| "40": "I-ADDRESS_HK", | |
| "41": "B-HK_PHONE", | |
| "42": "I-HK_PHONE", | |
| "43": "B-BANK_ACCOUNT_HK", | |
| "44": "I-BANK_ACCOUNT_HK", | |
| "45": "B-GST_REG_NUM", | |
| "46": "I-GST_REG_NUM" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "B-ADDRESS_CN": 19, | |
| "B-ADDRESS_HK": 39, | |
| "B-ADDRESS_SG": 17, | |
| "B-BANK_ACCOUNT_CN": 27, | |
| "B-BANK_ACCOUNT_HK": 43, | |
| "B-BANK_ACCOUNT_SG": 25, | |
| "B-CN_PHONE": 23, | |
| "B-COMPANY_NAME": 29, | |
| "B-EMAIL": 3, | |
| "B-EMPLOYEE_ID": 33, | |
| "B-GST_REG_NUM": 45, | |
| "B-HK_ID": 37, | |
| "B-HK_PHONE": 41, | |
| "B-ID_NUM": 7, | |
| "B-LICENSE_NUM": 35, | |
| "B-NAME_ZH_BILINGUAL": 15, | |
| "B-PERSON_NAME": 1, | |
| "B-PHONE_NUM": 9, | |
| "B-SG_PHONE": 21, | |
| "B-STREET_ADDRESS": 13, | |
| "B-TAX_ID": 31, | |
| "B-URL_PERSONAL": 11, | |
| "B-USERNAME": 5, | |
| "I-ADDRESS_CN": 20, | |
| "I-ADDRESS_HK": 40, | |
| "I-ADDRESS_SG": 18, | |
| "I-BANK_ACCOUNT_CN": 28, | |
| "I-BANK_ACCOUNT_HK": 44, | |
| "I-BANK_ACCOUNT_SG": 26, | |
| "I-CN_PHONE": 24, | |
| "I-COMPANY_NAME": 30, | |
| "I-EMAIL": 4, | |
| "I-EMPLOYEE_ID": 34, | |
| "I-GST_REG_NUM": 46, | |
| "I-HK_ID": 38, | |
| "I-HK_PHONE": 42, | |
| "I-ID_NUM": 8, | |
| "I-LICENSE_NUM": 36, | |
| "I-NAME_ZH_BILINGUAL": 16, | |
| "I-PERSON_NAME": 2, | |
| "I-PHONE_NUM": 10, | |
| "I-SG_PHONE": 22, | |
| "I-STREET_ADDRESS": 14, | |
| "I-TAX_ID": 32, | |
| "I-URL_PERSONAL": 12, | |
| "I-USERNAME": 6, | |
| "O": 0 | |
| }, | |
| "max_position_embeddings": 512, | |
| "model_type": "distilbert", | |
| "n_heads": 12, | |
| "n_layers": 6, | |
| "pad_token_id": 0, | |
| "qa_dropout": 0.1, | |
| "seq_classif_dropout": 0.2, | |
| "sinusoidal_pos_embds": false, | |
| "tie_weights_": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.44.0", | |
| "vocab_size": 30522 | |
| } | |