SentenceTransformer based on Alibaba-NLP/gte-multilingual-base

This is a sentence-transformers model finetuned from Alibaba-NLP/gte-multilingual-base. It maps sentences & paragraphs to a 768-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: Alibaba-NLP/gte-multilingual-base
  • Maximum Sequence Length: 8192 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NewModel 
  (1): Pooling({'word_embedding_dimension': 768, '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("sentence_transformers_model_id")
# Run inference
sentences = [
    'If I save the project after clicking "Continue," will the missing files be automatically relinked or do I need to fix the file paths manually?',
    'Title: Error: no disk in drive\nAnswer: Issue This error usually occurs when an FLP (FL Studio project) looks for a sample/file in a location that doesn\'t exist (disconnected/offline drives or renamed drives) or one that doesn\'t have a disc inserted (DVD drive for example). Solution Click "Continue" and let the FLP load until the end. Save the project and the message should no longer present for that project. Note: If the error still presents itself after following the above steps try restarting your computer. Image-Line Support Team',
    'Document_title: The Playlist \nFile_name: playlist.htm\nHeading_hierarchy: [The Playlist -> Universal Clip Editing Methods]\nAnchor_id: [none]\n• Snap settings ( [Image: Horseshoe magnet icon, gray background | Ref: img_glob/flicon_snap.png] ) - Snap controls how Clips move on the Playlist grid and many of the other editing functions below. Set this to \' line \' if you want the Clips to snap to bar boundaries or to \' none \' if you want to\nfreely position & slice Clips. • Inserting Clips - To insert a Clip, select the Clip you want to place from the Clip Source menu (indicated above) OR Right-Click the Clip focus selectors (indicated above) to choose Clips of the type selected. Next, in Draw ( [Image: Gray pencil drawing/editing tool\nicon | Ref: img_glob/flicon_pencilup.png] ) or Paint ( [Image: Paintbrush dripping with liquid icon | Ref: img_glob/flicon_paint.png] ) mode, Left-click on an empty area of a Clips track where you want to place the Clip. Paint mode allows you to paint multiple instances of the Clip at once (hold the\nMouse button & drag). • Insert time into the Playlist (shift Clips to the right) - Hold ( Ctrl ), click and drag on the time-line at the top of the Playlist starting from the point you want to insert space into the timeline AND for the duration of the insertion you want. With ( Ctrl ) still held press the ( Ins\nert ) key on your keyboard. Insert time into the Playlist (slice and move Clips to the right) - Make a time selection as above, then hold ( Ctrl+Alt ) and press the ( Insert ) key on your keyboard. The slice point will be at the start of the selection. • Delete a time selection - Hold ( Ctrl ), click and\ndrag on the time-line at the\n      top of the Playlist to select the region to be deleted. Press ( Ctrl+Del ) to delete all patterns in the current selection and move Clips to the right of the selection into the gap. • Select Clips - To make a selection of more than one Clip. Use the [Image: Dashed square crop selection icon | Ref:\nimg_glob/flicon_select.png] Select tool and click and drag a rectangle around the Clips to be selected. To add Clips to this selection hold the ( Shift ) key and make further selections. OR if you are in Draw or Paint mode, hold  ( Ctrl ) key and you will drop into Select mode while the ( Ctrl ) key is\nheld. Holding the ( Ctrl+Shift ) keys will allow you to add and remove Clips to / from an existing selection. OR use the Magic lasso feature. Move your Mouse pointer in a loop that encloses the Clips you want to select (no clicking required, it\'s \'magic\' remember). Make sure you have no Clips\nselected before you perform the lasso action (Right-Click the empty Playlist to deselect all Clips and make another selection). • Zoom to area - ( Ctrl+Right-Click ) and drag over a selection of the Playlist. Un-Zoom area - ( Ctrl+Right-Click ) anywhere\n      on the Playlist (don\'t drag). • Zoom to a Clip - ( Ctrl+Shift+Right-Click ) on a Clip will maximize the zoom\n      of the Playlist to the selected Clip. To Un-Zoom Clip - ( Ctrl+Right-Click ) anywhere\n      on the Playlist (don\'t drag in this mode since that is how to zoom to selection). • Delete/Erase a Clip - Right-Click the target Clip or use the left Mouse button if you are in erase ( [Image: Circular gray "no entry" symbol icon | Ref: img_glob/flicon_delete.png] ) mode. • Copy/Paste Clips - Make\na selection, release the Mouse and any keys held, then hold the ( Shift ) key, then click on the selection and drag. A copy of the selection will follow the Mouse cursor. Release the selection when the Clips are in the alternative location. NOTE: In \' Slice tool \' mode this will initiate a slice, not\ncopy. OR Make a selection, press  ( Ctrl+C ) to copy, then scroll the Playlist so that the starting bar for the paste location is at the left edge of the Playlist and press  ( Ctrl+V ). • Duplicate selection - Make a selection and press ( Ctrl+B ). The selection, or all Clips if no selection is made, will be\nduplicated to the right of the original selection.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.8225
cosine_accuracy@3 0.9548
cosine_accuracy@5 0.9764
cosine_accuracy@10 0.9919
cosine_precision@1 0.8225
cosine_precision@3 0.3183
cosine_precision@5 0.1953
cosine_precision@10 0.0992
cosine_recall@1 0.8225
cosine_recall@3 0.9548
cosine_recall@5 0.9764
cosine_recall@10 0.9919
cosine_ndcg@10 0.9157
cosine_mrr@10 0.8903
cosine_map@100 0.8908

Training Details

Training Dataset

Unnamed Dataset

  • Size: 5,900 training samples
  • Columns: sentence_0 and sentence_1
  • Approximate statistics based on the first 1000 samples:
    sentence_0 sentence_1
    type string string
    details
    • min: 13 tokens
    • mean: 24.05 tokens
    • max: 45 tokens
    • min: 22 tokens
    • mean: 417.54 tokens
    • max: 1441 tokens
  • Samples:
    sentence_0 sentence_1
    How long does it usually take for the payment status to update from 'unpaid' to 'processed' on the site? Title: My payment at my online bank page shows as processed, but your site still says 'unpaid'.
    Answer: Please allow our site and servers a few minutes to process your orders payment. Communication and verification between the different servers can take some time.There are different companies involved. They include your own bank, your credit card company, our 3rd party payment processors Verifone (2Checkout) & PayPal and our own registration servers. If you have the order status page still open, were you were forwarded after your purchase, hit the 'refresh' button of your browser (or the F5 key of your keyboard) to see the latest payment processing
    information.FL Studio Support Team
    If refreshing the order status page doesn't update the payment status, what should I do next? Title: My payment at my online bank page shows as processed, but your site still says 'unpaid'.
    Answer: Please allow our site and servers a few minutes to process your orders payment. Communication and verification between the different servers can take some time.There are different companies involved. They include your own bank, your credit card company, our 3rd party payment processors Verifone (2Checkout) & PayPal and our own registration servers. If you have the order status page still open, were you were forwarded after your purchase, hit the 'refresh' button of your browser (or the F5 key of your keyboard) to see the latest payment processing
    information.FL Studio Support Team
    Why do delay echoes not work properly with BooBass? Document_title: BooBass
    File_name: plugins/BooBass.htm
    Heading_hierarchy: [BooBass -> Notes & Tips]
    Anchor_id: [none]
    Since BooBass is monophonic, delay echoes will not work properly (see Function Settings ). Plugin Credits: David Billen
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 10
  • per_device_eval_batch_size: 10
  • num_train_epochs: 2
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 10
  • per_device_eval_batch_size: 10
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 2
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • 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: False
  • 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: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • tp_size: 0
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': 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: None
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • 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
  • 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
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin

Training Logs

Epoch Step Training Loss cosine_ndcg@10
0.0847 50 - 0.8699
0.1695 100 - 0.8846
0.2542 150 - 0.8902
0.3390 200 - 0.9001
0.4237 250 - 0.9052
0.5085 300 - 0.9056
0.5932 350 - 0.9073
0.6780 400 - 0.9108
0.7627 450 - 0.9097
0.8475 500 0.0591 0.9157

Framework Versions

  • Python: 3.11.12
  • Sentence Transformers: 3.4.1
  • Transformers: 4.51.3
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.6.0
  • Datasets: 3.6.0
  • Tokenizers: 0.21.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
8
Safetensors
Model size
305M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for austinpatrickm/gte-multilingual-base-finetuned

Finetuned
(66)
this model

Evaluation results