CoolFace
Modelpublic

suh4s/insightflow-balanced-team-embed-v1-7099e82c-e4c8-48ed-88a8-36bd9255036b

sourceHugging Faceupdated 1y agoView on Hugging Face
1likes14downloads
Model Card

SentenceTransformer based on Snowflake/snowflake-arctic-embed-l

This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-l. 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.

Model Details

Model Description

  • —Model Type: Sentence Transformer
  • —Base model: Snowflake/snowflake-arctic-embed-l <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
  • —Maximum Sequence Length: 512 tokens
  • —Output Dimensionality: 1024 dimensions
  • —Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

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': 1024, '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("suh4s/insightflow-balanced-team-embed-v1-7099e82c-e4c8-48ed-88a8-36bd9255036b")
# Run inference
sentences = [
    'What benefits are mentioned for those who comply with the terms of the Project Gutenberg agreement?',
    '1.B. "Project Gutenberg" is a registered trademark. It may only be\nused on or associated in any way with an electronic work by people who\nagree to be bound by the terms of this agreement. There are a few\nthings that you can do with most Project Gutenberg-tm electronic works\neven without complying with the full terms of this agreement. See\nparagraph 1.C below. There are a lot of things you can do with Project\nGutenberg-tm electronic works if you follow the terms of this\nagreement and help preserve free future access to Project Gutenberg-tm\nelectronic works. See paragraph 1.E below.',
    'This is about all that he has to say. He will not entreat the judges to\nspare his life; neither will he present a spectacle of weeping\nchildren, although he, too, is not made of “rock or oak.” Some of the\njudges themselves may have complied with this practice on similar\noccasions, and he trusts that they will not be angry with him for not\nfollowing their example. But he feels that such conduct brings\ndiscredit on the name of Athens: he feels too, that the judge has sworn\nnot to give away justice; and he cannot be guilty of the impiety of\nasking the judge to break his oath, when he is himself being tried for\nimpiety.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

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

Evaluation

Metrics

Information Retrieval
MetricValue
cosine_accuracy@10.5729
cosine_accuracy@30.7271
cosine_accuracy@50.7792
cosine_accuracy@100.8417
cosine_precision@10.5729
cosine_precision@30.2424
cosine_precision@50.1558
cosine_precision@100.0842
cosine_recall@10.5729
cosine_recall@30.7271
cosine_recall@50.7792
cosine_recall@100.8417
cosine_ndcg@100.7066
cosine_mrr@100.6635
cosine_map@1000.6715
Information Retrieval
MetricValue
cosine_accuracy@10.5458
cosine_accuracy@30.725
cosine_accuracy@50.7833
cosine_accuracy@100.8667
cosine_precision@10.5458
cosine_precision@30.2417
cosine_precision@50.1567
cosine_precision@100.0867
cosine_recall@10.5458
cosine_recall@30.725
cosine_recall@50.7833
cosine_recall@100.8667
cosine_ndcg@100.7036
cosine_mrr@100.6518
cosine_map@1000.6594

<!--

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

Unnamed Dataset
  • —Size: 3,562 training samples
  • —Columns: <code>sentence0</code> and <code>sentence1</code>
  • —Approximate statistics based on the first 1000 samples: | | sentence0 | sentence1 | |:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 9 tokens</li><li>mean: 18.47 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 125.56 tokens</li><li>max: 220 tokens</li></ul> |
  • —Samples: | sentence0 | sentence1 | |:-----------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>What causes Kay to burst into tears in the passage? </code> | <code>"Roses bloom and fade away,<br> But we the Christ-child see alway."<br><br>Then Kay burst into tears. He wept so that the splinter of glass swam<br>out of his eye. Then he recognized Gerda and said joyfully, "Gerda, dear<br>little Gerda, where have you been all this time, and where have I been?"<br>And he looked all around him and said, "How cold it is, and how large<br>and empty it all looks," and he clung to Gerda, and she laughed and wept<br>for joy.</code> | | <code>How does Kay react upon recognizing Gerda?</code> | <code>"Roses bloom and fade away,<br> But we the Christ-child see alway."<br><br>Then Kay burst into tears. He wept so that the splinter of glass swam<br>out of his eye. Then he recognized Gerda and said joyfully, "Gerda, dear<br>little Gerda, where have you been all this time, and where have I been?"<br>And he looked all around him and said, "How cold it is, and how large<br>and empty it all looks," and he clung to Gerda, and she laughed and wept<br>for joy.</code> | | <code>What editions were compared to prepare the text mentioned in the context? </code> | <code>The text itself has been prepared by a comparison of the editions of<br>1634 and 1635. It should be borne in mind that Casaubon's is often<br>rather a paraphrase than a close translation; and it did not seem worth<br>while to notice every variation or amplification of the original. In<br>the original editions all that Casaubon conceives as understood, but<br>not expressed, is enclosed in square brackets. These brackets are here<br>omitted, as they interfere with the comfort of the reader; and so have<br>some of the alternative renderings suggested by the translator. In a few<br>cases, Latin words in the text have been replaced by English.</code> |
  • —Loss: <code>MatryoshkaLoss</code> with these parameters:
json
  {
      "loss": "MultipleNegativesRankingLoss",
      "matryoshka_dims": [
          768,
          512,
          256,
          128,
          64
      ],
      "matryoshka_weights": [
          1,
          1,
          1,
          1,
          1
      ],
      "n_dims_per_step": -1
  }

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —num_train_epochs: 10
  • —multi_dataset_batch_sampler: round_robin
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: 8
  • —per_device_eval_batch_size: 8
  • —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
  • —num_train_epochs: 10
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.0
  • —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: 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}
  • —tp_size: 0
  • —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: None
  • —hub_always_push: False
  • —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: False
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: False
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: round_robin

