havocy28 commited on
Commit
570d82a
1 Parent(s): 15eeefe

Upload ./ with huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +47 -0
  2. config.json +24 -1
  3. pytorch_model.bin +2 -2
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - veterinary
5
+ - pets
6
+ - vetbert
7
+ - BERT
8
+ widget:
9
+ - text: >-
10
+ Hx: 7 yo canine with history of vomiting intermittently since yesterday.
11
+ No other concerns. Still eating and drinking [MASK]. cPL negative.
12
+ example_title: normally
13
+ ---
14
+
15
+ # VetBERT Disease Syndrome Classifier
16
+
17
+ This is a finetuned version of the VetBERT model, designed to classify the disease syndrome within a veterinary clinical note.
18
+
19
+ <!-- Provide a quick summary of what the model is/does. -->
20
+ 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.
21
+
22
+ ## Pretraining Data
23
+
24
+ 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.
25
+
26
+ ## Pretraining Hyperparameters
27
+
28
+ 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).
29
+
30
+ ## VetBERT Finetuning
31
+
32
+ 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)
33
+
34
+ ## How to use the model
35
+
36
+ Load the model via the transformers library:
37
+
38
+ ```
39
+ from transformers import AutoTokenizer, AutoModel
40
+ tokenizer = AutoTokenizer.from_pretrained("havocy28/VetBERTDx")
41
+ model = AutoModel.from_pretrained("havocy28/VetBERTDx")
42
+ ```
43
+
44
+ ## Citation
45
+
46
+ 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.
47
+
config.json CHANGED
@@ -1 +1,24 @@
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}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForPreTraining"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 12,
16
+ "num_hidden_layers": 12,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "torch_dtype": "float32",
20
+ "transformers_version": "4.20.1",
21
+ "type_vocab_size": 2,
22
+ "use_cache": true,
23
+ "vocab_size": 28996
24
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e88b3d06652975f82f4e6c609cdb10cab61dc6525fc78c9f01b53cf06a60d134
3
- size 433432045
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd9479168b492efd8f48ea20ed221362c78a3bbe18a7bc47ae374e277b63f8b8
3
+ size 435801699