CoolFace
Modelpublic

jo-mengr/mmcontext-pubmedbert-gs10k

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
Model Card

MMContext Model Information

This model uses a custom MMContextEncoder architecture for multimodal embedding generation, combining text and omics data representations.

⚠️ Important: Loading Instructions

This model requires `trust_remote_code=True` to load properly.

python
from sentence_transformers import SentenceTransformer

# ✅ CORRECT: Load with trust_remote_code=True
model = SentenceTransformer('jo-mengr/mmcontext-pubmedbert-gs10k-cxg', trust_remote_code=True)

# Generate embeddings
texts = ["Cell type annotation", "Another description"]
embeddings = model.encode(texts)
print(f"Embeddings shape: {embeddings.shape}")

Model Details

  • —Architecture: MMContextEncoder (custom multimodal architecture)
  • —Text Encoder: NeuML/pubmedbert-base-embeddings
  • —Omics Embedding Method: gs10k
  • —Output Dimension: 2048
  • —Pooling Strategy: mean

Omics Embedding Method: GS10K

Gene Set enrichment-based embeddings (10k genes)

Usage Tutorial

📓 Tutorial Notebook: usage_tutorial.ipynb - Detailed usage examples and best practices

Model Architecture

The MMContextEncoder combines:

  • —Text Branch: NeuML/pubmedbert-base-embeddings with optional adapter layers
  • —Omics Branch: Lookup-based encoder with precomputed gs10k embeddings
  • —Adapters: Feed-forward projection layers for dimensionality alignment
  • —Pooling: mean pooling for sentence-level embeddings

Files in this Repository

  • —mmcontextencoder.py: Main model implementation
  • —adapters.py: Adapter modules for dimensionality mapping
  • —omicsencoder.py: Omics data encoder
  • —onehot.py: One-hot text encoder
  • —file_utils.py: Utility functions
  • —`usage_tutorial.ipynb`: Tutorial notebook with usage examples

Training Details

  • —Text Encoder: NeuML/pubmedbert-base-embeddings
  • —Embedding Method: gs10k
  • —Output Dimension: 2048
  • —Training Datasets: 2 datasets
  • —Text-only Datasets: 0 (None)
  • —Numeric Datasets: 2 (cellxgenepseudobulkfull, geohalf)
  • —Batch Size: 512
  • —Learning Rate: 2e-05
  • —Training Epochs: 16

This model was trained using the MMContext framework for multimodal single-cell analysis.


SentenceTransformer based on NeuML/pubmedbert-base-embeddings

