cdelconde commited on
Commit
a223ecf
·
verified ·
1 Parent(s): ed73e2b

Initial public release 1.0

Browse files
Files changed (8) hide show
  1. LICENSE +21 -0
  2. README.md +56 -0
  3. config.json +89 -0
  4. labels.json +52 -0
  5. manifest.json +25 -0
  6. model.safetensors +3 -0
  7. tokenizer.json +0 -0
  8. tokenizer_config.json +23 -0
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AtomicoLabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - es
6
+ library_name: transformers
7
+ pipeline_tag: token-classification
8
+ tags:
9
+ - pii
10
+ - ner
11
+ - deberta
12
+ - on-device
13
+ base_model: microsoft/deberta-v3-xsmall
14
+ ---
15
+
16
+ # ALF-pii-nano 1.0
17
+
18
+ Bilingual EN+ES PII token classifier. ALF is the AtomicoLabs model family. **Nano** = under 100M parameters.
19
+
20
+ Weights: GitHub Release [`v1.0`](https://github.com/AtomicoLabs/ALF-pii-nano/releases/tag/v1.0) and this Hugging Face revision `v1.0`.
21
+
22
+ | | F1 |
23
+ |---|---|
24
+ | English | 0.897 |
25
+ | Spanish | 0.939 |
26
+
27
+ Grok reference: EN 0.893 / ES 0.895. Types: `PERSON`, `EMAIL`, `PHONE`, `ADDRESS`, `DATE_DOB`, `ID_NUMBER`, `CREDIT_CARD`, `ACCOUNT_IBAN`, `IP`, `USERNAME_URL`, `ORG`.
28
+
29
+ ## Use
30
+
31
+ ```python
32
+ from transformers import pipeline
33
+
34
+ ner = pipeline(
35
+ "token-classification",
36
+ model="AtomicoLabs/ALF-pii-nano",
37
+ aggregation_strategy="simple",
38
+ )
39
+ print(ner("Email me at ada@example.com"))
40
+ ```
41
+
42
+ Pin a version with `revision="v1.0"`. Weights are also on the GitHub Release if you want a local path to `from_pretrained`.
43
+
44
+ ## Limits
45
+
46
+ - Token classifier, not a generative redactor. Pair with your own substitution policy.
47
+ - `PERSON` is the weakest Spanish type (F1 0.78 on the tracked eval).
48
+ - Max 512 tokens. Not a legal or privacy-compliance guarantee.
49
+
50
+ ## Training
51
+
52
+ Fine-tune of [`microsoft/deberta-v3-xsmall`](https://huggingface.co/microsoft/deberta-v3-xsmall) (MIT) as `DebertaV2ForTokenClassification`, EN+ES SFT, 3 epochs.
53
+
54
+ ## License
55
+
56
+ MIT. Include this notice and the DeBERTa-v3 MIT notice when you redistribute.
config.json ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DebertaV2ForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 1,
7
+ "dtype": "float32",
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "id2label": {
13
+ "0": "O",
14
+ "1": "B-ACCOUNT_IBAN",
15
+ "2": "B-ADDRESS",
16
+ "3": "B-CREDIT_CARD",
17
+ "4": "B-DATE_DOB",
18
+ "5": "B-EMAIL",
19
+ "6": "B-ID_NUMBER",
20
+ "7": "B-IP",
21
+ "8": "B-ORG",
22
+ "9": "B-PERSON",
23
+ "10": "B-PHONE",
24
+ "11": "B-USERNAME_URL",
25
+ "12": "I-ACCOUNT_IBAN",
26
+ "13": "I-ADDRESS",
27
+ "14": "I-CREDIT_CARD",
28
+ "15": "I-DATE_DOB",
29
+ "16": "I-EMAIL",
30
+ "17": "I-ID_NUMBER",
31
+ "18": "I-IP",
32
+ "19": "I-ORG",
33
+ "20": "I-PERSON",
34
+ "21": "I-PHONE",
35
+ "22": "I-USERNAME_URL"
36
+ },
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 1536,
39
+ "label2id": {
40
+ "B-ACCOUNT_IBAN": 1,
41
+ "B-ADDRESS": 2,
42
+ "B-CREDIT_CARD": 3,
43
+ "B-DATE_DOB": 4,
44
+ "B-EMAIL": 5,
45
+ "B-ID_NUMBER": 6,
46
+ "B-IP": 7,
47
+ "B-ORG": 8,
48
+ "B-PERSON": 9,
49
+ "B-PHONE": 10,
50
+ "B-USERNAME_URL": 11,
51
+ "I-ACCOUNT_IBAN": 12,
52
+ "I-ADDRESS": 13,
53
+ "I-CREDIT_CARD": 14,
54
+ "I-DATE_DOB": 15,
55
+ "I-EMAIL": 16,
56
+ "I-ID_NUMBER": 17,
57
+ "I-IP": 18,
58
+ "I-ORG": 19,
59
+ "I-PERSON": 20,
60
+ "I-PHONE": 21,
61
+ "I-USERNAME_URL": 22,
62
+ "O": 0
63
+ },
64
+ "layer_norm_eps": 1e-07,
65
+ "legacy": true,
66
+ "max_position_embeddings": 512,
67
+ "max_relative_positions": -1,
68
+ "model_type": "deberta-v2",
69
+ "norm_rel_ebd": "layer_norm",
70
+ "num_attention_heads": 6,
71
+ "num_hidden_layers": 12,
72
+ "pad_token_id": 0,
73
+ "pooler_dropout": 0.0,
74
+ "pooler_hidden_act": "gelu",
75
+ "pooler_hidden_size": 384,
76
+ "pos_att_type": [
77
+ "p2c",
78
+ "c2p"
79
+ ],
80
+ "position_biased_input": false,
81
+ "position_buckets": 256,
82
+ "relative_attention": true,
83
+ "share_att_key": true,
84
+ "tie_word_embeddings": true,
85
+ "transformers_version": "5.5.4",
86
+ "type_vocab_size": 0,
87
+ "use_cache": false,
88
+ "vocab_size": 128100
89
+ }
labels.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "labels": [
3
+ "O",
4
+ "B-ACCOUNT_IBAN",
5
+ "B-ADDRESS",
6
+ "B-CREDIT_CARD",
7
+ "B-DATE_DOB",
8
+ "B-EMAIL",
9
+ "B-ID_NUMBER",
10
+ "B-IP",
11
+ "B-ORG",
12
+ "B-PERSON",
13
+ "B-PHONE",
14
+ "B-USERNAME_URL",
15
+ "I-ACCOUNT_IBAN",
16
+ "I-ADDRESS",
17
+ "I-CREDIT_CARD",
18
+ "I-DATE_DOB",
19
+ "I-EMAIL",
20
+ "I-ID_NUMBER",
21
+ "I-IP",
22
+ "I-ORG",
23
+ "I-PERSON",
24
+ "I-PHONE",
25
+ "I-USERNAME_URL"
26
+ ],
27
+ "id2label": {
28
+ "0": "O",
29
+ "1": "B-ACCOUNT_IBAN",
30
+ "2": "B-ADDRESS",
31
+ "3": "B-CREDIT_CARD",
32
+ "4": "B-DATE_DOB",
33
+ "5": "B-EMAIL",
34
+ "6": "B-ID_NUMBER",
35
+ "7": "B-IP",
36
+ "8": "B-ORG",
37
+ "9": "B-PERSON",
38
+ "10": "B-PHONE",
39
+ "11": "B-USERNAME_URL",
40
+ "12": "I-ACCOUNT_IBAN",
41
+ "13": "I-ADDRESS",
42
+ "14": "I-CREDIT_CARD",
43
+ "15": "I-DATE_DOB",
44
+ "16": "I-EMAIL",
45
+ "17": "I-ID_NUMBER",
46
+ "18": "I-IP",
47
+ "19": "I-ORG",
48
+ "20": "I-PERSON",
49
+ "21": "I-PHONE",
50
+ "22": "I-USERNAME_URL"
51
+ }
52
+ }
manifest.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "ALF-pii-nano-1.0",
3
+ "family": "ALF",
4
+ "track": "pii",
5
+ "tier": "nano",
6
+ "version": "1.0",
7
+ "description": "AtomicoLabs model family bilingual EN+ES PII token classifier. DeBERTa-v3-xsmall finetune.",
8
+ "files": {
9
+ "model": "model.safetensors",
10
+ "config": "config.json",
11
+ "tokenizer": "tokenizer.json"
12
+ },
13
+ "format": "safetensors",
14
+ "params": "~50M",
15
+ "max_length": 512,
16
+ "languages": ["en", "es"],
17
+ "base": "microsoft/deberta-v3-xsmall",
18
+ "architecture": "DebertaV2ForTokenClassification",
19
+ "scores": {
20
+ "f1_en": 0.897,
21
+ "f1_es": 0.939,
22
+ "grok_en": 0.893,
23
+ "grok_es": 0.895
24
+ }
25
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:418215e997425e703c41cfd1d46ef306073768b24cb80c4c733fa0feccfe754f
3
+ size 282788220
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "[CLS]",
5
+ "cls_token": "[CLS]",
6
+ "do_lower_case": false,
7
+ "eos_token": "[SEP]",
8
+ "extra_special_tokens": [
9
+ "[PAD]",
10
+ "[CLS]",
11
+ "[SEP]"
12
+ ],
13
+ "is_local": false,
14
+ "mask_token": "[MASK]",
15
+ "model_max_length": 1000000000000000019884624838656,
16
+ "pad_token": "[PAD]",
17
+ "sep_token": "[SEP]",
18
+ "split_by_punct": false,
19
+ "tokenizer_class": "DebertaV2Tokenizer",
20
+ "unk_id": 3,
21
+ "unk_token": "[UNK]",
22
+ "vocab_type": "spm"
23
+ }