gbhong commited on
Commit
24248ed
1 Parent(s): adc2246

Add model and update readme

Browse files
.gitignore ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ignore Python cache and compiled files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+
6
+ # Ignore logs
7
+ *.log
8
+ logs/
9
+ *.out
10
+
11
+ # Ignore prediction files (JSON format)
12
+ *.json
13
+
14
+ # Ignore environment and dependency files
15
+ .env
16
+ *.env
17
+ *.venv
18
+ venv/
19
+ ENV/
20
+ *.lock
21
+
22
+ # Ignore Jupyter Notebook checkpoints
23
+ .ipynb_checkpoints
24
+
25
+ # Ignore temporary or backup files
26
+ *.bak
27
+ *.swp
28
+ *.tmp
29
+
30
+ # Ignore OS-specific files
31
+ .DS_Store
32
+ Thumbs.db
33
+
34
+ # Ignore model checkpoint files (optional)
35
+ checkpoint/
36
+ *.ckpt
37
+
38
+ # If using Hugging Face Model repository, don't ignore the following:
39
+ !config.json
40
+ !tokenizer_config.json
41
+ !tokenizer.json
42
+ !special_tokens_map.json
43
+ !added_tokens.json
44
+ !pytorch_model.bin
README.md CHANGED
@@ -10,4 +10,37 @@ base_model:
10
  - microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
11
  pipeline_tag: token-classification
12
  library_name: transformers
13
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  - microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
11
  pipeline_tag: token-classification
12
  library_name: transformers
13
+ ---
14
+
15
+ # Fine-tuned NER Model for DiMB-RE
16
+
17
+ ## Model Description
18
+ This is a fine-tuned **Named Entity Recognition (NER)** model based on the [BiomedNLP-BiomedBERT-base-uncased](https://huggingface.co/microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext) model, specifically designed for token classification tasks in the biomedical domain. The model has been trained on the DiMB-RE dataset and is optimized to identify spans for 15 different entity type, as well as 13 different trigger type.
19
+
20
+ <!-- ### Key Features:
21
+ - **Language**: English
22
+ - **Task**: Token classification for Named Entity Recognition (NER)
23
+ - **Base Model**: BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
24
+ - **Domains**: Biomedical, Clinical, Scientific -->
25
+
26
+ ## Performance
27
+ The model has been evaluated on the DiMB-RE using the following metrics:
28
+ - **NER** - P: 0.777, R: 0.745, F1: 0.760
29
+ - **NER Relaxed** - P: 0.852, R: 0.788, F1: 0.819
30
+ - **TRG** - P: 0.691, R: 0.631, F1: 0.660
31
+ - **TRG Relaxed** - P: 0.742, R: 0.678, F1: 0.708
32
+
33
+ ## Citation
34
+ If you use this model, please cite like below:
35
+
36
+ '''bibtex
37
+ @misc{hong2024dimbreminingscientificliterature,
38
+ title={DiMB-RE: Mining the Scientific Literature for Diet-Microbiome Associations},
39
+ author={Gibong Hong and Veronica Hindle and Nadine M. Veasley and Hannah D. Holscher and Halil Kilicoglu},
40
+ year={2024},
41
+ eprint={2409.19581},
42
+ archivePrefix={arXiv},
43
+ primaryClass={cs.CL},
44
+ url={https://arxiv.org/abs/2409.19581},
45
+ }
46
+ '''
added_tokens.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "[CLS]": 2,
3
+ "[MASK]": 4,
4
+ "[PAD]": 0,
5
+ "[SEP]": 3,
6
+ "[UNK]": 1
7
+ }
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext",
3
+ "architectures": [
4
+ "BertForEntity"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.34.0",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37a9620511bb4dfe44e362ac1e7373f3c0cf6e1d4f17c27e9b8195de44ef529a
3
+ size 440228250
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "additional_special_tokens": [],
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "[CLS]",
47
+ "do_basic_tokenize": true,
48
+ "do_lower_case": true,
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff