clairedhx commited on
Commit
a65403f
·
verified ·
1 Parent(s): d98bd5f

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ {
3
+ "language": "fr",
4
+ "license": "apache-2.0",
5
+ "tags": [
6
+ "medical",
7
+ "icd10",
8
+ "document-classification",
9
+ "text-classification"
10
+ ],
11
+ "pipeline_tag": "text-classification"
12
+ }
13
+ ---
14
+
15
+ # DP classifier (CIM-10, fr)
16
+
17
+ Modèle de classification du Diagnostic Principal (CIM-10) fine-tuné sur des comptes rendus.
18
+
19
+
20
+ **Exemples de labels (38 au total)** : ['C01', 'C02', 'C03', 'C04', 'C10', 'C13', 'C15', 'C16', 'C17', 'C18', 'C20', 'C22']
21
+
22
+ ## Utilisation (Transformers)
23
+ ```python
24
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
25
+
26
+ repo = "clairedhx/camembert_dp_ft_top40_bdx"
27
+ tok = AutoTokenizer.from_pretrained(repo, use_fast=True)
28
+ model = AutoModelForSequenceClassification.from_pretrained(repo)
29
+
30
+ x = tok("Douleur thoracique avec sus-décalage ST...", return_tensors="pt")
31
+ pred_id = int(model(**x).logits.argmax(-1))
32
+ print(model.config.id2label[pred_id])
33
+ ```
34
+
config.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CamembertForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 5,
7
+ "classifier_dropout": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 6,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "C01",
15
+ "1": "C02",
16
+ "2": "C03",
17
+ "3": "C04",
18
+ "4": "C10",
19
+ "5": "C13",
20
+ "6": "C15",
21
+ "7": "C16",
22
+ "8": "C17",
23
+ "9": "C18",
24
+ "10": "C20",
25
+ "11": "C22",
26
+ "12": "C25",
27
+ "13": "C32",
28
+ "14": "C34",
29
+ "15": "C43",
30
+ "16": "C44",
31
+ "17": "C50",
32
+ "18": "C53",
33
+ "19": "C54",
34
+ "20": "C56",
35
+ "21": "C61",
36
+ "22": "C62",
37
+ "23": "C64",
38
+ "24": "C67",
39
+ "25": "C71",
40
+ "26": "C73",
41
+ "27": "C77",
42
+ "28": "C78",
43
+ "29": "C79",
44
+ "30": "C81",
45
+ "31": "C82",
46
+ "32": "C83",
47
+ "33": "C84",
48
+ "34": "C88",
49
+ "35": "C90",
50
+ "36": "C91",
51
+ "37": "C92"
52
+ },
53
+ "initializer_range": 0.02,
54
+ "intermediate_size": 3072,
55
+ "label2id": {
56
+ "C01": 0,
57
+ "C02": 1,
58
+ "C03": 2,
59
+ "C04": 3,
60
+ "C10": 4,
61
+ "C13": 5,
62
+ "C15": 6,
63
+ "C16": 7,
64
+ "C17": 8,
65
+ "C18": 9,
66
+ "C20": 10,
67
+ "C22": 11,
68
+ "C25": 12,
69
+ "C32": 13,
70
+ "C34": 14,
71
+ "C43": 15,
72
+ "C44": 16,
73
+ "C50": 17,
74
+ "C53": 18,
75
+ "C54": 19,
76
+ "C56": 20,
77
+ "C61": 21,
78
+ "C62": 22,
79
+ "C64": 23,
80
+ "C67": 24,
81
+ "C71": 25,
82
+ "C73": 26,
83
+ "C77": 27,
84
+ "C78": 28,
85
+ "C79": 29,
86
+ "C81": 30,
87
+ "C82": 31,
88
+ "C83": 32,
89
+ "C84": 33,
90
+ "C88": 34,
91
+ "C90": 35,
92
+ "C91": 36,
93
+ "C92": 37
94
+ },
95
+ "layer_norm_eps": 1e-05,
96
+ "max_position_embeddings": 514,
97
+ "model_type": "camembert",
98
+ "num_attention_heads": 12,
99
+ "num_hidden_layers": 12,
100
+ "output_past": true,
101
+ "pad_token_id": 1,
102
+ "position_embedding_type": "absolute",
103
+ "problem_type": "single_label_classification",
104
+ "transformers_version": "4.57.1",
105
+ "type_vocab_size": 1,
106
+ "use_cache": true,
107
+ "vocab_size": 32005
108
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6eff2dbf0d22cca2409ec9fed24599d8875b088a65448b7272d750356dff8342
3
+ size 442628840
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
3
+ size 810912
special_tokens_map.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED",
5
+ "<unk>NOTUSED"
6
+ ],
7
+ "bos_token": {
8
+ "content": "<s>",
9
+ "lstrip": false,
10
+ "normalized": false,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "cls_token": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "eos_token": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "mask_token": {
29
+ "content": "<mask>",
30
+ "lstrip": true,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ },
35
+ "pad_token": {
36
+ "content": "<pad>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false
41
+ },
42
+ "sep_token": {
43
+ "content": "</s>",
44
+ "lstrip": false,
45
+ "normalized": false,
46
+ "rstrip": false,
47
+ "single_word": false
48
+ },
49
+ "unk_token": {
50
+ "content": "<unk>",
51
+ "lstrip": false,
52
+ "normalized": false,
53
+ "rstrip": false,
54
+ "single_word": false
55
+ }
56
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>NOTUSED",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>NOTUSED",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "<unk>NOTUSED",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "<s>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "</s>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "32004": {
60
+ "content": "<mask>",
61
+ "lstrip": true,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ }
67
+ },
68
+ "additional_special_tokens": [
69
+ "<s>NOTUSED",
70
+ "</s>NOTUSED",
71
+ "<unk>NOTUSED"
72
+ ],
73
+ "bos_token": "<s>",
74
+ "clean_up_tokenization_spaces": true,
75
+ "cls_token": "<s>",
76
+ "eos_token": "</s>",
77
+ "extra_special_tokens": {},
78
+ "mask_token": "<mask>",
79
+ "model_max_length": 512,
80
+ "pad_token": "<pad>",
81
+ "sep_token": "</s>",
82
+ "tokenizer_class": "CamembertTokenizer",
83
+ "unk_token": "<unk>"
84
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d38ee511004c55c430dcab9cc87c74c2ebd426584157f4c01d855fc73dde968
3
+ size 5432