CoolFace
Modelpublic

Trelis/multi-qa-MiniLM-L6-dot-v1-2-constant-ep-MNRLtriplets-2e-5-batch32-cuda-overlap

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes94downloads
Model Card

SentenceTransformer based on sentence-transformers/multi-qa-MiniLM-L6-dot-v1

This is a sentence-transformers model finetuned from sentence-transformers/multi-qa-MiniLM-L6-dot-v1. 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: sentence-transformers/multi-qa-MiniLM-L6-dot-v1 <!-- at revision c3bdeb02464bc83f9b85156a3386a50bfbf3e6a8 -->
  • —Maximum Sequence Length: 512 tokens
  • —Output Dimensionality: 384 tokens
  • —Similarity Function: Dot Product <!-- - 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': 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})
)

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("Trelis/multi-qa-MiniLM-L6-dot-v1-2-constant-ep-MNRLtriplets-2e-5-batch32-cuda-overlap")
# Run inference
sentences = [
    'What is the minimum number of males and females required on the field of play in mixed gender competitions?',
    '5. 3. 1 this does not apply for players sent to the sin bin area. 5. 4 in mixed gender competitions, the maximum number of males allowed on the field of play is three ( 3 ), the minimum male requirement is one ( 1 ) and the minimum female requirement is one ( 1 ). 6 team coach and team officials 6. 1 the team coach ( s ) and team officials may be permitted inside the perimeter but shall be required to be positioned either in the interchange area or at the end of the field of play for the duration of the match. 6. 2 the team coach ( s ) and team officials may move from one position to the other but shall do so without delay. while in a position at the end of the field of play, the team coach ( s ) or team official must remain no closer than five ( 5 ) metres from the dead ball line and must not coach or communicate ( verbal or non - verbal ) with either team or the referees.',
    'tap and tap penalty the method of commencing the match, recommencing the match after half time and after a try has been scored. the tap is also the method of recommencing play when a penalty is awarded. the tap is taken by placing the ball on the ground at or behind the mark, releasing both hands from the ball, tapping the ball gently with either foot or touching the foot on the ball. the ball must not roll or move more than one ( 1 ) metre in any direction and must be retrieved cleanly, without touching the ground again. the player may face any direction and use either foot. provided it is at the mark, the ball does not have to be lifted from the ground prior to a tap being taken. team a group of players constituting one ( 1 ) side in a competition match. tfa touch football australia limited touch any contact between the player in possession and a defending player. a touch includes contact on the ball, hair or clothing and may be made by a defending player or by the player in possession. touch count the progressive number of touches that each team has before a change of possession, from zero ( 0 ) to six ( 6 ).',
]
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. -->

Training Details

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —per_device_train_batch_size: 32
  • —per_device_eval_batch_size: 32
  • —learning_rate: 2e-05
  • —num_train_epochs: 2
  • —lr_scheduler_type: constant
  • —warmup_ratio: 0.3
  • —bf16: True
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: 32
  • —per_device_eval_batch_size: 32
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 1
  • —eval_accumulation_steps: None
  • —learning_rate: 2e-05
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —max_grad_norm: 1.0
  • —num_train_epochs: 2
  • —max_steps: -1
  • —lr_scheduler_type: constant
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.3
  • —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: True
  • —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}
  • —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: False
  • —hub_always_push: False
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —include_inputs_for_metrics: False
  • —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
  • —dispatch_batches: None
  • —split_batches: 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
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional

</details>

Training Logs

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

