pankajrajdeo commited on
Commit
7fb5274
·
verified ·
1 Parent(s): 35e4090

Upload BioForge Stage 4 model

Browse files
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ tags:
6
+ - sentence-transformers
7
+ - biomedical
8
+ - medical
9
+ - healthcare
10
+ - information-retrieval
11
+ - semantic-search
12
+ library_name: sentence-transformers
13
+ pipeline_tag: sentence-similarity
14
+ ---
15
+
16
+ # BioForge 4: Mixed
17
+
18
+ Part of the **BioForge Progressive Training Pipeline** - Stage 4: Mixed Foundational Model - Unified biomedical encoder (RECOMMENDED)
19
+
20
+ ## Model Overview
21
+
22
+ This is **Stage 4** in the BioForge progressive training curriculum.
23
+
24
+ ### Training Details
25
+
26
+ - **Training Data**: 2.35M mixed pairs (OWL + PubMed + CTG + UMLS)
27
+ - **Epochs**: 2
28
+ - **Batch Size**: 1024
29
+ - **Architecture**: bioformer-8L (BERT-based, 8 layers)
30
+ - **Embedding Dimension**: 384
31
+ - **Max Sequence Length**: 1024 tokens
32
+
33
+ ## Usage
34
+
35
+ ```python
36
+ from sentence_transformers import SentenceTransformer
37
+
38
+ # Load this model
39
+ model = SentenceTransformer("pankajrajdeo/bioforge-stage4-mixed")
40
+
41
+ # Encode medical text
42
+ sentences = [
43
+ "Type 2 diabetes mellitus",
44
+ "Myocardial infarction"
45
+ ]
46
+
47
+ embeddings = model.encode(sentences)
48
+ print(embeddings.shape) # (2, 384)
49
+ ```
50
+
51
+ ## BioForge Training Pipeline
52
+
53
+ The complete BioForge pipeline consists of:
54
+
55
+ 1. **Stage 1a**: PubMed Foundation → [`pankajrajdeo/bioforge-stage1a-pubmed`](https://huggingface.co/pankajrajdeo/bioforge-stage1a-pubmed)
56
+ 2. **Stage 1b**: Clinical Trials → [`pankajrajdeo/bioforge-stage1b-clinical-trials`](https://huggingface.co/pankajrajdeo/bioforge-stage1b-clinical-trials)
57
+ 3. **Stage 1c**: UMLS Ontology → [`pankajrajdeo/bioforge-stage1c-umls`](https://huggingface.co/pankajrajdeo/bioforge-stage1c-umls)
58
+ 4. **Stage 3b**: OWL Ontology (NameDropper) → [`pankajrajdeo/bioforge-namedropper-owl`](https://huggingface.co/pankajrajdeo/bioforge-namedropper-owl)
59
+ 5. **Stage 4**: Mixed Foundation ⭐ **RECOMMENDED** → [`pankajrajdeo/bioforge-stage4-mixed`](https://huggingface.co/pankajrajdeo/bioforge-stage4-mixed)
60
+
61
+ ## Recommended Model
62
+
63
+ For most use cases, we recommend **Stage 4 Mixed Model** which combines all training data for the best overall performance.
64
+
65
+ ## Citation
66
+
67
+ ```bibtex
68
+ @software{bioforge2025,
69
+ author = {Pankaj Rajdeo},
70
+ title = {BioForge: Progressive Biomedical Sentence Embeddings},
71
+ year = {2025},
72
+ publisher = {Hugging Face},
73
+ url = {https://huggingface.co/pankajrajdeo/bioforge-stage4-mixed},
74
+ note = {Stage 4}
75
+ }
76
+ ```
77
+
78
+ ## License
79
+
80
+ MIT License
81
+
82
+ ## Contact
83
+
84
+ - **Author**: Pankaj Rajdeo
85
+ - **Institution**: Cincinnati Children's Hospital Medical Center
86
+ - **Hugging Face**: [@pankajrajdeo](https://huggingface.co/pankajrajdeo)
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
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": 384,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 1536,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 1024,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 6,
16
+ "num_hidden_layers": 16,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "torch_dtype": "float32",
20
+ "transformers_version": "4.53.2",
21
+ "type_vocab_size": 2,
22
+ "use_cache": true,
23
+ "vocab_size": 32768
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.53.2",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8580e70c3bd8f18a96f6ea13989b1300d9221020a19873d5e555d9751efe04b7
3
+ size 166097144
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 1024,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": false,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "max_length": 1024,
51
+ "model_max_length": 1024,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff