Text Classification
Transformers
Safetensors
Arabic
French
English
distilbert
token-classification
ner
pii
cv-parsing
morocco
text-embeddings-inference
Instructions to use Lamaachi/distilbert-moroccan-pii-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lamaachi/distilbert-moroccan-pii-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Lamaachi/distilbert-moroccan-pii-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Lamaachi/distilbert-moroccan-pii-classifier") model = AutoModelForTokenClassification.from_pretrained("Lamaachi/distilbert-moroccan-pii-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from Lamaachi/distilbert-moroccan-pii-classifier: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/Lamaachi/distilbert-moroccan-pii-classifier/resolve/main/config.json
- Command line
-
hf download hf://Lamaachi/distilbert-moroccan-pii-classifier/config.json
-
curl -L -o config.json https://huggingface.co/Lamaachi/distilbert-moroccan-pii-classifier/resolve/main/config.json
2.14 kB
| { | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForTokenClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-ADDRESS", | |
| "2": "I-ADDRESS", | |
| "3": "B-BIRTHDATE", | |
| "4": "I-BIRTHDATE", | |
| "5": "B-BIRTHDATE_AGE", | |
| "6": "I-BIRTHDATE_AGE", | |
| "7": "B-COMPANY_NAME", | |
| "8": "I-COMPANY_NAME", | |
| "9": "B-DEGREE", | |
| "10": "I-DEGREE", | |
| "11": "B-DRIVER_LICENSE", | |
| "12": "I-DRIVER_LICENSE", | |
| "13": "B-EMAIL", | |
| "14": "I-EMAIL", | |
| "15": "B-FIRST_NAME", | |
| "16": "I-FIRST_NAME", | |
| "17": "B-INSTITUTION_NAME", | |
| "18": "I-INSTITUTION_NAME", | |
| "19": "B-LAST_NAME", | |
| "20": "I-LAST_NAME", | |
| "21": "B-MARITAL_STATUS", | |
| "22": "I-MARITAL_STATUS", | |
| "23": "B-PHONE", | |
| "24": "I-PHONE", | |
| "25": "B-POST", | |
| "26": "I-POST", | |
| "27": "B-SOCIAL_LINK", | |
| "28": "I-SOCIAL_LINK", | |
| "29": "B-TITLE", | |
| "30": "I-TITLE", | |
| "31": "B-section_Title", | |
| "32": "I-section_Title" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "B-ADDRESS": 1, | |
| "B-BIRTHDATE": 3, | |
| "B-BIRTHDATE_AGE": 5, | |
| "B-COMPANY_NAME": 7, | |
| "B-DEGREE": 9, | |
| "B-DRIVER_LICENSE": 11, | |
| "B-EMAIL": 13, | |
| "B-FIRST_NAME": 15, | |
| "B-INSTITUTION_NAME": 17, | |
| "B-LAST_NAME": 19, | |
| "B-MARITAL_STATUS": 21, | |
| "B-PHONE": 23, | |
| "B-POST": 25, | |
| "B-SOCIAL_LINK": 27, | |
| "B-TITLE": 29, | |
| "B-section_Title": 31, | |
| "I-ADDRESS": 2, | |
| "I-BIRTHDATE": 4, | |
| "I-BIRTHDATE_AGE": 6, | |
| "I-COMPANY_NAME": 8, | |
| "I-DEGREE": 10, | |
| "I-DRIVER_LICENSE": 12, | |
| "I-EMAIL": 14, | |
| "I-FIRST_NAME": 16, | |
| "I-INSTITUTION_NAME": 18, | |
| "I-LAST_NAME": 20, | |
| "I-MARITAL_STATUS": 22, | |
| "I-PHONE": 24, | |
| "I-POST": 26, | |
| "I-SOCIAL_LINK": 28, | |
| "I-TITLE": 30, | |
| "I-section_Title": 32, | |
| "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.51.1", | |
| "vocab_size": 30522 | |
| } | |