This is a sentence-transformers model finetuned from NeuML/pubmedbert-base-embeddings on the cellxgene_pseudo_bulk_full_cell_sentence_1_caption and geo_half_cell_sentence_1_caption datasets. It maps sentences & paragraphs to a 2048-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): MMContextEncoder(
    (text_encoder): BertModel(
      (embeddings): BertEmbeddings(
        (word_embeddings): Embedding(30522, 768, padding_idx=0)
        (position_embeddings): Embedding(512, 768)
        (token_type_embeddings): Embedding(2, 768)
        (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
        (dropout): Dropout(p=0.1, inplace=False)
      )
      (encoder): BertEncoder(
        (layer): ModuleList(
          (0-11): 12 x BertLayer(
            (attention): BertAttention(
              (self): BertSdpaSelfAttention(
                (query): Linear(in_features=768, out_features=768, bias=True)
                (key): Linear(in_features=768, out_features=768, bias=True)
                (value): Linear(in_features=768, out_features=768, bias=True)
                (dropout): Dropout(p=0.1, inplace=False)
              )
              (output): BertSelfOutput(
                (dense): Linear(in_features=768, out_features=768, bias=True)
                (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
                (dropout): Dropout(p=0.1, inplace=False)
              )
            )
            (intermediate): BertIntermediate(
              (dense): Linear(in_features=768, out_features=3072, bias=True)
              (intermediate_act_fn): GELUActivation()
            )
            (output): BertOutput(
              (dense): Linear(in_features=3072, out_features=768, bias=True)
              (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)
              (dropout): Dropout(p=0.1, inplace=False)
            )
          )
        )
      )
      (pooler): BertPooler(
        (dense): Linear(in_features=768, out_features=768, bias=True)
        (activation): Tanh()
      )
    )
    (text_adapter): AdapterModule(
      (net): Sequential(
        (0): Linear(in_features=768, out_features=1024, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=1024, out_features=2048, bias=True)
        (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      )
    )
    (pooling): Pooling({'word_embedding_dimension': 2048, '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})
    (omics_adapter): AdapterModule(
      (net): Sequential(
        (0): Linear(in_features=10000, out_features=1024, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=1024, out_features=2048, bias=True)
        (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      )
    )
    (omics_encoder): MiniOmicsModel(
      (embeddings): Embedding(726794, 10000, padding_idx=0)
    )
  )
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    'sample_idx:census_367b55f4-d543-49aa-90e8-4765fcb8c687_969',
    "This measurement was conducted with 10x 3' v3. Neuron cell type from the thalamic complex, specifically the centromedian and parafasicular nuclei (CM and Pf), derived from a 42-year old male.",
    "This measurement was conducted with 10x 3' v3. Neuron cell type from a 42-year-old male, specifically from the thalamic complex with thalamic excitatory supercluster term, corresponding to the Thalamus (THM) - intralaminar nuclear complex (ILN) - posterior group of intralaminar nuclei (PILN) - centromedian and parafasicular nuclei - CM and Pf dissection.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 2048]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.5200, 0.4699],
#         [0.5200, 1.0000, 0.8290],
#         [0.4699, 0.8290, 1.0000]])

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

Evaluation

Metrics

Triplet
  • —Datasets: cellxgene_pseudo_bulk_full_cell_sentence_1_caption and geo_half_cell_sentence_1_caption
  • —Evaluated with <code>TripletEvaluator</code>
Metriccellxgene_pseudo_bulk_full_cell_sentence_1_captiongeo_half_cell_sentence_1_caption
cosine_accuracy0.92670.7779

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Datasets

cellxgenepseudobulkfullcellsentence1_caption
  • —Dataset: cellxgene_pseudo_bulk_full_cell_sentence_1_caption at 55717c1
  • —Size: 306,003 training samples
  • —Columns: <code>anchor</code>, <code>positive</code>, <code>negative1</code>, and <code>negative2</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | negative1 | negative2 | |:--------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------| | type | string | string | string | string | | details | <ul><li>min: 56 characters</li><li>mean: 58.69 characters</li><li>max: 60 characters</li></ul> | <ul><li>min: 22 tokens</li><li>mean: 47.33 tokens</li><li>max: 165 tokens</li></ul> | <ul><li>min: 22 tokens</li><li>mean: 49.45 tokens</li><li>max: 120 tokens</li></ul> | <ul><li>min: 56 characters</li><li>mean: 58.63 characters</li><li>max: 59 characters</li></ul> |
  • —Samples: | anchor | positive | negative1 | negative2 | |:-------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------| | <code>sampleidx:census9d5df009-eb76-43a3-b6cd-22017cc53700231</code> | <code>This measurement was conducted with 10x 3' v3. Gut endothelial cell derived from proximal colon of a male human fetus at 13th week post-fertilization stage.</code> | <code>This measurement was conducted with 10x 3' v3. Mesothelial cell derived from the proximal colon of a male human at 23rd week post-fertilization stage.</code> | <code>sampleidx:census9d5df009-eb76-43a3-b6cd-22017cc53700521</code> | | <code>sampleidx:census367b55f4-d543-49aa-90e8-4765fcb8c687132</code> | <code>This measurement was conducted with 10x 3' v3. Sample is an oligodendrocyte cell from a 29-year-old male human, specifically from the thalamic complex, with European self-reported ethnicity.</code> | <code>This measurement was conducted with 10x 3' v3. Neuron cell type from the thalamic complex, specifically the centromedian and parafasicular nuclei (CM and Pf), derived from a 42-year old male human donor.</code> | <code>sampleidx:census367b55f4-d543-49aa-90e8-4765fcb8c687134</code> | | <code>sampleidx:census1e6a6ef9-7ec9-4c90-bbfb-2ad3c3165fd19964</code> | <code>This measurement was conducted with Smart-seq2. Neutrophil cell type derived from the lung tissue of a 37-year old male with advanced stage non-small cell lung cancer (NSCLC), stage IV, who has never smoked. The cells exhibit an ALK mutation, with no mutations detected in BRAF, EGFR, ERBB2, KRAS, ROS, or TP53.</code> | <code>This measurement was conducted with 10x 3' v2. Myeloid cell derived from the lung tissue of a 65-year old male, located in normal adjacent tissue, with advanced non-small cell lung cancer (NSCLC), stage III.</code> | <code>sampleidx:census1e6a6ef9-7ec9-4c90-bbfb-2ad3c3165fd1972</code> |
  • —Loss: <code>mmcontext.utils.PerDatasetLossLogger</code>
geohalfcellsentence1_caption
  • —Dataset: geo_half_cell_sentence_1_caption at bc13ae5
  • —Size: 348,046 training samples
  • —Columns: <code>anchor</code>, <code>positive</code>, <code>negative1</code>, and <code>negative2</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | negative1 | negative2 | |:--------|:----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------| | type | string | string | string | string | | details | <ul><li>min: 20 characters</li><li>mean: 20.0 characters</li><li>max: 20 characters</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 36.82 tokens</li><li>max: 130 tokens</li></ul> | <ul><li>min: 19 tokens</li><li>mean: 34.25 tokens</li><li>max: 88 tokens</li></ul> | <ul><li>min: 20 characters</li><li>mean: 20.0 characters</li><li>max: 20 characters</li></ul> |
  • —Samples: | anchor | positive | negative1 | negative2 | |:----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------| | <code>sampleidx:SRX173216</code> | <code>This measurement was conducted with Illumina HiSeq 2000. B-cells from individual GM12004, assayed using global run-on technique. These are primary cells, with no reported treatment.</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 48 hour Activin treatment of H1 embryonic stem cells.</code> | <code>sampleidx:SRX189728</code> | | <code>sampleidx:SRX185041</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured chronic myelogenous leukemia (CML) cell line, specifically the human CML cell line K-562. This cell line is derived from a female hematological system disease, specifically a lymphoid neoplasm (leukemia) known as C.M.L., which is a type of neoplasm affecting the bone marrow. The sample has not undergone any treatment.</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured female human Chronic Myelogenous Leukemia (CML) cell line, K-562, which was grown in tissue culture. The sample has not received any treatment.</code> | <code>sampleidx:SRX185051</code> | | <code>sampleidx:SRX185046</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured female human Chronic Myelogenous Leukemia (CML) cell line, K-562, which was grown in tissue culture. The sample has not received any treatment.</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured chronic myelogenous leukemia (CML) cell line, specifically the human CML cell line K-562. This cell line is derived from a female hematological system disease, specifically a lymphoid neoplasm (leukemia) known as C.M.L., which is a type of neoplasm affecting the bone marrow. The sample has not undergone any treatment.</code> | <code>sampleidx:SRX185051</code> |
  • —Loss: <code>mmcontext.utils.PerDatasetLossLogger</code>

Evaluation Datasets

cellxgenepseudobulkfullcellsentence1_caption
  • —Dataset: cellxgene_pseudo_bulk_full_cell_sentence_1_caption at 55717c1
  • —Size: 33,937 evaluation samples
  • —Columns: <code>anchor</code>, <code>positive</code>, <code>negative1</code>, and <code>negative2</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | negative1 | negative2 | |:--------|:----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------| | type | string | string | string | string | | details | <ul><li>min: 56 characters</li><li>mean: 58.7 characters</li><li>max: 60 characters</li></ul> | <ul><li>min: 21 tokens</li><li>mean: 47.32 tokens</li><li>max: 147 tokens</li></ul> | <ul><li>min: 21 tokens</li><li>mean: 44.03 tokens</li><li>max: 88 tokens</li></ul> | <ul><li>min: 56 characters</li><li>mean: 58.76 characters</li><li>max: 60 characters</li></ul> |
  • —Samples: | anchor | positive | negative1 | negative2 | |:--------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------| | <code>sampleidx:census7db0c178-b0a4-442f-ba54-e9e1633a84bb763</code> | <code>This measurement was conducted with 10x 3' v3. Oligodendrocyte cell sample taken from the cerebral cortex (Cx) of a 42-year-old male, specifically from the human A43 region.</code> | <code>This measurement was conducted with 10x 3' v3. Neuron cell type from a 50-year old male, specifically an MGE interneuron, located in the cerebral cortex, parietal operculum, gustatory cortex, A43 region.</code> | <code>sampleidx:census7db0c178-b0a4-442f-ba54-e9e1633a84bb541</code> | | <code>sampleidx:census1e6a6ef9-7ec9-4c90-bbfb-2ad3c3165fd118907</code> | <code>This measurement was conducted with 10x 3' v2. Endothelial cell, specifically a vein endothelial cell, derived from normal adjacent lung tissue of a 71-year-old female patient with early stage NSCLC (stage I) who has a history of smoking.</code> | <code>This measurement was conducted with 10x 3' v2. Endothelial cell derived from the lymphatic vessel of a 69-year-old male with early stage non-small cell lung cancer (NSCLC), stage II. The patient has a history of smoking and the cell was obtained from the primary tumor site.</code> | <code>sampleidx:census1e6a6ef9-7ec9-4c90-bbfb-2ad3c3165fd116402</code> | | <code>sampleidx:censusfd072bc3-2dfb-46f8-b4e3-467cb32231823695</code> | <code>This measurement was conducted with 10x 3' v2. Endothelial cells collected from the spleen of a male human fetus at 15 weeks post-fertilization.</code> | <code>This measurement was conducted with 10x 5' v1. A native cell from the skin of a female human fetus at 11 weeks post-fertilization, identified as a doublet of endothelial and erythrocyte lineage.</code> | <code>sampleidx:censusfd072bc3-2dfb-46f8-b4e3-467cb32231826661</code> |
  • —Loss: <code>mmcontext.utils.PerDatasetLossLogger</code>
geohalfcellsentence1_caption
  • —Dataset: geo_half_cell_sentence_1_caption at bc13ae5
  • —Size: 38,807 evaluation samples
  • —Columns: <code>anchor</code>, <code>positive</code>, <code>negative1</code>, and <code>negative2</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | negative1 | negative2 | |:--------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------| | type | string | string | string | string | | details | <ul><li>min: 20 characters</li><li>mean: 20.19 characters</li><li>max: 21 characters</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 37.63 tokens</li><li>max: 119 tokens</li></ul> | <ul><li>min: 16 tokens</li><li>mean: 54.71 tokens</li><li>max: 111 tokens</li></ul> | <ul><li>min: 20 characters</li><li>mean: 20.04 characters</li><li>max: 21 characters</li></ul> |
  • —Samples: | anchor | positive | negative1 | negative2 | |:----------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------| | <code>sampleidx:SRX185061</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured chronic myelogenous leukemia (CML) cell line (K-562) derived from a female hematological system disease (CML). The cells were grown in tissue culture and have undergone Ribo-Zero treatment.</code> | <code>This measurement was conducted with Illumina HiSeq 1000. The sample is a cell line (OCI-LY1) derived from a diffuse large B-cell lymphoma (DLBCL), a type of non-Hodgkin lymphoma that affects the lymphatic system. The cells have been treated with siNT (a non-coding siRNA) for 48 hours.</code> | <code>sampleidx:SRX188847</code> | | <code>sampleidx:SRX185895</code> | <code>This measurement was conducted with Illumina HiSeq 1000. The sample is a cell line (OCI-LY1) derived from a diffuse large B-cell lymphoma (DLBCL), a type of non-Hodgkin lymphoma that affects the lymphatic system. The cells have been treated with siNT (a non-coding siRNA) for 48 hours.</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured chronic myelogenous leukemia (CML) cell line (K-562) derived from a female hematological system disease (CML). The cells were grown in tissue culture and have undergone Ribo-Zero treatment.</code> | <code>sampleidx:SRX188847</code> | | <code>sampleidx:SRX188847</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 48-hour Activin-treated H1 embryonic stem cells.</code> | <code>This measurement was conducted with Illumina HiSeq 2000. 1000 ng of fragmented total RNA from a cultured chronic myelogenous leukemia (CML) cell line (K-562) derived from a female hematological system disease (CML). The cells were grown in tissue culture and have undergone Ribo-Zero treatment.</code> | <code>sampleidx:SRX185895</code> |
  • —Loss: <code>mmcontext.utils.PerDatasetLossLogger</code>

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —per_device_train_batch_size: 512
  • —per_device_eval_batch_size: 512
  • —learning_rate: 2e-05
  • —num_train_epochs: 16
  • —warmup_ratio: 0.1
  • —bf16: True
All Hyperparameters

<details><summary>Click to expand</summary>

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: steps
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 512
  • —per_device_eval_batch_size: 512
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 1
  • —eval_accumulation_steps: None
  • —torch_empty_cache_steps: None
  • —learning_rate: 2e-05
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —max_grad_norm: 1.0
  • —num_train_epochs: 16
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.1
  • —warmup_steps: 0
  • —log_level: passive
  • —log_level_replica: warning
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —save_safetensors: True
  • —save_on_each_node: False
  • —save_only_model: False
  • —restore_callback_states_from_checkpoint: False
  • —no_cuda: False
  • —use_cpu: False
  • —use_mps_device: False
  • —seed: 42
  • —data_seed: None
  • —jit_mode_eval: False
  • —bf16: True
  • —fp16: False
  • —fp16_opt_level: O1
  • —half_precision_backend: auto
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —local_rank: 0
  • —ddp_backend: None
  • —tpu_num_cores: None
  • —tpu_metrics_debug: False
  • —debug: []
  • —dataloader_drop_last: False
  • —dataloader_num_workers: 0
  • —dataloader_prefetch_factor: None
  • —past_index: -1
  • —disable_tqdm: False
  • —remove_unused_columns: True
  • —label_names: None
  • —load_best_model_at_end: False
  • —ignore_data_skip: False
  • —fsdp: []
  • —fsdp_min_num_params: 0
  • —fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —group_by_length: False
  • —length_column_name: length
  • —project: huggingface
  • —trackio_space_id: trackio
  • —ddp_find_unused_parameters: None
  • —ddp_bucket_cap_mb: None
  • —ddp_broadcast_buffers: False
  • —dataloader_pin_memory: True
  • —dataloader_persistent_workers: False
  • —skip_memory_metrics: True
  • —use_legacy_prediction_loop: False
  • —push_to_hub: False
  • —resume_from_checkpoint: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —hub_private_repo: None
  • —hub_always_push: False
  • —hub_revision: None
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —include_inputs_for_metrics: False
  • —include_for_metrics: []
  • —eval_do_concat_batches: True
  • —fp16_backend: auto
  • —push_to_hub_model_id: None
  • —push_to_hub_organization: None
  • —mp_parameters:
  • —auto_find_batch_size: False
  • —full_determinism: False
  • —torchdynamo: None
  • —ray_scope: last
  • —ddp_timeout: 1800
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —include_tokens_per_second: False
  • —include_num_input_tokens_seen: no
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: True
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

<details><summary>Click to expand</summary>

EpochStepTraining Losscellxgene pseudo bulk full cell sentence 1 caption lossgeo half cell sentence 1 caption losscellxgene_pseudo_bulk_full_cell_sentence_1_caption_cosine_accuracygeo_half_cell_sentence_1_caption_cosine_accuracy
0.156510012.590611.738411.54540.53960.5698
0.313020010.20969.05309.58280.62430.6534
0.46953007.63536.999710.43010.71960.6659
0.62604005.85096.058811.41040.75590.6726
0.78255005.07195.91719.54490.78190.6830
0.93906004.56245.88578.48830.80280.6891
1.09557004.09236.21528.65820.81960.6938
1.25208003.86286.07068.55980.82840.6975
1.40859003.6285.36568.89500.83990.6946
1.564910003.44055.48028.59980.84810.7067
1.721411003.29635.131510.01970.85400.7054
1.877912003.17225.22848.74890.85920.7137
2.034413003.01635.06199.27920.86580.7159
2.190914002.87755.13849.08960.86460.7224
2.347415002.77115.10649.19050.87210.7253
2.503916002.70794.811210.12730.88130.7219
2.660417002.61864.78619.49850.88530.7281
2.816918002.56784.777710.27130.88520.7266
2.973419002.50174.71629.49620.88510.7316
3.129920002.39185.19059.38730.89010.7330
3.286421002.33174.623910.01860.89410.7358
3.442922002.28914.631110.18450.89810.7357
3.599423002.23774.67859.60800.89480.7391
3.755924002.1954.59959.99790.89830.7379
3.912425002.16394.80479.52340.90120.7401
4.068926002.10214.594010.86470.90170.7383
4.225427002.03524.823111.86000.90320.7369
4.381828002.01814.530810.61250.90160.7451
4.538329001.98764.636410.03040.90300.7434
4.694830001.95774.444810.71850.90580.7436
4.851331001.92964.34819.81660.90940.7472
5.007832001.90334.389210.20610.91010.7497
5.164333001.84174.614211.59010.91150.7423
5.320834001.82854.417710.93170.91250.7457
5.477335001.80184.821210.35290.91200.7492
5.633836001.78854.322810.33390.91150.7505
5.790337001.77154.507711.20750.91270.7502
5.946838001.74874.508211.58990.91440.7488
6.103339001.70964.422011.20940.91380.7528
6.259840001.68394.487411.38420.91470.7531
6.416341001.66814.507610.13230.91510.7552
6.572842001.65874.386610.90800.91760.7562
6.729343001.64424.510210.44400.91640.7567
6.885844001.6334.382710.36770.91650.7566
7.042345001.61064.374210.48750.91680.7580
7.198746001.57244.377611.00990.91890.7599
7.355247001.5694.471311.48580.91800.7596
7.511748001.55685.098312.87970.91800.7552
7.668249001.55044.557511.95150.92070.7568
7.824750001.54574.404911.09200.91760.7613
7.981251001.52894.351710.37650.92130.7654
8.137752001.49164.745010.88920.91900.7654
8.294253001.48274.346110.97100.92160.7649
8.450754001.47644.498811.69650.92140.7625
8.607255001.46954.764411.06180.92090.7660
8.763756001.46774.299710.97740.92140.7679
8.920257001.46014.520411.73390.92150.7635
9.076758001.44384.394610.89260.92160.7673
9.233259001.41224.470710.67630.92100.7685
9.389760001.41444.398310.67370.92190.7697
9.546261001.41514.533711.61320.92370.7665
9.702762001.41054.271810.90750.92400.7672
9.859263001.39984.238610.56330.92220.7709
10.015664001.39624.440011.29770.92210.7697
10.172165001.3644.476110.84770.92380.7724
10.328666001.36334.315110.74040.92340.7757
10.485167001.3634.464311.00580.92410.7738
10.641668001.35014.348211.30790.92410.7723
10.798169001.35875.511913.58210.92440.7640
10.954670001.34794.842511.05860.92390.7721
11.111171001.32794.552811.75570.92470.7712
11.267672001.31994.511010.89920.92460.7747
11.424173001.32485.635013.82060.92530.7626
11.580674001.31264.645712.20810.92590.7708
11.737175001.30214.296710.86230.92390.7752
11.893676001.31714.693012.14210.92580.7699
12.050177001.29974.485511.80600.92530.7713
12.206678001.28984.894511.27090.92510.7724
12.363179001.28154.295910.87040.92510.7745
12.519680001.28064.745411.47300.92620.7752
12.676181001.27755.525613.75290.92580.7672
12.832682001.2794.443711.51250.92600.7758
12.989083001.27574.604611.44590.92600.7752
13.145584001.25965.154213.10280.92620.7710
13.302085001.2554.568011.72330.92610.7750
13.458586001.25774.595511.92710.92620.7742
13.615087001.25425.641713.82720.92640.7679
13.771588001.24754.541111.32800.92600.7774
13.928089001.25684.573811.48830.92610.7768
14.084590001.25064.374011.19370.92680.7770
14.241091001.24634.667012.02310.92650.7743
14.397592001.24444.391011.29800.92710.7761
14.554093001.23614.899612.61560.92720.7732
14.710594001.23774.522611.43140.92630.7767
14.867095001.23154.423911.08990.92660.7785
15.023596001.22444.556611.79820.92660.7746
15.180097001.22334.473311.71350.92740.7765
15.336598001.22294.592312.01700.92720.7748
15.493099001.23174.522911.50020.92700.7768
15.6495100001.22084.425311.35590.92700.7772
15.8059101001.22754.513211.38650.92680.7767
15.9624102001.23024.490311.13280.92670.7779

</details>

Framework Versions

  • —Python: 3.12.8
  • —Sentence Transformers: 5.1.2
  • —Transformers: 4.57.2
  • —PyTorch: 2.9.1+cu128
  • —Accelerate: 1.12.0
  • —Datasets: 3.6.0
  • —Tokenizers: 0.22.1

Citation

BibTeX

Sentence Transformers
bibtex
@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->