</details>

Training Logs

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

EpochStepTraining Losscosine_ndcg@10
0.056150-0.5573
0.1122100-0.6540
0.1684150-0.6854
0.2245200-0.7066
0.112150-0.7155
0.2242100-0.7171
0.3363150-0.7278
0.4484200-0.7270
0.5605250-0.7112
0.6726300-0.7238
0.7848350-0.7255
0.8969400-0.7120
1.0446-0.7164
1.0090450-0.7170
1.12115000.41130.7293
1.2332550-0.7032
1.3453600-0.7130
1.4574650-0.6967
1.5695700-0.7132
1.6816750-0.7089
1.7937800-0.7106
1.9058850-0.7148
2.0892-0.7118
2.0179900-0.7072
2.1300950-0.7111
2.242210000.24930.7178
2.35431050-0.7102
2.46641100-0.7090
2.57851150-0.7098
2.69061200-0.7136
2.80271250-0.7059
2.91481300-0.7131
3.01338-0.7166
3.02691350-0.7076
3.13901400-0.7101
3.25111450-0.7095
3.363215000.11730.6990
3.47531550-0.7016
3.58741600-0.6802
3.69961650-0.6917
3.81171700-0.7028
3.92381750-0.6976
4.01784-0.7015
4.03591800-0.6949
4.14801850-0.6894
4.26011900-0.6926
4.37221950-0.6929
4.484320000.0520.6984
4.59642050-0.7068
4.70852100-0.7101
4.82062150-0.6962
4.93272200-0.6968
5.02230-0.7083
5.04482250-0.7026
5.15702300-0.7023
5.26912350-0.7032
5.38122400-0.7087
5.49332450-0.7171
5.605425000.02910.7056
5.71752550-0.6969
5.82962600-0.7000
5.94172650-0.7012
6.02676-0.7068
6.05382700-0.7084
6.16592750-0.7002
6.27802800-0.7015
6.39012850-0.6974
6.50222900-0.6903
6.61432950-0.6943
6.726530000.03040.6938
6.83863050-0.6988
6.95073100-0.7001
7.03122-0.7004
7.06283150-0.7004
7.17493200-0.6950
7.28703250-0.6975
7.39913300-0.6927
7.51123350-0.6974
7.62333400-0.6928
7.73543450-0.6963
7.847535000.02070.6930
7.95963550-0.6938
8.03568-0.6952
8.07173600-0.6936
8.18393650-0.7045
8.29603700-0.6964
8.40813750-0.6940
8.52023800-0.6989
8.63233850-0.6991
8.74443900-0.6992
8.85653950-0.6997
8.968640000.02280.7004
9.04014-0.6993
9.08074050-0.7030
9.19284100-0.7040
9.30494150-0.7071
9.41704200-0.7059
9.52914250-0.7049
9.64134300-0.7037
9.75344350-0.7037
9.86554400-0.7038
9.97764450-0.7036
10.04460-0.7036

</details>

Framework Versions

  • —Python: 3.11.12
  • —Sentence Transformers: 4.1.0
  • —Transformers: 4.51.3
  • —PyTorch: 2.6.0+cu124
  • —Accelerate: 1.6.0
  • —Datasets: 3.6.0
  • —Tokenizers: 0.21.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",
}
MatryoshkaLoss
bibtex
@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}
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}
}

<!--

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