jo-mengr commited on
Commit
e4ce79a
·
verified ·
1 Parent(s): aa1e811

Add new SentenceTransformer model

Browse files
0_MMContextEncoder/config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "text_encoder_name": "NeuML/pubmedbert-base-embeddings",
3
+ "adapter_hidden_dim": 512,
4
+ "adapter_output_dim": 1024,
5
+ "freeze_text_encoder": true,
6
+ "unfreeze_last_n_layers": 0,
7
+ "registered_data_origin": "unregistered",
8
+ "registered_input_dim": null,
9
+ "output_token_embeddings": false,
10
+ "train_lookup": false,
11
+ "pooling_mode": "mean",
12
+ "joint_adapter_hidden_dim": null,
13
+ "_joint_adapter_was_trained": false,
14
+ "max_seq_length": 512,
15
+ "text_model_kwargs": {}
16
+ }
0_MMContextEncoder/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63acb083c62bf243c3bbd39d1aba7320c64bbe3e4b14acac01d4b58bb0045f0d
3
+ size 441647280
README.md ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - code
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - dense
9
+ - generated_from_trainer
10
+ - dataset_size:81143
11
+ - loss:MultipleNegativesRankingLoss
12
+ base_model: NeuML/pubmedbert-base-embeddings
13
+ widget:
14
+ - source_sentence: sample_idx:census_d7d7e89c-c93a-422d-8958-9b4a90b69558_1563
15
+ sentences:
16
+ - This measurement was conducted with 10x 5' v1. Naive B cell from blood of a 26-year
17
+ old male, activated with CD3.
18
+ - sample_idx:census_d7d7e89c-c93a-422d-8958-9b4a90b69558_5036
19
+ - This measurement was conducted with 10x 5' v1. A 26-year-old male individual's
20
+ blood sample, containing naive thymus-derived CD4-positive, alpha-beta T cells,
21
+ with no activation or treatment, and in G1 phase.
22
+ - source_sentence: sample_idx:census_cf83c98a-3791-4537-bbde-a719f6d73c13_738
23
+ sentences:
24
+ - This measurement was conducted with 10x 3' v3. Blasts cells derived from the blood
25
+ of a 4-month old male.
26
+ - sample_idx:census_cf83c98a-3791-4537-bbde-a719f6d73c13_1016
27
+ - This measurement was conducted with 10x 3' v3. This is a megakaryocyte-erythroid
28
+ progenitor cell (MEP-like) derived from a 1-month-old female patient with KMT2A-rearranged
29
+ (KMT2A-r) infant acute lymphoblastic leukemia (ALL). The cell exhibits increased
30
+ lineage plasticity, downregulated steroid response pathways, and belongs to a
31
+ hematopoietic stem and progenitor-like (HSPC-like) population that forms an immunosuppressive
32
+ signaling circuit with cytotoxic lymphocytes.
33
+ - source_sentence: sample_idx:census_2872f4b0-b171-46e2-abc6-befcf6de6306_2050
34
+ sentences:
35
+ - sample_idx:census_2872f4b0-b171-46e2-abc6-befcf6de6306_1719
36
+ - This measurement was conducted with 10x 5' v2. Memory B cell derived from a 65-79
37
+ year-old male, taken from the mesenteric lymph node.
38
+ - This measurement was conducted with 10x 5' v2. IgA plasma cell sample taken from
39
+ the mesenteric lymph node of a 65-79 year-old female.
40
+ - source_sentence: sample_idx:census_3f31f8ce-bbf6-4df8-8203-aa240ed03026_299
41
+ sentences:
42
+ - This measurement was conducted with 10x 3' v3. Neuron cell type from a 50-year-old
43
+ male human cerebral cortex, specifically from the Cingulate gyrus, rostral (CgGr),
44
+ Ventral division of MFC - A24 region, with European self-reported ethnicity, analyzed
45
+ at the nucleus level.
46
+ - This measurement was conducted with 10x 3' v3. Neuron cell type from a 50-year-old
47
+ male human cerebral cortex, specifically the rostral cingulate gyrus, ventral
48
+ division of MFC, A24, with European ethnicity.
49
+ - sample_idx:census_3f31f8ce-bbf6-4df8-8203-aa240ed03026_30
50
+ - source_sentence: sample_idx:census_1b9d8702-5af8-4142-85ed-020eb06ec4f6_14644
51
+ sentences:
52
+ - sample_idx:census_1b9d8702-5af8-4142-85ed-020eb06ec4f6_16130
53
+ - This measurement was conducted with 10x 3' v3. Classical monocytes derived from
54
+ the blood of a female individual in her seventies.
55
+ - This measurement was conducted with 10x 5' v2. Sample is a CD8-positive, alpha-beta
56
+ memory T cell, specifically a cytotoxic T cell, from the lamina propria tissue
57
+ of an individual in her eighth decade of life.
58
+ datasets:
59
+ - jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation
60
+ pipeline_tag: sentence-similarity
61
+ library_name: sentence-transformers
62
+ metrics:
63
+ - cosine_accuracy
64
+ model-index:
65
+ - name: SentenceTransformer based on NeuML/pubmedbert-base-embeddings
66
+ results:
67
+ - task:
68
+ type: triplet
69
+ name: Triplet
70
+ dataset:
71
+ name: cellxgene pseudo bulk 100k multiplets natural language annotation cell
72
+ sentence 1
73
+ type: cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation_cell_sentence_1
74
+ metrics:
75
+ - type: cosine_accuracy
76
+ value: 0.5158140063285828
77
+ name: Cosine Accuracy
78
+ ---
79
+
80
+ # SentenceTransformer based on NeuML/pubmedbert-base-embeddings
81
+
82
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [NeuML/pubmedbert-base-embeddings](https://huggingface.co/NeuML/pubmedbert-base-embeddings) on the [cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation) dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
83
+
84
+ ## Model Details
85
+
86
+ ### Model Description
87
+ - **Model Type:** Sentence Transformer
88
+ - **Base model:** [NeuML/pubmedbert-base-embeddings](https://huggingface.co/NeuML/pubmedbert-base-embeddings) <!-- at revision d6eaca8254bc229f3ca42749a5510ae287eb3486 -->
89
+ - **Maximum Sequence Length:** 512 tokens
90
+ - **Output Dimensionality:** 1024 dimensions
91
+ - **Similarity Function:** Cosine Similarity
92
+ - **Training Dataset:**
93
+ - [cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation)
94
+ - **Language:** code
95
+ <!-- - **License:** Unknown -->
96
+
97
+ ### Model Sources
98
+
99
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
100
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
101
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
102
+
103
+ ### Full Model Architecture
104
+
105
+ ```
106
+ SentenceTransformer(
107
+ (0): MMContextEncoder(
108
+ (text_encoder): BertModel(
109
+ (embeddings): BertEmbeddings(
110
+ (word_embeddings): Embedding(30522, 768, padding_idx=0)
111
+ (position_embeddings): Embedding(512, 768)
112
+ (token_type_embeddings): Embedding(2, 768)
113
+ (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
114
+ (dropout): Dropout(p=0.1, inplace=False)
115
+ )
116
+ (encoder): BertEncoder(
117
+ (layer): ModuleList(
118
+ (0-11): 12 x BertLayer(
119
+ (attention): BertAttention(
120
+ (self): BertSdpaSelfAttention(
121
+ (query): Linear(in_features=768, out_features=768, bias=True)
122
+ (key): Linear(in_features=768, out_features=768, bias=True)
123
+ (value): Linear(in_features=768, out_features=768, bias=True)
124
+ (dropout): Dropout(p=0.1, inplace=False)
125
+ )
126
+ (output): BertSelfOutput(
127
+ (dense): Linear(in_features=768, out_features=768, bias=True)
128
+ (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
129
+ (dropout): Dropout(p=0.1, inplace=False)
130
+ )
131
+ )
132
+ (intermediate): BertIntermediate(
133
+ (dense): Linear(in_features=768, out_features=3072, bias=True)
134
+ (intermediate_act_fn): GELUActivation()
135
+ )
136
+ (output): BertOutput(
137
+ (dense): Linear(in_features=3072, out_features=768, bias=True)
138
+ (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
139
+ (dropout): Dropout(p=0.1, inplace=False)
140
+ )
141
+ )
142
+ )
143
+ )
144
+ (pooler): BertPooler(
145
+ (dense): Linear(in_features=768, out_features=768, bias=True)
146
+ (activation): Tanh()
147
+ )
148
+ )
149
+ (text_adapter): AdapterModule(
150
+ (net): Sequential(
151
+ (0): Linear(in_features=768, out_features=512, bias=True)
152
+ (1): ReLU(inplace=True)
153
+ (2): Linear(in_features=512, out_features=1024, bias=True)
154
+ (3): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
155
+ )
156
+ )
157
+ (pooling): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
158
+ )
159
+ )
160
+ ```
161
+
162
+ ## Usage
163
+
164
+ ### Direct Usage (Sentence Transformers)
165
+
166
+ First install the Sentence Transformers library:
167
+
168
+ ```bash
169
+ pip install -U sentence-transformers
170
+ ```
171
+
172
+ Then you can load this model and run inference.
173
+ ```python
174
+ from sentence_transformers import SentenceTransformer
175
+
176
+ # Download from the 🤗 Hub
177
+ model = SentenceTransformer("jo-mengr/mmcontext-pubmedbert-100k")
178
+ # Run inference
179
+ sentences = [
180
+ 'sample_idx:census_1b9d8702-5af8-4142-85ed-020eb06ec4f6_14644',
181
+ "This measurement was conducted with 10x 5' v2. Sample is a CD8-positive, alpha-beta memory T cell, specifically a cytotoxic T cell, from the lamina propria tissue of an individual in her eighth decade of life.",
182
+ "This measurement was conducted with 10x 3' v3. Classical monocytes derived from the blood of a female individual in her seventies.",
183
+ ]
184
+ embeddings = model.encode(sentences)
185
+ print(embeddings.shape)
186
+ # [3, 1024]
187
+
188
+ # Get the similarity scores for the embeddings
189
+ similarities = model.similarity(embeddings, embeddings)
190
+ print(similarities)
191
+ # tensor([[ 1.0000, -0.0963, -0.2026],
192
+ # [-0.0963, 1.0000, 0.9080],
193
+ # [-0.2026, 0.9080, 1.0000]])
194
+ ```
195
+
196
+ <!--
197
+ ### Direct Usage (Transformers)
198
+
199
+ <details><summary>Click to see the direct usage in Transformers</summary>
200
+
201
+ </details>
202
+ -->
203
+
204
+ <!--
205
+ ### Downstream Usage (Sentence Transformers)
206
+
207
+ You can finetune this model on your own dataset.
208
+
209
+ <details><summary>Click to expand</summary>
210
+
211
+ </details>
212
+ -->
213
+
214
+ <!--
215
+ ### Out-of-Scope Use
216
+
217
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
218
+ -->
219
+
220
+ ## Evaluation
221
+
222
+ ### Metrics
223
+
224
+ #### Triplet
225
+
226
+ * Dataset: `cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation_cell_sentence_1`
227
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
228
+
229
+ | Metric | Value |
230
+ |:--------------------|:-----------|
231
+ | **cosine_accuracy** | **0.5158** |
232
+
233
+ <!--
234
+ ## Bias, Risks and Limitations
235
+
236
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
237
+ -->
238
+
239
+ <!--
240
+ ### Recommendations
241
+
242
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
243
+ -->
244
+
245
+ ## Training Details
246
+
247
+ ### Training Dataset
248
+
249
+ #### cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation
250
+
251
+ * Dataset: [cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation) at [9916878](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation/tree/9916878bbf20fb8f9d6a0be4c997236e027cabd4)
252
+ * Size: 81,143 training samples
253
+ * Columns: <code>anchor</code>, <code>positive</code>, <code>negative_1</code>, and <code>negative_2</code>
254
+ * Approximate statistics based on the first 1000 samples:
255
+ | | anchor | positive | negative_1 | negative_2 |
256
+ |:--------|:-----------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
257
+ | type | string | string | string | string |
258
+ | details | <ul><li>min: 56 characters</li><li>mean: 58.72 characters</li><li>max: 60 characters</li></ul> | <ul><li>min: 92 characters</li><li>mean: 216.13 characters</li><li>max: 900 characters</li></ul> | <ul><li>min: 101 characters</li><li>mean: 215.14 characters</li><li>max: 870 characters</li></ul> | <ul><li>min: 56 characters</li><li>mean: 58.75 characters</li><li>max: 60 characters</li></ul> |
259
+ * Samples:
260
+ | anchor | positive | negative_1 | negative_2 |
261
+ |:--------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
262
+ | <code>sample_idx:census_218acb0f-9f2f-4f76-b90b-15a4b7c7f629_26009</code> | <code>This measurement was conducted with 10x 3' v2. A proliferating lymphocyte cell sample, obtained from a 34-year-old female Asian individual, derived from peripheral blood mononuclear cells.</code> | <code>This measurement was conducted with 10x 3' v2. Sample is a 25-year-old female with European ethnicity, having CD8-positive, alpha-beta T cell type. This cell type exhibits elevated expression of type 1 interferon-stimulated genes (ISGs) in monocytes, reduction of naïve CD4+ T cells correlating with monocyte ISG expression, and expansion of repertoire-restricted cytotoxic GZMH+ CD8+ T cells.</code> | <code>sample_idx:census_218acb0f-9f2f-4f76-b90b-15a4b7c7f629_14165</code> |
263
+ | <code>sample_idx:census_1b9d8702-5af8-4142-85ed-020eb06ec4f6_6333</code> | <code>This measurement was conducted with 10x 5' v1. Sample is a cell from the omentum tissue, specifically an effector memory CD4-positive, alpha-beta T cell, from a female in her sixth decade.</code> | <code>This measurement was conducted with 10x 5' v2. Conventional dendritic cell from the jejunal epithelium of a female in her eighth decade.</code> | <code>sample_idx:census_1b9d8702-5af8-4142-85ed-020eb06ec4f6_2714</code> |
264
+ | <code>sample_idx:census_adda0684-f8ea-4403-b393-2a25607077c4_271</code> | <code>This measurement was conducted with 10x 3' v3. Neuron cell type from a 29-year-old male, specifically from the thalamic complex, specifically the thalamus (THM) - posterior nuclear complex of thalamus (PoN) - medial geniculate nuclei (MG).</code> | <code>This measurement was conducted with 10x 3' v3. Neuron from the thalamic complex (thalamus, posterior nuclear complex of thalamus, medial geniculate nuclei) of a 42-year-old male, identified as a midbrain-derived inhibitory neuron.</code> | <code>sample_idx:census_adda0684-f8ea-4403-b393-2a25607077c4_425</code> |
265
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
266
+ ```json
267
+ {
268
+ "scale": 20.0,
269
+ "similarity_fct": "cos_sim"
270
+ }
271
+ ```
272
+
273
+ ### Evaluation Dataset
274
+
275
+ #### cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation
276
+
277
+ * Dataset: [cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation) at [9916878](https://huggingface.co/datasets/jo-mengr/cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation/tree/9916878bbf20fb8f9d6a0be4c997236e027cabd4)
278
+ * Size: 9,011 evaluation samples
279
+ * Columns: <code>anchor</code>, <code>positive</code>, <code>negative_1</code>, and <code>negative_2</code>
280
+ * Approximate statistics based on the first 1000 samples:
281
+ | | anchor | positive | negative_1 | negative_2 |
282
+ |:--------|:-----------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
283
+ | type | string | string | string | string |
284
+ | details | <ul><li>min: 56 characters</li><li>mean: 58.73 characters</li><li>max: 60 characters</li></ul> | <ul><li>min: 99 characters</li><li>mean: 209.99 characters</li><li>max: 941 characters</li></ul> | <ul><li>min: 102 characters</li><li>mean: 213.87 characters</li><li>max: 981 characters</li></ul> | <ul><li>min: 56 characters</li><li>mean: 58.73 characters</li><li>max: 60 characters</li></ul> |
285
+ * Samples:
286
+ | anchor | positive | negative_1 | negative_2 |
287
+ |:--------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------|
288
+ | <code>sample_idx:census_0b4a15a7-4e9e-4555-9733-2423e5c66469_490</code> | <code>This measurement was conducted with 10x 3' v3. Cell sample from the cortex of kidney, taken from a 43-year-old male of European ethnicity with a reported history of kidney cancer. The cell type is identified as a kidney collecting duct intercalated cell.</code> | <code>This measurement was conducted with 10x 3' v3. Kidney collecting duct intercalated cell from a 43-year old European male with kidney cancer, taken from the cortex of kidney and cryopreserved for further analysis.</code> | <code>sample_idx:census_0b4a15a7-4e9e-4555-9733-2423e5c66469_9</code> |
289
+ | <code>sample_idx:census_4976b234-9028-4b4b-8a2f-8ac59d636219_269</code> | <code>This measurement was conducted with 10x 3' v3. Neuron cell type from a 29-year-old male cerebellum, specifically from the Cerebellar Vermis - CBV region, with European self-reported ethnicity, analyzed at the nucleus level.</code> | <code>This measurement was conducted with 10x 3' v3. Endothelial cells derived from the cerebellum (specifically, cerebellar vermis) of a 42-year-old male, classified under the vascular supercluster term.</code> | <code>sample_idx:census_4976b234-9028-4b4b-8a2f-8ac59d636219_923</code> |
290
+ | <code>sample_idx:census_44882825-0da1-4547-b721-2c6105d4a9d1_10258</code> | <code>This measurement was conducted with 10x 5' v1. Cell sample from the tonsil of a 9-year-old female with recurrent tonsillitis, characterized as a centroblast B cell with IGLC2, IGLV7-43, IGLJ3 immunoglobulin genes expressed.</code> | <code>This measurement was conducted with 10x 5' v1. Centroblast cells derived from a 3-year-old male human tonsil sample, with obstructive sleep apnea and recurrent tonsillitis, undergoing affinity maturation and differentiation into memory or plasma cells.</code> | <code>sample_idx:census_44882825-0da1-4547-b721-2c6105d4a9d1_9654</code> |
291
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
292
+ ```json
293
+ {
294
+ "scale": 20.0,
295
+ "similarity_fct": "cos_sim"
296
+ }
297
+ ```
298
+
299
+ ### Training Hyperparameters
300
+ #### Non-Default Hyperparameters
301
+
302
+ - `eval_strategy`: steps
303
+ - `per_device_train_batch_size`: 256
304
+ - `per_device_eval_batch_size`: 256
305
+ - `learning_rate`: 0.05
306
+ - `num_train_epochs`: 4
307
+ - `warmup_ratio`: 0.1
308
+ - `bf16`: True
309
+
310
+ #### All Hyperparameters
311
+ <details><summary>Click to expand</summary>
312
+
313
+ - `overwrite_output_dir`: False
314
+ - `do_predict`: False
315
+ - `eval_strategy`: steps
316
+ - `prediction_loss_only`: True
317
+ - `per_device_train_batch_size`: 256
318
+ - `per_device_eval_batch_size`: 256
319
+ - `per_gpu_train_batch_size`: None
320
+ - `per_gpu_eval_batch_size`: None
321
+ - `gradient_accumulation_steps`: 1
322
+ - `eval_accumulation_steps`: None
323
+ - `torch_empty_cache_steps`: None
324
+ - `learning_rate`: 0.05
325
+ - `weight_decay`: 0.0
326
+ - `adam_beta1`: 0.9
327
+ - `adam_beta2`: 0.999
328
+ - `adam_epsilon`: 1e-08
329
+ - `max_grad_norm`: 1.0
330
+ - `num_train_epochs`: 4
331
+ - `max_steps`: -1
332
+ - `lr_scheduler_type`: linear
333
+ - `lr_scheduler_kwargs`: {}
334
+ - `warmup_ratio`: 0.1
335
+ - `warmup_steps`: 0
336
+ - `log_level`: passive
337
+ - `log_level_replica`: warning
338
+ - `log_on_each_node`: True
339
+ - `logging_nan_inf_filter`: True
340
+ - `save_safetensors`: True
341
+ - `save_on_each_node`: False
342
+ - `save_only_model`: False
343
+ - `restore_callback_states_from_checkpoint`: False
344
+ - `no_cuda`: False
345
+ - `use_cpu`: False
346
+ - `use_mps_device`: False
347
+ - `seed`: 42
348
+ - `data_seed`: None
349
+ - `jit_mode_eval`: False
350
+ - `use_ipex`: False
351
+ - `bf16`: True
352
+ - `fp16`: False
353
+ - `fp16_opt_level`: O1
354
+ - `half_precision_backend`: auto
355
+ - `bf16_full_eval`: False
356
+ - `fp16_full_eval`: False
357
+ - `tf32`: None
358
+ - `local_rank`: 0
359
+ - `ddp_backend`: None
360
+ - `tpu_num_cores`: None
361
+ - `tpu_metrics_debug`: False
362
+ - `debug`: []
363
+ - `dataloader_drop_last`: False
364
+ - `dataloader_num_workers`: 0
365
+ - `dataloader_prefetch_factor`: None
366
+ - `past_index`: -1
367
+ - `disable_tqdm`: False
368
+ - `remove_unused_columns`: True
369
+ - `label_names`: None
370
+ - `load_best_model_at_end`: False
371
+ - `ignore_data_skip`: False
372
+ - `fsdp`: []
373
+ - `fsdp_min_num_params`: 0
374
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
375
+ - `fsdp_transformer_layer_cls_to_wrap`: None
376
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
377
+ - `deepspeed`: None
378
+ - `label_smoothing_factor`: 0.0
379
+ - `optim`: adamw_torch
380
+ - `optim_args`: None
381
+ - `adafactor`: False
382
+ - `group_by_length`: False
383
+ - `length_column_name`: length
384
+ - `ddp_find_unused_parameters`: None
385
+ - `ddp_bucket_cap_mb`: None
386
+ - `ddp_broadcast_buffers`: False
387
+ - `dataloader_pin_memory`: True
388
+ - `dataloader_persistent_workers`: False
389
+ - `skip_memory_metrics`: True
390
+ - `use_legacy_prediction_loop`: False
391
+ - `push_to_hub`: False
392
+ - `resume_from_checkpoint`: None
393
+ - `hub_model_id`: None
394
+ - `hub_strategy`: every_save
395
+ - `hub_private_repo`: None
396
+ - `hub_always_push`: False
397
+ - `hub_revision`: None
398
+ - `gradient_checkpointing`: False
399
+ - `gradient_checkpointing_kwargs`: None
400
+ - `include_inputs_for_metrics`: False
401
+ - `include_for_metrics`: []
402
+ - `eval_do_concat_batches`: True
403
+ - `fp16_backend`: auto
404
+ - `push_to_hub_model_id`: None
405
+ - `push_to_hub_organization`: None
406
+ - `mp_parameters`:
407
+ - `auto_find_batch_size`: False
408
+ - `full_determinism`: False
409
+ - `torchdynamo`: None
410
+ - `ray_scope`: last
411
+ - `ddp_timeout`: 1800
412
+ - `torch_compile`: False
413
+ - `torch_compile_backend`: None
414
+ - `torch_compile_mode`: None
415
+ - `include_tokens_per_second`: False
416
+ - `include_num_input_tokens_seen`: False
417
+ - `neftune_noise_alpha`: None
418
+ - `optim_target_modules`: None
419
+ - `batch_eval_metrics`: False
420
+ - `eval_on_start`: False
421
+ - `use_liger_kernel`: False
422
+ - `liger_kernel_config`: None
423
+ - `eval_use_gather_object`: False
424
+ - `average_tokens_across_devices`: False
425
+ - `prompts`: None
426
+ - `batch_sampler`: batch_sampler
427
+ - `multi_dataset_batch_sampler`: proportional
428
+ - `router_mapping`: {}
429
+ - `learning_rate_mapping`: {}
430
+
431
+ </details>
432
+
433
+ ### Training Logs
434
+ | Epoch | Step | Training Loss | cellxgene pseudo bulk 100k multiplets natural language annotation loss | cellxgene_pseudo_bulk_100k_multiplets_natural_language_annotation_cell_sentence_1_cosine_accuracy |
435
+ |:------:|:----:|:-------------:|:----------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|
436
+ | 0.3155 | 100 | 4.3241 | 22.9958 | 0.5035 |
437
+ | 0.6309 | 200 | 3.2968 | 21.9224 | 0.5026 |
438
+ | 0.9464 | 300 | 2.9589 | 21.0856 | 0.5008 |
439
+ | 1.2618 | 400 | 2.7865 | 21.0013 | 0.5055 |
440
+ | 1.5773 | 500 | 2.6859 | 19.5792 | 0.5096 |
441
+ | 1.8927 | 600 | 2.6192 | 19.5848 | 0.5105 |
442
+ | 2.2082 | 700 | 2.5577 | 19.8195 | 0.5115 |
443
+ | 2.5237 | 800 | 2.4599 | 18.7359 | 0.5118 |
444
+ | 2.8391 | 900 | 2.4419 | 18.0783 | 0.5138 |
445
+ | 3.1546 | 1000 | 2.423 | 17.2768 | 0.5156 |
446
+ | 3.4700 | 1100 | 2.4112 | 16.9335 | 0.5164 |
447
+ | 3.7855 | 1200 | 2.4067 | 16.4885 | 0.5158 |
448
+
449
+
450
+ ### Framework Versions
451
+ - Python: 3.11.6
452
+ - Sentence Transformers: 5.0.0
453
+ - Transformers: 4.55.0.dev0
454
+ - PyTorch: 2.5.1+cu121
455
+ - Accelerate: 1.9.0
456
+ - Datasets: 2.19.1
457
+ - Tokenizers: 0.21.4
458
+
459
+ ## Citation
460
+
461
+ ### BibTeX
462
+
463
+ #### Sentence Transformers
464
+ ```bibtex
465
+ @inproceedings{reimers-2019-sentence-bert,
466
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
467
+ author = "Reimers, Nils and Gurevych, Iryna",
468
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
469
+ month = "11",
470
+ year = "2019",
471
+ publisher = "Association for Computational Linguistics",
472
+ url = "https://arxiv.org/abs/1908.10084",
473
+ }
474
+ ```
475
+
476
+ #### MultipleNegativesRankingLoss
477
+ ```bibtex
478
+ @misc{henderson2017efficient,
479
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
480
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
481
+ year={2017},
482
+ eprint={1705.00652},
483
+ archivePrefix={arXiv},
484
+ primaryClass={cs.CL}
485
+ }
486
+ ```
487
+
488
+ <!--
489
+ ## Glossary
490
+
491
+ *Clearly define terms in order to be accessible across audiences.*
492
+ -->
493
+
494
+ <!--
495
+ ## Model Card Authors
496
+
497
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
498
+ -->
499
+
500
+ <!--
501
+ ## Model Card Contact
502
+
503
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
504
+ -->
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SentenceTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.0.0",
5
+ "transformers": "4.55.0.dev0",
6
+ "pytorch": "2.5.1+cu121"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
modules.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "0_MMContextEncoder",
6
+ "type": "mmcontext.models.mmcontextencoder.MMContextEncoder"
7
+ }
8
+ ]