Fix model format with proper config and weights
Browse files- README.md +8 -17
- config.json +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- vocab.txt +0 -0
README.md
CHANGED
|
@@ -6,18 +6,13 @@ library_name: transformers
|
|
| 6 |
pipeline_tag: text-classification
|
| 7 |
tags:
|
| 8 |
- medical
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
source_space: sshan95/medicoder-ai-v2
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
This
|
| 17 |
-
|
| 18 |
-
## Model Description
|
| 19 |
-
|
| 20 |
-
MediCoder AI v2 converted from Space to proper model repository for easier integration and deployment.
|
| 21 |
|
| 22 |
## Usage
|
| 23 |
|
|
@@ -26,14 +21,10 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
| 26 |
|
| 27 |
tokenizer = AutoTokenizer.from_pretrained("sshan95/medicoder-ai-v2-model")
|
| 28 |
model = AutoModelForSequenceClassification.from_pretrained("sshan95/medicoder-ai-v2-model")
|
| 29 |
-
|
| 30 |
-
# Your inference code here
|
| 31 |
```
|
| 32 |
|
| 33 |
-
##
|
| 34 |
-
|
| 35 |
-
This model was originally deployed as a Space at: https://huggingface.co/spaces/sshan95/medicoder-ai-v2
|
| 36 |
-
|
| 37 |
-
## Conversion
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
| 6 |
pipeline_tag: text-classification
|
| 7 |
tags:
|
| 8 |
- medical
|
| 9 |
+
- icd10
|
| 10 |
+
- multilabel-classification
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# MediCoder AI v2 - Fixed Model
|
| 14 |
|
| 15 |
+
This is a properly formatted version of the MediCoder model for medical code classification.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
## Usage
|
| 18 |
|
|
|
|
| 21 |
|
| 22 |
tokenizer = AutoTokenizer.from_pretrained("sshan95/medicoder-ai-v2-model")
|
| 23 |
model = AutoModelForSequenceClassification.from_pretrained("sshan95/medicoder-ai-v2-model")
|
|
|
|
|
|
|
| 24 |
```
|
| 25 |
|
| 26 |
+
## Configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
- **Labels**: 25,719 ICD-10 codes
|
| 29 |
+
- **Architecture**: BERT-based
|
| 30 |
+
- **Task**: Multi-label medical code classification
|
config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:592d9849e5d1488ccc511c77c11444975a10fa9572c77749ebf7ff110ec7da6f
|
| 3 |
+
size 517064148
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "[PAD]",
|
| 51 |
+
"sep_token": "[SEP]",
|
| 52 |
+
"strip_accents": null,
|
| 53 |
+
"tokenize_chinese_chars": true,
|
| 54 |
+
"tokenizer_class": "BertTokenizer",
|
| 55 |
+
"unk_token": "[UNK]"
|
| 56 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|