Views
No views yet
SentenceTransformer(
(0): StaticEmbedding(
(embedding): EmbeddingBag(31999, 1024, mode='mean')
)
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("tomaarsen/static-BEE-spoke-data-tokenizer-v1-gooaq")
5# Run inference
6sentences = [
7 "how to reverse a video on tiktok that's not yours?",
8 '[\'Tap "Effects" at the bottom of your screen — it\\\'s an icon that looks like a clock. Open the Effects menu. ... \', \'At the end of the new list that appears, tap "Time." Select "Time" at the end. ... \', \'Select "Reverse" — you\\\'ll then see a preview of your new, reversed video appear on the screen.\']',
9 'Relative age is the age of a rock layer (or the fossils it contains) compared to other layers. It can be determined by looking at the position of rock layers. Absolute age is the numeric age of a layer of rocks or fossils. Absolute age can be determined by using radiometric dating.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]gooaq-1024-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 1024
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.6374 |
| cosine_accuracy@3 | 0.8431 |
| cosine_accuracy@5 | 0.9006 |
| cosine_accuracy@10 | 0.9474 |
| cosine_precision@1 | 0.6374 |
| cosine_precision@3 | 0.281 |
| cosine_precision@5 | 0.1801 |
| cosine_precision@10 | 0.0947 |
| cosine_recall@1 | 0.6374 |
| cosine_recall@3 | 0.8431 |
| cosine_recall@5 | 0.9006 |
| cosine_recall@10 | 0.9474 |
| cosine_ndcg@10 | 0.7979 |
| cosine_mrr@10 | 0.7492 |
| cosine_map@100 | 0.7516 |
gooaq-512-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 512
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.6324 |
| cosine_accuracy@3 | 0.8382 |
| cosine_accuracy@5 | 0.899 |
| cosine_accuracy@10 | 0.9452 |
| cosine_precision@1 | 0.6324 |
| cosine_precision@3 | 0.2794 |
| cosine_precision@5 | 0.1798 |
| cosine_precision@10 | 0.0945 |
| cosine_recall@1 | 0.6324 |
| cosine_recall@3 | 0.8382 |
| cosine_recall@5 | 0.899 |
| cosine_recall@10 | 0.9452 |
| cosine_ndcg@10 | 0.7945 |
| cosine_mrr@10 | 0.7455 |
| cosine_map@100 | 0.748 |
gooaq-256-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 256
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.6273 |
| cosine_accuracy@3 | 0.8299 |
| cosine_accuracy@5 | 0.8919 |
| cosine_accuracy@10 | 0.9414 |
| cosine_precision@1 | 0.6273 |
| cosine_precision@3 | 0.2766 |
| cosine_precision@5 | 0.1784 |
| cosine_precision@10 | 0.0941 |
| cosine_recall@1 | 0.6273 |
| cosine_recall@3 | 0.8299 |
| cosine_recall@5 | 0.8919 |
| cosine_recall@10 | 0.9414 |
| cosine_ndcg@10 | 0.7888 |
| cosine_mrr@10 | 0.7392 |
| cosine_map@100 | 0.7418 |
gooaq-128-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 128
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.6009 |
| cosine_accuracy@3 | 0.8112 |
| cosine_accuracy@5 | 0.874 |
| cosine_accuracy@10 | 0.9296 |
| cosine_precision@1 | 0.6009 |
| cosine_precision@3 | 0.2704 |
| cosine_precision@5 | 0.1748 |
| cosine_precision@10 | 0.093 |
| cosine_recall@1 | 0.6009 |
| cosine_recall@3 | 0.8112 |
| cosine_recall@5 | 0.874 |
| cosine_recall@10 | 0.9296 |
| cosine_ndcg@10 | 0.7688 |
| cosine_mrr@10 | 0.7167 |
| cosine_map@100 | 0.7196 |
gooaq-64-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 64
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5589 |
| cosine_accuracy@3 | 0.7641 |
| cosine_accuracy@5 | 0.8367 |
| cosine_accuracy@10 | 0.8995 |
| cosine_precision@1 | 0.5589 |
| cosine_precision@3 | 0.2547 |
| cosine_precision@5 | 0.1673 |
| cosine_precision@10 | 0.09 |
| cosine_recall@1 | 0.5589 |
| cosine_recall@3 | 0.7641 |
| cosine_recall@5 | 0.8367 |
| cosine_recall@10 | 0.8995 |
| cosine_ndcg@10 | 0.7291 |
| cosine_mrr@10 | 0.6743 |
| cosine_map@100 | 0.6782 |
gooaq-32-devInformationRetrievalEvaluator with these parameters:
1{
2 "truncate_dim": 32
3}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.4745 |
| cosine_accuracy@3 | 0.6696 |
| cosine_accuracy@5 | 0.7508 |
| cosine_accuracy@10 | 0.8302 |
| cosine_precision@1 | 0.4745 |
| cosine_precision@3 | 0.2232 |
| cosine_precision@5 | 0.1502 |
| cosine_precision@10 | 0.083 |
| cosine_recall@1 | 0.4745 |
| cosine_recall@3 | 0.6696 |
| cosine_recall@5 | 0.7508 |
| cosine_recall@10 | 0.8302 |
| cosine_ndcg@10 | 0.6483 |
| cosine_mrr@10 | 0.5904 |
| cosine_map@100 | 0.5962 |
question and answer| question | answer | |
|---|---|---|
| type | string | string |
| details |
|
|
| question | answer |
|---|---|
what is the difference between broilers and layers? | An egg laying poultry is called egger or layer whereas broilers are reared for obtaining meat. So a layer should be able to produce more number of large sized eggs, without growing too much. On the other hand, a broiler should yield more meat and hence should be able to grow well. |
what is the difference between chronological order and spatial order? | As a writer, you should always remember that unlike chronological order and the other organizational methods for data, spatial order does not take into account the time. Spatial order is primarily focused on the location. All it does is take into account the location of objects and not the time. |
is kamagra same as viagra? | Kamagra is thought to contain the same active ingredient as Viagra, sildenafil citrate. In theory, it should work in much the same way as Viagra, taking about 45 minutes to take effect, and lasting for around 4-6 hours. However, this will vary from person to person. |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 1024,
5 512,
6 256,
7 128,
8 64,
9 32
10 ],
11 "matryoshka_weights": [
12 1,
13 1,
14 1,
15 1,
16 1,
17 1
18 ],
19 "n_dims_per_step": -1
20}question and answer| question | answer | |
|---|---|---|
| type | string | string |
| details |
|
|
| question | answer |
|---|---|
how do i program my directv remote with my tv? | ['Press MENU on your remote.', 'Select Settings & Help > Settings > Remote Control > Program Remote.', 'Choose the device (TV, audio, DVD) you wish to program. ... ', 'Follow the on-screen prompts to complete programming.'] |
are rodrigues fruit bats nocturnal? | Before its numbers were threatened by habitat destruction, storms, and hunting, some of those groups could number 500 or more members. Sunrise, sunset. Rodrigues fruit bats are most active at dawn, at dusk, and at night. |
why does your heart rate increase during exercise bbc bitesize? | During exercise there is an increase in physical activity and muscle cells respire more than they do when the body is at rest. The heart rate increases during exercise. The rate and depth of breathing increases - this makes sure that more oxygen is absorbed into the blood, and more carbon dioxide is removed from it. |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 1024,
5 512,
6 256,
7 128,
8 64,
9 32
10 ],
11 "matryoshka_weights": [
12 1,
13 1,
14 1,
15 1,
16 1,
17 1
18 ],
19 "n_dims_per_step": -1
20}eval_strategy: stepsper_device_train_batch_size: 2048per_device_eval_batch_size: 2048learning_rate: 0.2num_train_epochs: 1warmup_ratio: 0.1bf16: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 2048per_device_eval_batch_size: 2048per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 0.2weight_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: 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: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_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: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | gooaq-1024-dev_cosine_ndcg@10 | gooaq-512-dev_cosine_ndcg@10 | gooaq-256-dev_cosine_ndcg@10 | gooaq-128-dev_cosine_ndcg@10 | gooaq-64-dev_cosine_ndcg@10 | gooaq-32-dev_cosine_ndcg@10 |
|---|---|---|---|---|---|---|---|---|---|
| -1 | -1 | - | - | 0.2283 | 0.2131 | 0.1847 | 0.1395 | 0.0746 | 0.0334 |
| 0.0007 | 1 | 44.3995 | - | - | - | - | - | - | - |
| 0.0682 | 100 | 20.4944 | - | - | - | - | - | - | - |
| 0.1363 | 200 | 5.7432 | - | - | - | - | - | - | - |
| 0.1704 | 250 | - | 1.6135 | 0.7337 | 0.7307 | 0.7204 | 0.7006 | 0.6527 | 0.5522 |
| 0.2045 | 300 | 4.6818 | - | - | - | - | - | - | - |
| 0.2727 | 400 | 4.237 | - | - | - | - | - | - | - |
| 0.3408 | 500 | 3.9465 | 1.3375 | 0.7628 | 0.7601 | 0.7544 | 0.7340 | 0.6917 | 0.6024 |
| 0.4090 | 600 | 3.724 | - | - | - | - | - | - | - |
| 0.4772 | 700 | 3.5496 | - | - | - | - | - | - | - |
| 0.5112 | 750 | - | 1.2214 | 0.7782 | 0.7764 | 0.7676 | 0.7492 | 0.7075 | 0.6208 |
| 0.5453 | 800 | 3.4443 | - | - | - | - | - | - | - |
| 0.6135 | 900 | 3.3312 | - | - | - | - | - | - | - |
| 0.6817 | 1000 | 3.2537 | 1.1280 | 0.7877 | 0.7841 | 0.7768 | 0.7582 | 0.7195 | 0.6336 |
| 0.7498 | 1100 | 3.1613 | - | - | - | - | - | - | - |
| 0.8180 | 1200 | 3.0985 | - | - | - | - | - | - | - |
| 0.8521 | 1250 | - | 1.0693 | 0.7955 | 0.7922 | 0.7858 | 0.7663 | 0.7267 | 0.6434 |
| 0.8862 | 1300 | 3.0416 | - | - | - | - | - | - | - |
| 0.9543 | 1400 | 3.0249 | - | - | - | - | - | - | - |
| -1 | -1 | - | - | 0.7979 | 0.7945 | 0.7888 | 0.7688 | 0.7291 | 0.6483 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{kusupati2024matryoshka,
2 title={Matryoshka Representation Learning},
3 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},
4 year={2024},
5 eprint={2205.13147},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}