LocalWisdom/PurpleStatic
PurpleStatic: Static Embeddings
This is a sentence-transformers model trained on the BatuhanECB/FinModernBERT-pairs-sec-synthetic-v1, Heliosoph/Quora-Question-Pairs, owenkaplinsky/wildchat-paraphrases, mjbommar/ogbert-v1-contrastive and mjbommar/opengloss-v1.3-contrastive-examples datasets. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for retrieval.
Model Details
Model Description
- Model Type: Sentence Transformer <!-- - Base model: Unknown -->
- Maximum Sequence Length: inf tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
- Training Datasets:
- BatuhanECB/FinModernBERT-pairs-sec-synthetic-v1
- Heliosoph/Quora-Question-Pairs
- owenkaplinsky/wildchat-paraphrases
- mjbommar/ogbert-v1-contrastive
- mjbommar/opengloss-v1.3-contrastive-examples
- Language: en
- License: wtfpl
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): StaticEmbedding({})
)Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("LocalWisdom/PurpleStatic")
# Run inference
sentences = [
'How do you write a song?',
'How do I write a song?',
'How did Portugal become an independent country from Spain?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.8566, 0.1409],
# [0.8566, 1.0000, 0.1259],
# [0.1409, 0.1259, 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. -->
<!--
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
<details><summary>BatuhanECB/FinModernBERT-pairs-sec-synthetic-v1</summary>
BatuhanECB/FinModernBERT-pairs-sec-synthetic-v1
- Dataset: BatuhanECB/FinModernBERT-pairs-sec-synthetic-v1
- Size: 5,694 training samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 100 samples: | | anchor | positive | |:---------|:-------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 47 characters</li><li>mean: 135.34 characters</li><li>max: 352 characters</li></ul> | <ul><li>min: 70 characters</li><li>mean: 146.17 characters</li><li>max: 322 characters</li></ul> |
- Samples: | anchor | positive | |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Of our total net revenue of $10.8 billion in the fiscal year ended October 31, 2000, we generated 44.2% in the United States and 55.8% internationally.</code> | <code>In the fiscal year concluding October 31, 2000, the company produced 44.2% of its $10.8 billion total net revenue within the United States and 55.8% from international markets.</code> | | <code>Our sales strategy is to sell to and service our largest accounts (hospital and corporate business) directly while employing third-party distributors and manufacturer's representatives for smaller or more geographically dispersed countries.</code> | <code>We utilize a sales approach where we directly manage and sell to our major hospital and corporate clients, while relying on external distributors and manufacturer agents to reach smaller markets or those in remote locations.</code> | | <code>In August 2000, we announced a restructuring of our healthcare solutions business.</code> | <code>The company declared a reorganization of its healthcare solutions division in August 2000.</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
768,
512,
256,
128,
64,
32
],
"matryoshka_weights": [
1,
1,
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}</details> <details><summary>Heliosoph/Quora-Question-Pairs</summary>
Heliosoph/Quora-Question-Pairs
- Dataset: Heliosoph/Quora-Question-Pairs
- Size: 149,263 training samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 100 samples: | | anchor | positive | |:---------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 16 characters</li><li>mean: 54.75 characters</li><li>max: 139 characters</li></ul> | <ul><li>min: 21 characters</li><li>mean: 54.34 characters</li><li>max: 127 characters</li></ul> |
- Samples: | anchor | positive | |:----------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------| | <code>Astrology: I am a Capricorn Sun Cap moon and cap rising...what does that say about me?</code> | <code>I'm a triple Capricorn (Sun, Moon and ascendant in Capricorn) What does this say about me?</code> | | <code>How can I be a good geologist?</code> | <code>What should I do to be a great geologist?</code> | | <code>How do I read and find my YouTube comments?</code> | <code>How can I see all my Youtube comments?</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
768,
512,
256,
128,
64,
32
],
"matryoshka_weights": [
1,
1,
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}</details> <details><summary>owenkaplinsky/wildchat-paraphrases</summary>
owenkaplinsky/wildchat-paraphrases
- Dataset: owenkaplinsky/wildchat-paraphrases
- Size: 1,383,750 training samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 100 samples: | | anchor | positive | |:---------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 20 characters</li><li>mean: 133.6 characters</li><li>max: 733 characters</li></ul> | <ul><li>min: 23 characters</li><li>mean: 129.4 characters</li><li>max: 639 characters</li></ul> |
- Samples: | anchor | positive | |:-------------------------------------------------------|:-------------------------------------------------------------------------| | <code>name current finance minister of pakistan</code> | <code>identify the present finance minister of pakistan</code> | | <code>name current finance minister of pakistan</code> | <code>who is pakistan's finance minister right now</code> | | <code>name current finance minister of pakistan</code> | <code>state the name of the current pakistani minister of finance</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
768,
512,
256,
128,
64,
32
],
"matryoshka_weights": [
1,
1,
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}</details> <details><summary>mjbommar/ogbert-v1-contrastive</summary>
mjbommar/ogbert-v1-contrastive
- Dataset: mjbommar/ogbert-v1-contrastive
- Size: 2,673,774 training samples
- Columns: <code>anchor</code> and <code>positives</code>
- Approximate statistics based on the first 100 samples: | | anchor | positives | |:---------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 4 characters</li><li>mean: 50.25 characters</li><li>max: 178 characters</li></ul> | <ul><li>min: 4 characters</li><li>mean: 36.68 characters</li><li>max: 121 characters</li></ul> |
- Samples: | anchor | positives | |:-------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | <code>The arrangement of halftone dots or grid that encodes tonal values in a halftone image.</code> | <code>The halftone dot grid encodes tonal levels.</code> | | <code>A formal subset of managers designated to handle day-to-day operations and implement board decisions.</code> | <code>The executive team meets monthly to review progress and adjust plans.</code> | | <code>niche market segment</code> | <code>submarket</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
768,
512,
256,
128,
64,
32
],
"matryoshka_weights": [
1,
1,
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}</details> <details><summary>mjbommar/opengloss-v1.3-contrastive-examples</summary>
mjbommar/opengloss-v1.3-contrastive-examples
- Dataset: mjbommar/opengloss-v1.3-contrastive-examples
- Size: 161,496 training samples
- Columns: <code>anchor</code>, <code>positives</code>, <code>negatives1</code>, and <code>negatives2</code>
- Approximate statistics based on the first 100 samples: | | anchor | positives | negatives1 | negatives2 | |:---------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------| | type | string | string | string | string | | modality | text | text | text | text | | details | <ul><li>min: 37 characters</li><li>mean: 70.41 characters</li><li>max: 145 characters</li></ul> | <ul><li>min: 36 characters</li><li>mean: 71.77 characters</li><li>max: 146 characters</li></ul> | <ul><li>min: 33 characters</li><li>mean: 72.34 characters</li><li>max: 145 characters</li></ul> | <ul><li>min: 35 characters</li><li>mean: 71.88 characters</li><li>max: 146 characters</li></ul> |
- Samples: | anchor | positives | negatives1 | negatives2 | |:---------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------| | <code>Field interviews revealed a stony demeanor even when pressed for clarification.</code> | <code>Field interviews revealed a stoic demeanor even when pressed for clarification.</code> | <code>Field interviews revealed a warm demeanor even when pressed for clarification.</code> | <code>Field interviews revealed an empathetic demeanor even when pressed for clarification.</code> | | <code>The board followed formal protocol during the review.</code> | <code>The board followed official protocol during the review.</code> | <code>The board followed casual protocol during the review.</code> | <code>The board followed informal protocol during the review.</code> | | <code>The athlete carefully inspected the luge before the final run.</code> | <code>The athlete carefully inspected the toboggan before the final run.</code> | <code>The athlete carefully inspected the sled before the final run.</code> | <code>The athlete carefully inspected the bobsled before the final run.</code> |
- Loss: <code>MatryoshkaLoss</code> with these parameters:
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
1024,
768,
512,
256,
128,
64,
32
],
"matryoshka_weights": [
1,
1,
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}</details>
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 4096num_train_epochs: 20learning_rate: 0.0001warmup_steps: 0.1bf16: Truebatch_sampler: no_duplicates
All Hyperparameters
<details><summary>Click to expand</summary>
per_device_train_batch_size: 4096num_train_epochs: 20max_steps: -1learning_rate: 0.0001lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamwtorchfusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Truefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 8prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}
</details>
Training Logs
Training Time
- Training: 2.1 hours
Framework Versions
- Python: 3.13.11
- Sentence Transformers: 5.6.1
- Transformers: 5.14.1
- PyTorch: 2.13.0+cu130
- Accelerate: 1.14.0
- Datasets: 5.0.0
- Tokenizers: 0.22.2
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",
}MatryoshkaLoss
@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
@misc{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}<!--
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. -->