EpochStepTraining Lossloss
0.006622.4302-
0.013142.4247-
0.019762.0174-
0.026282.2159-
0.0328102.0163-
0.0393121.7183-
0.0459141.9459-
0.0525162.0123-
0.0590181.7977-
0.0656202.1162-
0.0721221.6443-
0.0787241.9009-
0.0852261.5068-
0.0918281.6354-
0.0984301.6703-
0.1049321.8509-
0.1115341.6663-
0.1180361.3685-
0.1246381.5531-
0.1311401.3564-
0.1377421.3271-
0.1443441.6339-
0.1508461.5644-
0.1574481.3918-
0.1639501.3628-
0.1705521.1994-
0.1770541.1174-
0.1836561.3724-
0.1902581.3164-
0.1967601.2333-
0.2033621.3354-
0.2098641.2378-
0.2164661.4894-
0.2230681.1909-
0.2295701.1961-
0.2361721.0392-
0.2426741.0383-
0.2492761.1072-
0.252577-0.8909
0.2557781.2151-
0.2623801.1497-
0.2689820.9377-
0.2754841.2349-
0.2820861.1121-
0.2885881.0621-
0.2951901.2678-
0.3016921.0484-
0.3082940.9637-
0.3148960.9904-
0.3213980.9988-
0.32791000.8051-
0.33441021.0701-
0.34101041.1697-
0.34751061.1753-
0.35411081.1611-
0.36071100.9969-
0.36721120.9606-
0.37381140.9209-
0.38031161.0459-
0.38691180.8615-
0.39341200.7766-
0.41221.0155-
0.40661240.9394-
0.41311260.8924-
0.41971280.8024-
0.42621301.0985-
0.43281321.0747-
0.43931341.0246-
0.44591360.9245-
0.45251380.909-
0.45901401.0893-
0.46561421.0213-
0.47211440.8544-
0.47871460.9737-
0.48521480.8735-
0.49181500.928-
0.49841520.8356-
0.50491541.00190.7711
0.51151561.0054-
0.51801580.8963-
0.52461600.9006-
0.53111620.9877-
0.53771641.0281-
0.54431660.8472-
0.55081680.9504-
0.55741701.0462-
0.56391720.9501-
0.57051740.8996-
0.57701761.0198-
0.58361780.9341-
0.59021800.8529-
0.59671820.939-
0.60331841.0716-
0.60981860.9437-
0.61641880.7956-
0.62301900.8259-
0.62951920.941-
0.63611940.8254-
0.64261960.8056-
0.64921980.9525-
0.65572000.7497-
0.66232020.9103-
0.66892041.0092-
0.67542060.8893-
0.68202080.924-
0.68852100.8118-
0.69512120.7734-
0.70162140.8612-
0.70822160.6743-
0.71482180.9175-
0.72132200.9795-
0.72792220.9852-
0.73442240.7345-
0.74102260.9914-
0.74752280.9152-
0.75412301.0494-
0.7574231-0.7461
0.76072320.8496-
0.76722340.8374-
0.77382360.796-
0.78032380.8899-
0.78692401.055-
0.79342420.9787-
0.82440.8813-
0.80662461.0675-
0.81312481.0196-
0.81972500.7574-
0.82622520.9044-
0.83282540.8997-
0.83932560.9668-
0.84592580.8887-
0.85252601.0042-
0.85902621.0572-
0.86562640.8395-
0.87212660.7637-
0.87872680.952-
0.88522700.9178-
0.89182720.7949-
0.89842740.8409-
0.90492760.8708-
0.91152780.8427-
0.91802800.9451-
0.92462820.8579-
0.93112840.7472-
0.93772860.8878-
0.94432880.8266-
0.95082900.7753-
0.95742920.7455-
0.96392940.9418-
0.97052960.8795-
0.97702980.8713-
0.98363000.896-
0.99023020.7666-
0.99673040.8474-
1.00333060.5415-
1.00983080.91590.7310
1.01643101.049-
1.02303120.9572-
1.02953140.9994-
1.03613160.8166-
1.04263180.8915-
1.04923200.8417-
1.05573220.6382-
1.06233241.1689-
1.06893260.7979-
1.07543280.9044-
1.08203301.0126-
1.08853320.9459-
1.09513340.7851-
1.10163360.8744-
1.10823380.8425-
1.11483400.8789-
1.12133420.8451-
1.12793440.8488-
1.13443460.8097-
1.14103480.7656-
1.14753500.8751-
1.15413520.7859-
1.16073540.7413-
1.16723561.0012-
1.17383580.7506-
1.18033600.8725-
1.18693620.9096-
1.19343640.9487-
1.23660.7911-
1.20663680.9752-
1.21313700.9904-
1.21973720.7559-
1.22623740.7669-
1.23283760.8321-
1.23933780.9426-
1.24593800.928-
1.25253820.8514-
1.25903840.8755-
1.2623385-0.7263
1.26563860.9364-
1.27213880.9249-
1.27873900.8506-
1.28523920.9558-
1.29183940.9067-
1.29843960.8908-
1.30493980.6504-
1.31154000.7768-
1.31804020.6553-
1.32464040.6869-
1.33114060.9872-
1.33774080.828-
1.34434100.896-
1.35084120.8047-
1.35744140.8023-
1.36394161.0378-
1.37054180.8644-
1.37704200.9643-
1.38364220.7227-
1.39024240.7723-
1.39674260.9843-
1.40334280.7796-
1.40984300.8349-
1.41644320.8458-
1.42304340.6638-
1.42954360.85-
1.43614380.8938-
1.44264400.9992-
1.44924420.8008-
1.45574440.8251-
1.46234460.94-
1.46894480.911-
1.47544500.8789-
1.48204520.7201-
1.48854540.9465-
1.49514560.7776-
1.50164580.9056-
1.50824600.9087-
1.51484620.94250.7224
1.52134640.8603-
1.52794660.8143-
1.53444681.0147-
1.54104700.7188-
1.54754720.8249-
1.55414740.7593-
1.56074760.9883-
1.56724780.7453-
1.57384800.7667-
1.58034820.7323-
1.58694840.8276-
1.59344860.7984-
1.64880.8216-
1.60664900.6734-
1.61314920.6356-
1.61974940.8072-
1.62624960.7929-
1.63284980.8359-
1.63935000.8005-
1.64595020.8072-
1.65255040.7875-
1.65905060.7381-
1.66565080.8326-
1.67215100.8628-
1.67875120.9308-
1.68525140.7246-
1.69185160.8821-
1.69845180.7214-
1.70495200.7731-
1.71155220.7165-
1.71805240.8376-
1.72465260.8067-
1.73115280.8293-
1.73775300.9654-
1.74435320.6332-
1.75085340.8155-
1.75745360.7569-
1.76395380.7649-
1.7672539-0.7193
1.77055400.7826-
1.77705420.7806-
1.78365440.701-
1.79025460.8998-
1.79675480.7879-
1.80335500.9837-
1.80985520.8297-
1.81645540.8317-
1.82305560.8819-
1.82955580.6683-
1.83615600.8085-
1.84265620.7737-
1.84925640.7873-
1.85575660.7587-
1.86235680.7513-
1.86895700.9404-
1.87545720.7818-
1.88205740.761-
1.88855760.7163-
1.89515780.7994-
1.90165800.8483-
1.90825820.7287-
1.91485840.8435-
1.92135860.8493-
1.92795880.8544-
1.93445900.7437-
1.94105920.7449-
1.94755940.7808-
1.95415960.8658-
1.96075980.6678-
1.96726000.7104-
1.97386020.8293-
1.98036040.8346-
1.98696060.885-
1.99346080.6521-
2.06100.3965-

</details>

Framework Versions

  • —Python: 3.10.12
  • —Sentence Transformers: 3.0.1
  • —Transformers: 4.42.3
  • —PyTorch: 2.1.1+cu121
  • —Accelerate: 0.31.0
  • —Datasets: 2.17.1
  • —Tokenizers: 0.19.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",
}
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. -->