CoolFace
Modelpublic

SimoneAstarita/interstellar-ice-crystal-xs

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes82downloads
Model Card

interstellar-ice-crystal-xs

This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-xs. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. This was a proof-of-method model: it was created to show the applicability of some techniques to a certain dataset. It is not, however, really an improvement on the base model, and I advise against using in production.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: Snowflake/snowflake-arctic-embed-xs <!-- at revision 742da4f66e1823b5b4dbe6c320a1375a1fd85f9e -->
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 384 tokens
  • Similarity Function: Cosine Similarity
  • Training Dataset: scraped astronomy papers at the NLP for Space Science workshop.
  • Language: en
  • License: apache-2.0

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)

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("SimoneAstarita/interstellar-ice-crystal-xs")
# Run inference
sentences = [
    'New higher resolution images and our parametric modelling confirmed this finding.',
    'New higher resolution images and our parametric modelling confirmed this finding.',
    'Pan & Schlichting, 2012) and thus could slightly affect the surface density slope.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

<!--

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. -->

<!--

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 Dataset

The dataset is made of scrapes papers in astronomy, including abstract, introduction and conclusions. They are divided into sentences using nklt. We then duplicate them and train using the same senrence for positive and anchor. We are using SimSCE.

Unnamed Dataset
  • Size: 416,298 training samples
  • Columns: <code>anchor</code> and <code>positive</code>
  • Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 4 tokens</li><li>mean: 42.81 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 42.81 tokens</li><li>max: 512 tokens</li></ul> |
  • Samples: | anchor | positive | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Resolving the inner parsec of the blazar J1924–2914 with the Event Horizon Telescope</code> | <code>Resolving the inner parsec of the blazar J1924–2914 with the Event Horizon Telescope</code> | | <code>The radio source J1924–2914 (PKS 1921–293, OV–236) is a radio-loud quasar at a redshift z=0.353𝑧0.353z=0.353 (Wills & Wills, 1981; Jones et al., 2009).</code> | <code>The radio source J1924–2914 (PKS 1921–293, OV–236) is a radio-loud quasar at a redshift z=0.353𝑧0.353z=0.353 (Wills & Wills, 1981; Jones et al., 2009).</code> | | <code>The source exhibits strong optical variability and is highly polarized (Wills & Wills, 1981; Pica et al., 1988; Worrall & Wilkes, 1990).</code> | <code>The source exhibits strong optical variability and is highly polarized (Wills & Wills, 1981; Pica et al., 1988; Worrall & Wilkes, 1990).</code> |
  • Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }

Training Hyperparameters

Non-Default Hyperparameters
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • warmup_ratio: 0.1
  • fp16: True
  • batch_sampler: no_duplicates
All Hyperparameters

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

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • 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: 5e-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: 3
  • 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
  • use_ipex: False
  • bf16: False
  • fp16: True
  • 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}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • 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: False
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • 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
  • dispatch_batches: None
  • split_batches: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • eval_use_gather_object: False
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

</details>

Training Logs

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

