Downloads · 30 days
100
0% of all-time downloads
khoj-ai/timely-arctic-small
timely-arctic-small is a sentence similarity model from khoj-ai. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
To access our technical report and model pipeline scripts visit our github
Downloads · 30 days
100
0% of all-time downloads
All-time downloads
56.4K
Public
Parameters
33.2M
266 MB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors133 MB · 99%
From the Hugging Face model README
To access our technical report and model pipeline scripts visit our github
This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-s. 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.
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()
)
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("sentence_transformers_model_id")
# Run inference
sentences = [
'Represent this sentence for searching relevant passages: Philadelphia Business Journal 01/30/83',
'The Philadelphia Business Journal is a diversified business media company in Philadelphia, Pennsylvania, publishing daily stories on its website and social networks, and a weekly edition available in print and online. It is published by the American City Business Journals. See also List of newspapers in Pennsylvania References External links Business newspapers published in the United States Newspapers published in Philadelphia Jan 30 1983\n',
"Have you just bought your brand new Nintendo Wii console? Are you gutted that you can't get Wii Connect 24 in your country of residence? This article will resolve this problem, so you can surf the Internet on your Wii!\n",
]
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.*
-->
| anchors | positive | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 14 tokens</li><li>mean: 20.25 tokens</li><li>max: 33 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 47.2 tokens</li><li>max: 75 tokens</li></ul> |
| anchors | positive |
|---|---|
| <code>Represent this sentence for searching relevant passages: are bugs attracted to citronella November 10?</code> | <code>Citronella is naturally occurring oil that repels insects. ... “Citronella oil is repellent to mosquitoes to a degree, but the amount being put out by a candle isn't going to be very effective,” Eric Hoffer, president of Hoffer Pest, told TODAY Home. 11/10<br></code> |
| <code>Represent this sentence for searching relevant passages: are bugs attracted to citronella 11/10/09?</code> | <code>Citronella is naturally occurring oil that repels insects. ... “Citronella oil is repellent to mosquitoes to a degree, but the amount being put out by a candle isn't going to be very effective,” Eric Hoffer, president of Hoffer Pest, told TODAY Home. 11/10/09<br></code> |
| <code>Represent this sentence for searching relevant passages: are bugs attracted to citronella Jan 15?</code> | <code>Citronella is naturally occurring oil that repels insects. ... “Citronella oil is repellent to mosquitoes to a degree, but the amount being put out by a candle isn't going to be very effective,” Eric Hoffer, president of Hoffer Pest, told TODAY Home. 01/15<br></code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
| anchors | positive | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 11 tokens</li><li>mean: 21.67 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 67.0 tokens</li><li>max: 512 tokens</li></ul> |
| anchors | positive |
|---|---|
| <code>Represent this sentence for searching relevant passages: 4/23 Socialize With Someone Who Is Losing Interest in You</code> | <code>04/23 It can hurt to realize that someone you care about is losing interest in you. If a friend has stopped calling you and no longer makes plans to hang out, your first instinct might be to contact them more frequently or to ignore them in return.<br></code> |
| <code>Represent this sentence for searching relevant passages: Alathur taluk, Perambalur 04/19/29</code> | <code>Alathur taluk is a taluk in Perambalur district in the Indian state of Tamil Nadu. It was created by former chief minister J.Jayalalithaa for issues of population increase. Kunnam taluk was bifurcated to form this new taluk. Villages There are 39 villages in Alathur taluk excluding the headquarters Alathur. References Perambalur district Taluks of Perambalur district 2029 Apr 19<br></code> |
| <code>Represent this sentence for searching relevant passages: 01/04 how much weight does a baby gain in the first month?</code> | <code>01/04 During their first month, most newborns gain weight at a rate of about 1 ounce (30 grams) per day. They generally grow in height about 1 to 1½ inches (2.54 to 3.81 centimeters) during the first month. Many newborns go through a period of rapid growth when they are 7 to 10 days old and again at 3 and 6 weeks.<br></code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 128per_device_eval_batch_size: 128learning_rate: 2e-05weight_decay: 0.01num_train_epochs: 1warmup_ratio: 0.1warmup_steps: 400bf16: Truetorch_compile: Truetorch_compile_backend: inductorbatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 128per_device_eval_batch_size: 128per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.01adam_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: 400log_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: Truefp16: Falsefp16_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: Truetorch_compile_backend: inductortorch_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: Falseeval_use_gather_object: Falsebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | loss |
|---|---|---|---|
| 0.0023 | 1 | 2.3154 | - |
| 0.0229 | 10 | 2.3237 | - |
| 0.0459 | 20 | 2.4036 | - |
| 0.0688 | 30 | 2.3314 | - |
| 0.0917 | 40 | 2.3171 | - |
| 0.1147 | 50 | 2.2891 | - |
| 0.0023 | 1 | 2.2343 | - |
| 0.0229 | 10 | 2.2256 | - |
| 0.0459 | 20 | 2.2924 | - |
| 0.0688 | 30 | 2.2354 | - |
| 0.0917 | 40 | 2.2281 | - |
| 0.1147 | 50 | 2.2018 | - |
| 0.1376 | 60 | 2.2377 | - |
| 0.1606 | 70 | 2.2001 | - |
| 0.1835 | 80 | 2.158 | - |
| 0.2064 | 90 | 2.1405 | - |
| 0.2294 | 100 | 2.0916 | - |
| 0.2523 | 110 | 2.0374 | - |
| 0.2752 | 120 | 2.0492 | - |
| 0.2982 | 130 | 1.9824 | - |
| 0.3211 | 140 | 1.9571 | - |
| 0.3440 | 150 | 1.8317 | - |
| 0.3670 | 160 | 1.7183 | - |
| 0.3899 | 170 | 1.5928 | - |
| 0.4128 | 180 | 1.5695 | - |
| 0.4358 | 190 | 1.4592 | - |
| 0.4587 | 200 | 1.2667 | 0.2031 |
| 0.4817 | 210 | 1.3865 | - |
| 0.5046 | 220 | 1.2924 | - |
| 0.5275 | 230 | 1.3042 | - |
| 0.5505 | 240 | 1.4393 | - |
| 0.5734 | 250 | 1.3402 | - |
| 0.5963 | 260 | 1.1939 | - |
| 0.6193 | 270 | 1.1795 | - |
| 0.6422 | 280 | 1.1012 | - |
| 0.6651 | 290 | 1.0379 | - |
| 0.6881 | 300 | 0.9865 | - |
| 0.7110 | 310 | 0.9088 | - |
| 0.7339 | 320 | 0.9132 | - |
| 0.7569 | 330 | 0.8819 | - |
| 0.7798 | 340 | 0.8631 | - |
| 0.8028 | 350 | 1.4084 | - |
| 0.8257 | 360 | 1.325 | - |
| 0.8486 | 370 | 1.2373 | - |
| 0.8716 | 380 | 1.1881 | - |
| 0.8945 | 390 | 1.1656 | - |
| 0.9174 | 400 | 0.7767 | 0.0607 |
| 0.9404 | 410 | 0.1511 | - |
| 0.9633 | 420 | 0.1439 | - |
| 0.9862 | 430 | 0.1216 | - |
@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",
}
@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.*
-->