Token Classification
GLiNER2
Safetensors
GLiNER
extractor
pii
ner
privacy
redaction
information-extraction
span-extraction
Instructions to use fastino/gliner2-privacy-filter-PII-multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use fastino/gliner2-privacy-filter-PII-multi with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("fastino/gliner2-privacy-filter-PII-multi") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - GLiNER
How to use fastino/gliner2-privacy-filter-PII-multi with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("fastino/gliner2-privacy-filter-PII-multi") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- config.json +10 -0
- encoder_config/config.json +36 -0
- model.safetensors +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +33 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"counting_layer": "count_lstm",
|
| 4 |
+
"max_len": null,
|
| 5 |
+
"max_width": 8,
|
| 6 |
+
"model_name": "microsoft/mdeberta-v3-base",
|
| 7 |
+
"model_type": "extractor",
|
| 8 |
+
"token_pooling": "first",
|
| 9 |
+
"transformers_version": "5.8.0"
|
| 10 |
+
}
|
encoder_config/config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"attention_probs_dropout_prob": 0.1,
|
| 4 |
+
"bos_token_id": null,
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"eos_token_id": null,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_dropout_prob": 0.1,
|
| 9 |
+
"hidden_size": 768,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 3072,
|
| 12 |
+
"layer_norm_eps": 1e-07,
|
| 13 |
+
"legacy": true,
|
| 14 |
+
"max_position_embeddings": 512,
|
| 15 |
+
"max_relative_positions": -1,
|
| 16 |
+
"model_type": "deberta-v2",
|
| 17 |
+
"norm_rel_ebd": "layer_norm",
|
| 18 |
+
"num_attention_heads": 12,
|
| 19 |
+
"num_hidden_layers": 12,
|
| 20 |
+
"pad_token_id": 0,
|
| 21 |
+
"pooler_dropout": 0,
|
| 22 |
+
"pooler_hidden_act": "gelu",
|
| 23 |
+
"pooler_hidden_size": 768,
|
| 24 |
+
"pos_att_type": [
|
| 25 |
+
"p2c",
|
| 26 |
+
"c2p"
|
| 27 |
+
],
|
| 28 |
+
"position_biased_input": false,
|
| 29 |
+
"position_buckets": 256,
|
| 30 |
+
"relative_attention": true,
|
| 31 |
+
"share_att_key": true,
|
| 32 |
+
"tie_word_embeddings": true,
|
| 33 |
+
"transformers_version": "5.8.0",
|
| 34 |
+
"type_vocab_size": 0,
|
| 35 |
+
"vocab_size": 250112
|
| 36 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0280f6f39f6012da50b6640bad438d9b7e763a1b0102094115d1b710c4dd79b6
|
| 3 |
+
size 1228421964
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6df10ec83bea993035b2dd7c39345a3d4fcf23421c2adb6cb4ffc1e6d1bc4b5
|
| 3 |
+
size 16020604
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "[CLS]",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"cls_token": "[CLS]",
|
| 7 |
+
"do_lower_case": false,
|
| 8 |
+
"eos_token": "[SEP]",
|
| 9 |
+
"extra_special_tokens": [
|
| 10 |
+
"[SEP_STRUCT]",
|
| 11 |
+
"[SEP_TEXT]",
|
| 12 |
+
"[P]",
|
| 13 |
+
"[C]",
|
| 14 |
+
"[E]",
|
| 15 |
+
"[R]",
|
| 16 |
+
"[L]",
|
| 17 |
+
"[EXAMPLE]",
|
| 18 |
+
"[OUTPUT]",
|
| 19 |
+
"[DESCRIPTION]"
|
| 20 |
+
],
|
| 21 |
+
"is_local": true,
|
| 22 |
+
"local_files_only": false,
|
| 23 |
+
"mask_token": "[MASK]",
|
| 24 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 25 |
+
"pad_token": "[PAD]",
|
| 26 |
+
"sep_token": "[SEP]",
|
| 27 |
+
"sp_model_kwargs": {},
|
| 28 |
+
"split_by_punct": false,
|
| 29 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
| 30 |
+
"unk_id": 3,
|
| 31 |
+
"unk_token": "[UNK]",
|
| 32 |
+
"vocab_type": "spm"
|
| 33 |
+
}
|