Instructions to use PITTI/privacy-filter-nemotron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PITTI/privacy-filter-nemotron with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="PITTI/privacy-filter-nemotron")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("PITTI/privacy-filter-nemotron") model = AutoModelForTokenClassification.from_pretrained("PITTI/privacy-filter-nemotron", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload 5 files
Browse files- .gitattributes +1 -0
- config.json +222 -0
- model.safetensors +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +13 -0
- viterbi_calibration.json +14 -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,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"OpenAIPrivacyFilterForTokenClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"attention_probs_dropout_prob": null,
|
| 8 |
+
"bidirectional_context": true,
|
| 9 |
+
"bidirectional_left_context": null,
|
| 10 |
+
"bidirectional_right_context": null,
|
| 11 |
+
"bos_token_id": null,
|
| 12 |
+
"classifier_dropout": 0.0,
|
| 13 |
+
"classifier_bias": true,
|
| 14 |
+
"eos_token_id": 199999,
|
| 15 |
+
"experts_per_token": null,
|
| 16 |
+
"head_dim": 64,
|
| 17 |
+
"hidden_size": 640,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"initial_context_length": 4096,
|
| 20 |
+
"intermediate_size": 640,
|
| 21 |
+
"layer_norm_eps": null,
|
| 22 |
+
"max_position_embeddings": 131072,
|
| 23 |
+
"model_type": "openai_privacy_filter",
|
| 24 |
+
"num_attention_heads": 14,
|
| 25 |
+
"num_experts": 128,
|
| 26 |
+
"num_experts_per_tok": 4,
|
| 27 |
+
"num_key_value_heads": 2,
|
| 28 |
+
"num_hidden_layers": 8,
|
| 29 |
+
"num_local_experts": 128,
|
| 30 |
+
"output_router_logits": false,
|
| 31 |
+
"pad_token_id": 199999,
|
| 32 |
+
"rope_ntk_alpha": null,
|
| 33 |
+
"rope_ntk_beta": null,
|
| 34 |
+
"rope_parameters": {
|
| 35 |
+
"beta_fast": 32.0,
|
| 36 |
+
"beta_slow": 1.0,
|
| 37 |
+
"factor": 32.0,
|
| 38 |
+
"original_max_position_embeddings": 4096,
|
| 39 |
+
"rope_theta": 150000.0,
|
| 40 |
+
"rope_type": "yarn",
|
| 41 |
+
"truncate": false
|
| 42 |
+
},
|
| 43 |
+
"rope_scaling_factor": null,
|
| 44 |
+
"rope_theta": 150000.0,
|
| 45 |
+
"router_aux_loss_coef": 0.001,
|
| 46 |
+
"rms_norm_eps": 1e-05,
|
| 47 |
+
"sliding_window": 128,
|
| 48 |
+
"swiglu_limit": 7.0,
|
| 49 |
+
"tie_word_embeddings": false,
|
| 50 |
+
"use_cache": true,
|
| 51 |
+
"vocab_size": 200064,
|
| 52 |
+
"num_labels": 81,
|
| 53 |
+
"label2id": {
|
| 54 |
+
"O": 0,
|
| 55 |
+
"B-private_person": 1,
|
| 56 |
+
"I-private_person": 2,
|
| 57 |
+
"E-private_person": 3,
|
| 58 |
+
"S-private_person": 4,
|
| 59 |
+
"B-private_organization": 5,
|
| 60 |
+
"I-private_organization": 6,
|
| 61 |
+
"E-private_organization": 7,
|
| 62 |
+
"S-private_organization": 8,
|
| 63 |
+
"B-private_occupation": 9,
|
| 64 |
+
"I-private_occupation": 10,
|
| 65 |
+
"E-private_occupation": 11,
|
| 66 |
+
"S-private_occupation": 12,
|
| 67 |
+
"B-private_employee_id": 13,
|
| 68 |
+
"I-private_employee_id": 14,
|
| 69 |
+
"E-private_employee_id": 15,
|
| 70 |
+
"S-private_employee_id": 16,
|
| 71 |
+
"B-private_employment_status": 17,
|
| 72 |
+
"I-private_employment_status": 18,
|
| 73 |
+
"E-private_employment_status": 19,
|
| 74 |
+
"S-private_employment_status": 20,
|
| 75 |
+
"B-private_email": 21,
|
| 76 |
+
"I-private_email": 22,
|
| 77 |
+
"E-private_email": 23,
|
| 78 |
+
"S-private_email": 24,
|
| 79 |
+
"B-private_phone": 25,
|
| 80 |
+
"I-private_phone": 26,
|
| 81 |
+
"E-private_phone": 27,
|
| 82 |
+
"S-private_phone": 28,
|
| 83 |
+
"B-private_url": 29,
|
| 84 |
+
"I-private_url": 30,
|
| 85 |
+
"E-private_url": 31,
|
| 86 |
+
"S-private_url": 32,
|
| 87 |
+
"B-private_address": 33,
|
| 88 |
+
"I-private_address": 34,
|
| 89 |
+
"E-private_address": 35,
|
| 90 |
+
"S-private_address": 36,
|
| 91 |
+
"B-private_location": 37,
|
| 92 |
+
"I-private_location": 38,
|
| 93 |
+
"E-private_location": 39,
|
| 94 |
+
"S-private_location": 40,
|
| 95 |
+
"B-private_date": 41,
|
| 96 |
+
"I-private_date": 42,
|
| 97 |
+
"E-private_date": 43,
|
| 98 |
+
"S-private_date": 44,
|
| 99 |
+
"B-private_user_id": 45,
|
| 100 |
+
"I-private_user_id": 46,
|
| 101 |
+
"E-private_user_id": 47,
|
| 102 |
+
"S-private_user_id": 48,
|
| 103 |
+
"B-private_financial_id": 49,
|
| 104 |
+
"I-private_financial_id": 50,
|
| 105 |
+
"E-private_financial_id": 51,
|
| 106 |
+
"S-private_financial_id": 52,
|
| 107 |
+
"B-private_government_id": 53,
|
| 108 |
+
"I-private_government_id": 54,
|
| 109 |
+
"E-private_government_id": 55,
|
| 110 |
+
"S-private_government_id": 56,
|
| 111 |
+
"B-private_health_id": 57,
|
| 112 |
+
"I-private_health_id": 58,
|
| 113 |
+
"E-private_health_id": 59,
|
| 114 |
+
"S-private_health_id": 60,
|
| 115 |
+
"B-private_device_id": 61,
|
| 116 |
+
"I-private_device_id": 62,
|
| 117 |
+
"E-private_device_id": 63,
|
| 118 |
+
"S-private_device_id": 64,
|
| 119 |
+
"B-private_network_id": 65,
|
| 120 |
+
"I-private_network_id": 66,
|
| 121 |
+
"E-private_network_id": 67,
|
| 122 |
+
"S-private_network_id": 68,
|
| 123 |
+
"B-private_vehicle_id": 69,
|
| 124 |
+
"I-private_vehicle_id": 70,
|
| 125 |
+
"E-private_vehicle_id": 71,
|
| 126 |
+
"S-private_vehicle_id": 72,
|
| 127 |
+
"B-secret": 73,
|
| 128 |
+
"I-secret": 74,
|
| 129 |
+
"E-secret": 75,
|
| 130 |
+
"S-secret": 76,
|
| 131 |
+
"B-sensitive_attribute": 77,
|
| 132 |
+
"I-sensitive_attribute": 78,
|
| 133 |
+
"E-sensitive_attribute": 79,
|
| 134 |
+
"S-sensitive_attribute": 80
|
| 135 |
+
},
|
| 136 |
+
"id2label": {
|
| 137 |
+
"0": "O",
|
| 138 |
+
"1": "B-private_person",
|
| 139 |
+
"2": "I-private_person",
|
| 140 |
+
"3": "E-private_person",
|
| 141 |
+
"4": "S-private_person",
|
| 142 |
+
"5": "B-private_organization",
|
| 143 |
+
"6": "I-private_organization",
|
| 144 |
+
"7": "E-private_organization",
|
| 145 |
+
"8": "S-private_organization",
|
| 146 |
+
"9": "B-private_occupation",
|
| 147 |
+
"10": "I-private_occupation",
|
| 148 |
+
"11": "E-private_occupation",
|
| 149 |
+
"12": "S-private_occupation",
|
| 150 |
+
"13": "B-private_employee_id",
|
| 151 |
+
"14": "I-private_employee_id",
|
| 152 |
+
"15": "E-private_employee_id",
|
| 153 |
+
"16": "S-private_employee_id",
|
| 154 |
+
"17": "B-private_employment_status",
|
| 155 |
+
"18": "I-private_employment_status",
|
| 156 |
+
"19": "E-private_employment_status",
|
| 157 |
+
"20": "S-private_employment_status",
|
| 158 |
+
"21": "B-private_email",
|
| 159 |
+
"22": "I-private_email",
|
| 160 |
+
"23": "E-private_email",
|
| 161 |
+
"24": "S-private_email",
|
| 162 |
+
"25": "B-private_phone",
|
| 163 |
+
"26": "I-private_phone",
|
| 164 |
+
"27": "E-private_phone",
|
| 165 |
+
"28": "S-private_phone",
|
| 166 |
+
"29": "B-private_url",
|
| 167 |
+
"30": "I-private_url",
|
| 168 |
+
"31": "E-private_url",
|
| 169 |
+
"32": "S-private_url",
|
| 170 |
+
"33": "B-private_address",
|
| 171 |
+
"34": "I-private_address",
|
| 172 |
+
"35": "E-private_address",
|
| 173 |
+
"36": "S-private_address",
|
| 174 |
+
"37": "B-private_location",
|
| 175 |
+
"38": "I-private_location",
|
| 176 |
+
"39": "E-private_location",
|
| 177 |
+
"40": "S-private_location",
|
| 178 |
+
"41": "B-private_date",
|
| 179 |
+
"42": "I-private_date",
|
| 180 |
+
"43": "E-private_date",
|
| 181 |
+
"44": "S-private_date",
|
| 182 |
+
"45": "B-private_user_id",
|
| 183 |
+
"46": "I-private_user_id",
|
| 184 |
+
"47": "E-private_user_id",
|
| 185 |
+
"48": "S-private_user_id",
|
| 186 |
+
"49": "B-private_financial_id",
|
| 187 |
+
"50": "I-private_financial_id",
|
| 188 |
+
"51": "E-private_financial_id",
|
| 189 |
+
"52": "S-private_financial_id",
|
| 190 |
+
"53": "B-private_government_id",
|
| 191 |
+
"54": "I-private_government_id",
|
| 192 |
+
"55": "E-private_government_id",
|
| 193 |
+
"56": "S-private_government_id",
|
| 194 |
+
"57": "B-private_health_id",
|
| 195 |
+
"58": "I-private_health_id",
|
| 196 |
+
"59": "E-private_health_id",
|
| 197 |
+
"60": "S-private_health_id",
|
| 198 |
+
"61": "B-private_device_id",
|
| 199 |
+
"62": "I-private_device_id",
|
| 200 |
+
"63": "E-private_device_id",
|
| 201 |
+
"64": "S-private_device_id",
|
| 202 |
+
"65": "B-private_network_id",
|
| 203 |
+
"66": "I-private_network_id",
|
| 204 |
+
"67": "E-private_network_id",
|
| 205 |
+
"68": "S-private_network_id",
|
| 206 |
+
"69": "B-private_vehicle_id",
|
| 207 |
+
"70": "I-private_vehicle_id",
|
| 208 |
+
"71": "E-private_vehicle_id",
|
| 209 |
+
"72": "S-private_vehicle_id",
|
| 210 |
+
"73": "B-secret",
|
| 211 |
+
"74": "I-secret",
|
| 212 |
+
"75": "E-secret",
|
| 213 |
+
"76": "S-secret",
|
| 214 |
+
"77": "B-sensitive_attribute",
|
| 215 |
+
"78": "I-sensitive_attribute",
|
| 216 |
+
"79": "E-sensitive_attribute",
|
| 217 |
+
"80": "S-sensitive_attribute"
|
| 218 |
+
},
|
| 219 |
+
"pipeline_config": null,
|
| 220 |
+
"use_late_interaction": false,
|
| 221 |
+
"is_regression": null
|
| 222 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04d51c404b03ec68989f581114629e1692d7620d7aa68f65eea869357db12a35
|
| 3 |
+
size 5598086079
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
| 3 |
+
size 27868174
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"is_local": true,
|
| 5 |
+
"local_files_only": false,
|
| 6 |
+
"model_input_names": [
|
| 7 |
+
"input_ids",
|
| 8 |
+
"attention_mask"
|
| 9 |
+
],
|
| 10 |
+
"model_max_length": 128000,
|
| 11 |
+
"pad_token": "<|endoftext|>",
|
| 12 |
+
"tokenizer_class": "TokenizersBackend"
|
| 13 |
+
}
|
viterbi_calibration.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"operating_points": {
|
| 3 |
+
"default": {
|
| 4 |
+
"biases": {
|
| 5 |
+
"transition_bias_background_stay": 0.0,
|
| 6 |
+
"transition_bias_background_to_start": 0.0,
|
| 7 |
+
"transition_bias_end_to_background": 0.0,
|
| 8 |
+
"transition_bias_end_to_start": 0.0,
|
| 9 |
+
"transition_bias_inside_to_continue": 0.0,
|
| 10 |
+
"transition_bias_inside_to_end": 0.0
|
| 11 |
+
}
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
}
|