Fine-tuned snowflake actic xs based on MS-Marco triplets
This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-xs on the sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3 dataset. 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.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: Snowflake/snowflake-arctic-embed-xs
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 384 tokens
- Similarity Function: Cosine Similarity
- Training Dataset:
- sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3
- Language: en
- License: apache-2.0
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
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:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("krumeto/snowflake-arctic-embed-xs-ms-marco-triplet")
# Run inference
sentences = [
'Represent this sentence for searching relevant passages: how many pitchers used per game',
'In modern day baseball, teams generally have five starting pitchers, and they take it in turn to start a game every fifth day (hence the phrase rotation). Sometimes, if the schedule pans out, a team can get away with a four man rotation, and in the distant past some teams managed a three man rotation.',
'Accroding to the statistics in the Baseball Reference page showing 2014 Major League Baseball Pitching Pitches, 745 pitchers threw 704,983 pitches in 2430 games for an average of 290 pitches per game.',
]
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]
Evaluation
Metrics
Triplet
- Dataset:
xs-msmarco-triplet
- Evaluated with
TripletEvaluator
Metric | Value |
---|---|
cosine_accuracy | 0.571 |
dot_accuracy | 0.4286 |
manhattan_accuracy | 0.5728 |
euclidean_accuracy | 0.571 |
max_accuracy | 0.5728 |
Triplet
- Dataset:
xs-msmarco-triplet-train
- Evaluated with
TripletEvaluator
Metric | Value |
---|---|
cosine_accuracy | 0.5696 |
dot_accuracy | 0.43 |
manhattan_accuracy | 0.5674 |
euclidean_accuracy | 0.5696 |
max_accuracy | 0.5696 |
Training Details
Training Dataset
sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3
- Dataset: sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3
- Size: 100,000 training samples
- Columns:
query
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
query positive negative type string string string details - min: 12 tokens
- mean: 17.05 tokens
- max: 36 tokens
- min: 19 tokens
- mean: 78.68 tokens
- max: 212 tokens
- min: 16 tokens
- mean: 73.73 tokens
- max: 205 tokens
- Samples:
query positive negative Represent this sentence for searching relevant passages: what are the liberal arts?
liberal arts. 1. the academic course of instruction at a college intended to provide general knowledge and comprising the arts, humanities, natural sciences, and social sciences, as opposed to professional or technical subjects.
Liberal Arts Defined. The liberal arts are a set of academic disciplines that include the sciences and the humanities. When you study a liberal arts curriculum, you don't have to have one specific career goal, although you might. Instead, you'll assemble a broad foundation of knowledge that can be used in a wide spectrum of careers.
Represent this sentence for searching relevant passages: what is the mechanism of action of fibrinolytic or thrombolytic drugs?
Baillière's Clinical Haematology. 6 Mechanism of action of the thrombolytic agents. 6 Mechanism of action of the thrombolytic agents JEFFREY I. WEITZ Fibrin formed during the haemostatic, inflammatory or tissue repair process serves a temporary role, and must be degraded to restore normal tissue function and structure.
Fibrinolytic drug. Fibrinolytic drug, also called thrombolytic drug, any agent that is capable of stimulating the dissolution of a blood clot (thrombus). Fibrinolytic drugs work by activating the so-called fibrinolytic pathway.
Represent this sentence for searching relevant passages: what is normal plat count
78 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).The average platelet count is 237,000 per mcL in men and 266,000 per mcL in women.8 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).
In the context of blood work, PLT refers to the platelet count. Platelets are the cells that cause blood clotting and control bleeding. The normal range of platelets for adults is 3.5 to 10.5 billion cells per liter of blood, according to the Mayo Clinic. Continue Reading.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Evaluation Dataset
sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3
- Dataset: sentence-transformers/msmarco-msmarco-mini_lm-l-6-v3
- Size: 5,000 evaluation samples
- Columns:
query
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
query positive negative type string string string details - min: 12 tokens
- mean: 17.09 tokens
- max: 35 tokens
- min: 21 tokens
- mean: 80.07 tokens
- max: 250 tokens
- min: 16 tokens
- mean: 76.73 tokens
- max: 341 tokens
- Samples:
query positive negative Represent this sentence for searching relevant passages: what is the name of the material harder than diamonds
Nano-material is harder than diamonds By Will Knight A material that is harder than diamond has been created in the lab, by packing together tiny ânanorodsâ of carbon. The new material, known as aggregated carbon nanorods (ACNR), was created by compressing and heating super-strong carbon molecules called buckyballs or carbon-60.
What material is stronger than diamond? Diamonds are famous for their hardness, but not particularly for strength,since they are easily cleaved to create the facets that make the different cuts of diamonds for setting in a ring or necklace. Many materials are stronger than diamonds, only a couple of synthesized materials are harder than diamonds.
Represent this sentence for searching relevant passages: is pink impression a perennial tulip?
Tulip Pink Impression. close video. VIDEO. Tulip Pink Impression. The rich pink blooms of this hybrid are bound to make an impression, whether used in the landscape or as a cut flower. Robust stems and giant blooms characterise the range, and this hybrid is no exception. âPink Impressionâ will continue to impress thanks to the perennial potential of this range.
Tulip Pink Impression. The lustrous petals are a deep, rich rose at the center, shading to a delicate pale pink at the edge, while doing amazing things in between that include shades of both melon and sunset. Tall, strong, long-lasting and reliable, like most Darwin hybrids. An absolutely first-class Tulip.
Represent this sentence for searching relevant passages: define: colonization
Colonization. the settlement and economic development of the uninhabited borderlands of a country (internal colonization) or the establishment of settlements (engaging primarily in agricultural activity) beyond the frontiers of a country (external colonization).
Colonization is a process by which a central system of power dominates the surrounding land and its components. The term is derived from the Latin word colere, which means to inhabit. Also, colonization refers strictly to migration, for example, to settler colonies in America or Australia, trading posts, and plantations, while colonialism deals with this, along with ruling the existing indigenous peoples of styled new territories. Colonization was linked to the spread of tens of millions fro
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 16per_device_eval_batch_size
: 16num_train_epochs
: 1warmup_ratio
: 0.1fp16
: Truebatch_sampler
: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 16per_device_eval_batch_size
: 16per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 1max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.1warmup_steps
: 0log_level
: passivelog_level_replica
: warninglog_on_each_node
: Truelogging_nan_inf_filter
: Truesave_safetensors
: Truesave_on_each_node
: Falsesave_only_model
: Falserestore_callback_states_from_checkpoint
: Falseno_cuda
: Falseuse_cpu
: Falseuse_mps_device
: Falseseed
: 42data_seed
: Nonejit_mode_eval
: Falseuse_ipex
: Falsebf16
: Falsefp16
: Truefp16_opt_level
: O1half_precision_backend
: autobf16_full_eval
: Falsefp16_full_eval
: Falsetf32
: Nonelocal_rank
: 0ddp_backend
: Nonetpu_num_cores
: Nonetpu_metrics_debug
: Falsedebug
: []dataloader_drop_last
: Falsedataloader_num_workers
: 0dataloader_prefetch_factor
: Nonepast_index
: -1disable_tqdm
: Falseremove_unused_columns
: Truelabel_names
: Noneload_best_model_at_end
: Falseignore_data_skip
: Falsefsdp
: []fsdp_min_num_params
: 0fsdp_config
: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap
: Noneaccelerator_config
: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torchoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_find_unused_parameters
: Noneddp_bucket_cap_mb
: Noneddp_broadcast_buffers
: Falsedataloader_pin_memory
: Truedataloader_persistent_workers
: Falseskip_memory_metrics
: Trueuse_legacy_prediction_loop
: Falsepush_to_hub
: Falseresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Falsehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseeval_do_concat_batches
: Truefp16_backend
: autopush_to_hub_model_id
: Nonepush_to_hub_organization
: Nonemp_parameters
:auto_find_batch_size
: Falsefull_determinism
: Falsetorchdynamo
: Noneray_scope
: lastddp_timeout
: 1800torch_compile
: Falsetorch_compile_backend
: Nonetorch_compile_mode
: Nonedispatch_batches
: Nonesplit_batches
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falsebatch_sampler
: no_duplicatesmulti_dataset_batch_sampler
: proportional
Training Logs
Epoch | Step | Training Loss | loss | xs-msmarco-triplet-train_max_accuracy | xs-msmarco-triplet_max_accuracy |
---|---|---|---|---|---|
0 | 0 | - | - | - | 0.3648 |
0.016 | 100 | 1.0213 | 1.0078 | - | 0.3672 |
0.032 | 200 | 0.9785 | 0.9630 | - | 0.3764 |
0.048 | 300 | 0.9591 | 0.9190 | - | 0.4014 |
0.064 | 400 | 0.9088 | 0.8906 | - | 0.4392 |
0.08 | 500 | 0.9215 | 0.8707 | - | 0.4598 |
0.096 | 600 | 0.8692 | 0.8681 | - | 0.4874 |
0.112 | 700 | 0.8806 | 0.8538 | - | 0.4964 |
0.128 | 800 | 0.8801 | 0.8477 | - | 0.5106 |
0.144 | 900 | 0.8692 | 0.8414 | - | 0.5228 |
0.16 | 1000 | 0.8624 | 0.8391 | - | 0.5194 |
0.176 | 1100 | 0.8737 | 0.8397 | - | 0.5264 |
0.192 | 1200 | 0.8505 | 0.8344 | - | 0.5214 |
0.208 | 1300 | 0.8818 | 0.8358 | - | 0.5164 |
0.224 | 1400 | 0.8464 | 0.8269 | - | 0.5326 |
0.24 | 1500 | 0.8623 | 0.8291 | - | 0.5232 |
0.256 | 1600 | 0.8203 | 0.8407 | - | 0.5328 |
0.272 | 1700 | 0.8566 | 0.8257 | - | 0.5302 |
0.288 | 1800 | 0.8386 | 0.8198 | - | 0.5364 |
0.304 | 1900 | 0.8587 | 0.8172 | - | 0.5388 |
0.32 | 2000 | 0.8472 | 0.8233 | - | 0.5568 |
0.336 | 2100 | 0.8466 | 0.8188 | - | 0.5468 |
0.352 | 2200 | 0.8273 | 0.8190 | - | 0.5386 |
0.368 | 2300 | 0.8356 | 0.8183 | - | 0.5396 |
0.384 | 2400 | 0.8294 | 0.8156 | - | 0.5538 |
0.4 | 2500 | 0.8274 | 0.8168 | - | 0.5448 |
0.416 | 2600 | 0.8392 | 0.8093 | - | 0.5422 |
0.432 | 2700 | 0.8541 | 0.8087 | - | 0.5426 |
0.448 | 2800 | 0.8218 | 0.8086 | - | 0.5474 |
0.464 | 2900 | 0.8446 | 0.8062 | - | 0.554 |
0.48 | 3000 | 0.8405 | 0.8076 | - | 0.548 |
0.496 | 3100 | 0.8447 | 0.8087 | - | 0.553 |
0.512 | 3200 | 0.8453 | 0.8073 | - | 0.5536 |
0.528 | 3300 | 0.8371 | 0.8089 | - | 0.5504 |
0.544 | 3400 | 0.8548 | 0.8005 | - | 0.5516 |
0.56 | 3500 | 0.8162 | 0.8026 | - | 0.5572 |
0.576 | 3600 | 0.8577 | 0.7994 | - | 0.5558 |
0.592 | 3700 | 0.8289 | 0.7990 | - | 0.5526 |
0.608 | 3800 | 0.824 | 0.7967 | - | 0.562 |
0.624 | 3900 | 0.833 | 0.7959 | - | 0.5608 |
0.64 | 4000 | 0.8362 | 0.7958 | - | 0.5554 |
0.656 | 4100 | 0.8057 | 0.7966 | - | 0.5578 |
0.672 | 4200 | 0.8001 | 0.7943 | - | 0.5646 |
0.688 | 4300 | 0.8215 | 0.7937 | - | 0.5602 |
0.704 | 4400 | 0.8257 | 0.7933 | - | 0.5614 |
0.72 | 4500 | 0.8173 | 0.7942 | - | 0.5648 |
0.736 | 4600 | 0.8002 | 0.7922 | - | 0.5698 |
0.752 | 4700 | 0.8445 | 0.7899 | - | 0.5626 |
0.768 | 4800 | 0.825 | 0.7897 | - | 0.5592 |
0.784 | 4900 | 0.8151 | 0.7870 | - | 0.5696 |
0.8 | 5000 | 0.8223 | 0.7895 | - | 0.5676 |
0.816 | 5100 | 0.8235 | 0.7877 | - | 0.5656 |
0.832 | 5200 | 0.8355 | 0.7866 | - | 0.5688 |
0.848 | 5300 | 0.8218 | 0.7864 | - | 0.5672 |
0.864 | 5400 | 0.8384 | 0.7866 | - | 0.5652 |
0.88 | 5500 | 0.7988 | 0.7860 | - | 0.569 |
0.896 | 5600 | 0.8117 | 0.7867 | - | 0.5684 |
0.912 | 5700 | 0.8113 | 0.7861 | - | 0.5734 |
0.928 | 5800 | 0.8129 | 0.7860 | - | 0.5698 |
0.944 | 5900 | 0.799 | 0.7863 | - | 0.5688 |
0.96 | 6000 | 0.8269 | 0.7858 | - | 0.5708 |
0.976 | 6100 | 0.8066 | 0.7857 | - | 0.572 |
0.992 | 6200 | 0.8302 | 0.7856 | - | 0.5728 |
1.0 | 6250 | - | - | 0.5696 | - |
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.0.1
- Transformers: 4.42.4
- PyTorch: 2.3.1+cu121
- Accelerate: 0.32.1
- Datasets: 2.20.0
- Tokenizers: 0.19.1
Citation
BibTeX
Sentence Transformers
@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
@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}
}
- Downloads last month
- 0
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for krumeto/snowflake-arctic-embed-xs-ms-marco-triplet
Base model
Snowflake/snowflake-arctic-embed-xsEvaluation results
- Cosine Accuracy on xs msmarco tripletself-reported0.571
- Dot Accuracy on xs msmarco tripletself-reported0.429
- Manhattan Accuracy on xs msmarco tripletself-reported0.573
- Euclidean Accuracy on xs msmarco tripletself-reported0.571
- Max Accuracy on xs msmarco tripletself-reported0.573
- Cosine Accuracy on xs msmarco triplet trainself-reported0.570
- Dot Accuracy on xs msmarco triplet trainself-reported0.430
- Manhattan Accuracy on xs msmarco triplet trainself-reported0.567
- Euclidean Accuracy on xs msmarco triplet trainself-reported0.570
- Max Accuracy on xs msmarco triplet trainself-reported0.570