metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:9712
- loss:TripletLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: Live Action Animation Effect from Spider-Man Across The Spider-Verse
sentences:
- PANDEMONIUM - Animation Short Film 2023 - GOBELINS
- Rakhal Raja | রাখাল রাজা | Bengali Movie – 6/14 | Chiranjeet
- >-
CGI Animated Short Film: "Song for a Wooden Heart" by The Inklings |
CGMeetup
- source_sentence: The Mannequin | Short Horror Film
sentences:
- >-
Sci-Fi Digital Series "Nikola Tesla and the End of the World" Ep 1 |
DUST
- >-
CGI Animated Short Film HD "Roommate Wanted - Dead or Alive " by Monkey
Tennis Animation | CGMeetup
- O Dharitri Maa | Lav Kush | Bengali Movie Devotional Song
- source_sentence: >-
Short film on choosing between child and career | "Patision Avenue" - by
Thanasis Neofotistos
sentences:
- Pratham Dekha | প্রথম দেখা | Bengali Movie – 1/15 | Prosenjit
- 'CGI & VFX Breakdowns: "The Intruder" - by PenguineFx Academy | TheCGBros'
- >-
CGI 2D Photoshop Tutorial : "Creating Tileable Textures from Pictures" -
by 3dmotive
- source_sentence: The Meaning Behind Camera Movement!
sentences:
- PROSOPAGNOSIA | Omeleto
- Horror Short Film "Fry Day" | ALTER
- Rupban Kanya | রূপবান কন্যা | Bengali Movie – 2/13 | Biswajit
- source_sentence: 'CGI 3D Animated Trailers: "Killing Anabella" - by Aman Bhanot | TheCGBros'
sentences:
- 'CGI 3D Animated Trailers: "Play On" - by Sun Woo Kang | TheCGBros'
- >-
Kaise Katey Rajani | Khudito Pasan | Bengali Movie Video Song | Bengali
Classic Song
- >-
Haenyo, the women of the sea (Trailer) - Animated short film by Eloïc
Gimenez
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. 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/all-MiniLM-L6-v2
- Maximum Sequence Length: 256 tokens
- Output Dimensionality: 384 dimensions
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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("Syldehayem/all-MiniLM-L6-v2_embedder_train")
# Run inference
sentences = [
'CGI 3D Animated Trailers: "Killing Anabella" - by Aman Bhanot | TheCGBros',
'Kaise Katey Rajani | Khudito Pasan | Bengali Movie Video Song | Bengali Classic Song',
'CGI 3D Animated Trailers: "Play On" - by Sun Woo Kang | TheCGBros',
]
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]
Training Details
Training Dataset
Unnamed Dataset
- Size: 9,712 training samples
- Columns:
sentence_0,sentence_1, andsentence_2 - Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 sentence_2 type string string string details - min: 4 tokens
- mean: 19.63 tokens
- max: 49 tokens
- min: 3 tokens
- mean: 20.02 tokens
- max: 49 tokens
- min: 5 tokens
- mean: 20.32 tokens
- max: 62 tokens
- Samples:
sentence_0 sentence_1 sentence_2 13 Films In 2 Years - A Filmmaker's Journey EPISODE 2 (Documentary)দেওয়া নেওয়া ইত্যাদিNatok Korish Na Toh CGI & VFX Showreels: "B-War" - by Jorge BaldeonTheCGBros Hot DogExcuse Me - Comedy SceneMauchaak Ranjit Mallick, Mithu Mukherjee - Loss:
TripletLosswith these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 16per_device_eval_batch_size: 16num_train_epochs: 50multi_dataset_batch_sampler: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 16per_device_eval_batch_size: 16per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 50max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_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: Falsefp16: 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}tp_size: 0fsdp_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: 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: batch_samplermulti_dataset_batch_sampler: round_robin
Training Logs
| Epoch | Step | Training Loss |
|---|---|---|
| 0.8237 | 500 | 5.0003 |
| 1.6474 | 1000 | 4.9955 |
| 2.4712 | 1500 | 4.9898 |
| 3.2949 | 2000 | 4.9741 |
| 4.1186 | 2500 | 4.9602 |
| 4.9423 | 3000 | 4.9196 |
| 5.7661 | 3500 | 4.8714 |
| 6.5898 | 4000 | 4.8077 |
| 7.4135 | 4500 | 4.7834 |
| 8.2372 | 5000 | 4.7543 |
| 9.0610 | 5500 | 4.7321 |
| 9.8847 | 6000 | 4.7047 |
| 10.7084 | 6500 | 4.7031 |
| 11.5321 | 7000 | 4.6618 |
| 12.3558 | 7500 | 4.6335 |
| 13.1796 | 8000 | 4.6199 |
| 14.0033 | 8500 | 4.5678 |
| 14.8270 | 9000 | 4.585 |
| 15.6507 | 9500 | 4.5565 |
| 16.4745 | 10000 | 4.5897 |
| 17.2982 | 10500 | 4.532 |
| 18.1219 | 11000 | 4.5248 |
| 18.9456 | 11500 | 4.5226 |
| 19.7694 | 12000 | 4.4929 |
| 20.5931 | 12500 | 4.4835 |
| 21.4168 | 13000 | 4.468 |
| 22.2405 | 13500 | 4.4638 |
| 23.0643 | 14000 | 4.4377 |
| 23.8880 | 14500 | 4.4336 |
| 24.7117 | 15000 | 4.4322 |
| 25.5354 | 15500 | 4.4144 |
| 26.3591 | 16000 | 4.4041 |
| 27.1829 | 16500 | 4.4118 |
| 28.0066 | 17000 | 4.3932 |
| 28.8303 | 17500 | 4.3745 |
| 29.6540 | 18000 | 4.3673 |
| 30.4778 | 18500 | 4.3903 |
| 31.3015 | 19000 | 4.3573 |
| 32.1252 | 19500 | 4.3369 |
| 32.9489 | 20000 | 4.3424 |
| 33.7727 | 20500 | 4.3416 |
| 34.5964 | 21000 | 4.3402 |
| 35.4201 | 21500 | 4.3205 |
| 36.2438 | 22000 | 4.3288 |
| 37.0675 | 22500 | 4.3306 |
| 37.8913 | 23000 | 4.3067 |
| 38.7150 | 23500 | 4.3108 |
| 39.5387 | 24000 | 4.2793 |
| 40.3624 | 24500 | 4.3203 |
| 41.1862 | 25000 | 4.3012 |
| 42.0099 | 25500 | 4.288 |
| 42.8336 | 26000 | 4.2913 |
| 43.6573 | 26500 | 4.2956 |
| 44.4811 | 27000 | 4.2755 |
| 45.3048 | 27500 | 4.2914 |
| 46.1285 | 28000 | 4.2525 |
| 46.9522 | 28500 | 4.2877 |
| 47.7759 | 29000 | 4.2624 |
| 48.5997 | 29500 | 4.2649 |
| 49.4234 | 30000 | 4.2897 |
Framework Versions
- Python: 3.12.9
- Sentence Transformers: 4.1.0
- Transformers: 4.51.3
- PyTorch: 2.7.0+cu126
- Accelerate: 1.6.0
- Datasets: 3.5.1
- 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",
}
TripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}