havocy28 commited on
Commit
32a2694
1 Parent(s): 1a7cabb

Upload ./ with huggingface_hub

Browse files
Files changed (6) hide show
  1. README.md +37 -1
  2. classes.npy +3 -0
  3. config.json +1 -0
  4. id2label.json +1 -0
  5. pytorch_model.bin +3 -0
  6. vocab.txt +0 -0
README.md CHANGED
@@ -1,3 +1,39 @@
1
  ---
2
- license: apache-2.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
+ {{ card_data }}
5
  ---
6
+
7
+ # VetBERT Disease Syndrome Classifier
8
+
9
+ This is a finetuned version of the VetBERT model, designed to classify the disease syndrome within a veterinary clinical note.
10
+
11
+ <!-- Provide a quick summary of what the model is/does. -->
12
+ This pretrained model is designed for performing NLP tasks related to veterinary clinical notes. The [Domain Adaptation and Instance Selection for Disease Syndrome Classification over Veterinary Clinical Notes](https://aclanthology.org/2020.bionlp-1.17) (Hur et al., BioNLP 2020) paper introduced VetBERT model: an initialized Bert Model with ClinicalBERT (Bio+Clinical BERT) and further pretrained on the [VetCompass Australia](https://www.vetcompass.com.au/) corpus for performing tasks specific to veterinary medicine.
13
+
14
+ ## Pretraining Data
15
+
16
+ The VetBERT model was initialized from [Bio_ClinicalBERT model](https://huggingface.co/emilyalsentzer/Bio_ClinicalBERT), which was initialized from BERT. The VetBERT model was trained on over 15 million veterinary clincal Records and 1.3 Billion tokens.
17
+
18
+ ## Pretraining Hyperparameters
19
+
20
+ During the pretraining phase for VetBERT, we used a batch size of 32, a maximum sequence length of 512, and a learning rate of 5 · 10−5. The dup factor for duplicating input data with different masks was set to 5. All other default parameters were used (specifically, masked language model probability = 0.15 and max predictions per sequence = 20).
21
+
22
+ ## VetBERT Finetuning
23
+
24
+ VetBERT was further finetuned on a set of 5002 annotated clinical notes to classifiy the disease syndrome associated with the clinical notes as outlined in the paper: [Domain Adaptation and Instance Selection for Disease Syndrome Classification over Veterinary Clinical Notes](https://aclanthology.org/2020.bionlp-1.17)
25
+
26
+ ## How to use the model
27
+
28
+ Load the model via the transformers library:
29
+
30
+ ```
31
+ from transformers import AutoTokenizer, AutoModel
32
+ tokenizer = AutoTokenizer.from_pretrained("havocy28/VetBERTDx")
33
+ model = AutoModel.from_pretrained("havocy28/VetBERTDx")
34
+ ```
35
+
36
+ ## Citation
37
+
38
+ Please cite this article: Brian Hur, Timothy Baldwin, Karin Verspoor, Laura Hardefeldt, and James Gilkerson. 2020. [Domain Adaptation and Instance Selection for Disease Syndrome Classification over Veterinary Clinical Notes](https://aclanthology.org/2020.bionlp-1.17). In Proceedings of the 19th SIGBioMed Workshop on Biomedical Language Processing, pages 156–166, Online. Association for Computational Linguistics.
39
+
classes.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e4314e5badd46e0ecef1358fc1338c63a6c9630b58fefee9958bf07979fb72c
3
+ size 1199
config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"_name_or_path": "./data/model", "architectures": ["BertForSequenceClassification"], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "id2label": {"0": "abscess", "1": "adverse reaction to drug", "2": "appetite disorder", "3": "blank", "4": "blood test", "5": "claw/nail disorder", "6": "dental disorder", "7": "disorder not diagnosed", "8": "ear disorder", "9": "endocrine system disorder", "10": "enteropathy", "11": "female reproductive disorder", "12": "fever (undiagnosed)", "13": "foreign body", "14": "heart disorder", "15": "intoxication", "16": "kidney disorder", "17": "lethargy", "18": "liver disorder", "19": "lower respiratory tract disorder", "20": "lymph node disorder", "21": "male reproductive disorder", "22": "mass", "23": "musculoskeletal disorder", "24": "neoplasia", "25": "neurological disorder", "26": "ophthalmological disorder", "27": "oral cavity disorder", "28": "other species", "29": "palliative", "30": "pancreatic disorder", "31": "post operative complication", "32": "prophylaxis", "33": "repeat", "34": "skin disorder", "35": "traumatic injury", "36": "unknown", "37": "upper respiratory tract disorder", "38": "urinary tract disorder"}, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": {"abscess": "0", "adverse reaction to drug": "1", "appetite disorder": "2", "blank": "3", "blood test": "4", "claw/nail disorder": "5", "dental disorder": "6", "disorder not diagnosed": "7", "ear disorder": "8", "endocrine system disorder": "9", "enteropathy": "10", "female reproductive disorder": "11", "fever (undiagnosed)": "12", "foreign body": "13", "heart disorder": "14", "intoxication": "15", "kidney disorder": "16", "lethargy": "17", "liver disorder": "18", "lower respiratory tract disorder": "19", "lymph node disorder": "20", "male reproductive disorder": "21", "mass": "22", "musculoskeletal disorder": "23", "neoplasia": "24", "neurological disorder": "25", "ophthalmological disorder": "26", "oral cavity disorder": "27", "other species": "28", "palliative": "29", "pancreatic disorder": "30", "post operative complication": "31", "prophylaxis": "32", "repeat": "33", "skin disorder": "34", "traumatic injury": "35", "unknown": "36", "upper respiratory tract disorder": "37", "urinary tract disorder": "38"}, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 0, "position_embedding_type": "absolute", "problem_type": "single_label_classification", "torch_dtype": "float32", "transformers_version": "4.20.1", "type_vocab_size": 2, "use_cache": true, "vocab_size": 28996}
id2label.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"0": "abscess", "1": "adverse reaction to drug", "2": "appetite disorder", "3": "blank", "4": "blood test", "5": "claw/nail disorder", "6": "dental disorder", "7": "disorder not diagnosed", "8": "ear disorder", "9": "endocrine system disorder", "10": "enteropathy", "11": "female reproductive disorder", "12": "fever (undiagnosed)", "13": "foreign body", "14": "heart disorder", "15": "intoxication", "16": "kidney disorder", "17": "lethargy", "18": "liver disorder", "19": "lower respiratory tract disorder", "20": "lymph node disorder", "21": "male reproductive disorder", "22": "mass", "23": "musculoskeletal disorder", "24": "neoplasia", "25": "neurological disorder", "26": "ophthalmological disorder", "27": "oral cavity disorder", "28": "other species", "29": "palliative", "30": "pancreatic disorder", "31": "post operative complication", "32": "prophylaxis", "33": "repeat", "34": "skin disorder", "35": "traumatic injury", "36": "unknown", "37": "upper respiratory tract disorder", "38": "urinary tract disorder"}
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e88b3d06652975f82f4e6c609cdb10cab61dc6525fc78c9f01b53cf06a60d134
3
+ size 433432045
vocab.txt ADDED
The diff for this file is too large to render. See raw diff