EpochStepTraining Loss
0.00771000.0025
0.01542000.0032
0.02313000.0026
0.03074000.0026
0.03845000.0041
0.04616000.0014
0.05387000.0019
0.06158000.0015
0.06929000.001
0.076910000.0005
0.084611000.0004
0.092212000.0013
0.099913000.0013
0.107614000.0027
0.115315000.0018
0.123016000.001
0.130717000.0014
0.138418000.0012
0.146019000.0041
0.153720000.0009
0.161421000.0005
0.169122000.0011
0.176823000.001
0.184524000.0004
0.192225000.0011
0.199826000.0044
0.207527000.0004
0.215228000.0022
0.222929000.0007
0.230630000.0006
0.238331000.0002
0.246032000.0006
0.253733000.0004
0.261334000.0013
0.269035000.0006
0.276736000.0005
0.284437000.0018
0.292138000.0023
0.299839000.0011
0.307540000.0007
0.315141000.0008
0.322842000.0013
0.330543000.0012
0.338244000.001
0.345945000.0016
0.353646000.0025
0.361347000.0015
0.368948000.0018
0.376649000.0019
0.384350000.0021
0.392051000.0018
0.399752000.0004
0.407453000.0006
0.415154000.0007
0.422855000.0009
0.430456000.0004
0.438157000.0003
0.445858000.0007
0.453559000.0013
0.461260000.0007
0.468961000.0005
0.476662000.001
0.484263000.0027
0.491964000.0018
0.499665000.0006
0.507366000.0008
0.515067000.0006
0.522768000.0007
0.530469000.001
0.538070000.0007
0.545771000.0005
0.553472000.0012
0.561173000.0012
0.568874000.0011
0.576575000.0005
0.584276000.0013
0.591977000.0012
0.599578000.0007
0.607279000.0012
0.614980000.0012
0.622681000.0003
0.630382000.0003
0.638083000.0003
0.645784000.002
0.653385000.0003
0.661086000.0016
0.668787000.0003
0.676488000.0002
0.684189000.0006
0.691890000.0005
0.699591000.0017
0.707192000.0037
0.714893000.0005
0.722594000.0006
0.730295000.0004
0.737996000.0002
0.745697000.0008
0.753398000.0005
0.761099000.0006
0.7686100000.0004
0.7763101000.0004
0.7840102000.0006
0.7917103000.0019
0.7994104000.0007
0.8071105000.0003
0.8148106000.0003
0.8224107000.0005
0.8301108000.0009
0.8378109000.0006
0.8455110000.002
0.8532111000.0018
0.8609112000.0009
0.8686113000.0004
0.8762114000.0005
0.8839115000.0008
0.8916116000.0003
0.8993117000.0002
0.9070118000.0004
0.9147119000.0007
0.9224120000.0009
0.9301121000.0007
0.9377122000.0007
0.9454123000.0009
0.9531124000.0007
0.9608125000.0009
0.9685126000.0004
0.9762127000.0002
0.9839128000.0003
0.9915129000.0002
0.9992130000.0002
1.0069131000.0006
1.0146132000.0007
1.0223133000.0007
1.0300134000.0005
1.0377135000.0008
1.0453136000.0016
1.0530137000.0007
1.0607138000.0013
1.0684139000.0005
1.0761140000.0002
1.0838141000.0001
1.0915142000.0003
1.0992143000.0003
1.1068144000.0006
1.1145145000.0002
1.1222146000.0003
1.1299147000.0002
1.1376148000.0006
1.1453149000.0011
1.1530150000.0004
1.1606151000.0001
1.1683152000.0003
1.1760153000.0001
1.1837154000.0002
1.1914155000.0001
1.1991156000.003
1.2068157000.0001
1.2145158000.0002
1.2221159000.0005
1.2298160000.0004
1.2375161000.0001
1.2452162000.0003
1.2529163000.0003
1.2606164000.0008
1.2683165000.0004
1.2759166000.0001
1.2836167000.0002
1.2913168000.0011
1.2990169000.0001
1.3067170000.0001
1.3144171000.0002
1.3221172000.0005
1.3297173000.0012
1.3374174000.0003
1.3451175000.0002
1.3528176000.0009
1.3605177000.0003
1.3682178000.0005
1.3759179000.0008
1.3836180000.0005
1.3912181000.0007
1.3989182000.0002
1.4066183000.0003
1.4143184000.0002
1.4220185000.0001
1.4297186000.0001
1.4374187000.0001
1.4450188000.0005
1.4527189000.0002
1.4604190000.0001
1.4681191000.0002
1.4758192000.0006
1.4835193000.0015
1.4912194000.0012
1.4988195000.0003
1.5065196000.0005
1.5142197000.0001
1.5219198000.0002
1.5296199000.0009
1.5373200000.0002
1.5450201000.0001
1.5527202000.0003
1.5603203000.0006
1.5680204000.0002
1.5757205000.0004
1.5834206000.0006
1.5911207000.0004
1.5988208000.0002
1.6065209000.0006
1.6141210000.0006
1.6218211000.0001
1.6295212000.0001
1.6372213000.0001
1.6449214000.0008
1.6526215000.0001
1.6603216000.0005
1.6679217000.0001
1.6756218000.0001
1.6833219000.0001
1.6910220000.0001
1.6987221000.0008
1.7064222000.0014
1.7141223000.0002
1.7218224000.0007
1.7294225000.0001
1.7371226000.0001
1.7448227000.0001
1.7525228000.0002
1.7602229000.0002
1.7679230000.0001
1.7756231000.0001
1.7832232000.0005
1.7909233000.0004
1.7986234000.0002
1.8063235000.0001
1.8140236000.0001
1.8217237000.0001
1.8294238000.0004
1.8370239000.0002
1.8447240000.0002
1.8524241000.0013
1.8601242000.0004
1.8678243000.0002
1.8755244000.0002
1.8832245000.0001
1.8909246000.0001
1.8985247000.0001
1.9062248000.0002
1.9139249000.0005
1.9216250000.0001
1.9293251000.0001
1.9370252000.0002
1.9447253000.0002
1.9523254000.0006
1.9600255000.0004
1.9677256000.0002
1.9754257000.0001
1.9831258000.0001
1.9908259000.0001
1.9985260000.0001
2.0061261000.0002
2.0138262000.0007
2.0215263000.0003
2.0292264000.0001
2.0369265000.0011
2.0446266000.0002
2.0523267000.0001
2.0600268000.0002
2.0676269000.0004
2.0753270000.0001
2.0830271000.0001
2.0907272000.0001
2.0984273000.0002
2.1061274000.0001
2.1138275000.0001
2.1214276000.0001
2.1291277000.0001
2.1368278000.0003
2.1445279000.0012
2.1522280000.0001
2.1599281000.0001
2.1676282000.0001
2.1752283000.0001
2.1829284000.0001
2.1906285000.0001
2.1983286000.0014
2.2060287000.0001
2.2137288000.0001
2.2214289000.0002
2.2291290000.0
2.2367291000.0001
2.2444292000.0001
2.2521293000.0001
2.2598294000.0001
2.2675295000.0001
2.2752296000.0001
2.2829297000.0001
2.2905298000.0001
2.2982299000.0001
2.3059300000.0001
2.3136301000.0001
2.3213302000.0002
2.3290303000.0011
2.3367304000.0001
2.3444305000.0001
2.3520306000.0005
2.3597307000.0001
2.3674308000.0001
2.3751309000.0006
2.3828310000.0001
2.3905311000.0001
2.3982312000.0002
2.4058313000.0001
2.4135314000.0001
2.4212315000.0001
2.4289316000.0001
2.4366317000.0001
2.4443318000.0004
2.4520319000.0001
2.4596320000.0001
2.4673321000.0002
2.4750322000.0002
2.4827323000.0004
2.4904324000.0008
2.4981325000.0001
2.5058326000.0001
2.5135327000.0001
2.5211328000.0001
2.5288329000.0006
2.5365330000.0001
2.5442331000.0001
2.5519332000.0002
2.5596333000.0001
2.5673334000.0002
2.5749335000.0001
2.5826336000.0001
2.5903337000.0001
2.5980338000.0001
2.6057339000.0001
2.6134340000.0007
2.6211341000.0
2.6287342000.0001
2.6364343000.0001
2.6441344000.0006
2.6518345000.0001
2.6595346000.0001
2.6672347000.0001
2.6749348000.0
2.6826349000.0001
2.6902350000.0001
2.6979351000.0005
2.7056352000.0006
2.7133353000.0001
2.7210354000.0005
2.7287355000.0001
2.7364356000.0001
2.7440357000.0001
2.7517358000.0001
2.7594359000.0001
2.7671360000.0001
2.7748361000.0001
2.7825362000.0005
2.7902363000.0001
2.7978364000.0001
2.8055365000.0001
2.8132366000.0001
2.8209367000.0001
2.8286368000.0001
2.8363369000.0001
2.8440370000.0001
2.8517371000.0013
2.8593372000.0001
2.8670373000.0001
2.8747374000.0001
2.8824375000.0001
2.8901376000.0001
2.8978377000.0001
2.9055378000.0001
2.9131379000.0002
2.9208380000.0001
2.9285381000.0001
2.9362382000.0001
2.9439383000.0001
2.9516384000.0004
2.9593385000.0001
2.9669386000.0001
2.9746387000.0001
2.9823388000.0001
2.9900389000.0001
2.9977390000.0001

</details>

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.1.0
  • Transformers: 4.44.2
  • PyTorch: 2.4.0+cu121
  • Accelerate: 0.34.2
  • Datasets: 3.0.0
  • Tokenizers: 0.19.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",
}
MultipleNegativesRankingLoss
bibtex
@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    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},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

#Add SimSCE reference

<!--

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. -->