Upload ./ with huggingface_hub
Browse files- README.md +47 -0
- config.json +24 -1
- 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 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd9479168b492efd8f48ea20ed221362c78a3bbe18a7bc47ae374e277b63f8b8
|
3 |
+
size 435801699
|