Edit model card

SentenceTransformer based on intfloat/e5-base-v2

This is a sentence-transformers model finetuned from intfloat/e5-base-v2. 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: intfloat/e5-base-v2
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 768 tokens
  • Similarity Function: Cosine Similarity

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': 768, '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("wjunwei/ecommerce_text_embedding_retrieval_v2")
# Run inference
sentences = [
    'yeti yonder chug cap a bottle is only as good as its cap which is why we brought the best parts of our rambler chug cap to the yonder cap leakproof   leakproof so you can carry it with confidence clippable  slip it through a backpack strap or clip it onto a carabiner to take water just about anywhere dishwasher safe  because no one needs more work to do spin the top off when you need a drink from the controlled spout twist off the bottom when youre ready to refill or wash it',
    'lid for hydro flask      oz wide mouth bottle replacement lid for thermoflaskiron flasktakeya and more wide mouth bottles  pack compatibilitysuitable for hydro flaskshydroflaskthermoflaskiron flasktakeyaklean kanteensimple modern hydro cellkoodeebjpkpk and more brands wide mouth water bottlesplease confirm the mouth inner diameter and thread height of the water bottle before purchase  inner diameter thread height   important note this lid does not fit tal hydro flask growler series hydropeak manna yeti nalgene ozark trail water bottles or standard and narrow mouth water bottles when you are not sure please feel free to contact us by email we will reply you in  minutes during working hours  meanwhile we offer zerorisk purchase with a promise of full refund or exchange  soft handle the soft silicone handle and flexible rotation design make it easy for you to carry a water bottle even when filled with water simple and easy to replenish at any time  safe and leak proof bpa free healthy and safe eliminating leaks whether you are undergoing safety checks or traveling keep your bag and clothes dry  classic style simple and atmospheric appearance design increases the charm of your water bottle the simpler the more classic it is you will love your water bottle more because of this replacement lid ',
    'hydro flask standard mouth lids accessory for standard mouth water bottle standard mouth flex straw cap fits all hydro flask standard mouth bottles straw is easy to trim to fit your favorite hydro flask flex strap is easy to transport and comfortable to carry honeycomb insulated cap for maximum temperature retention leakproof when closed so you can reliably sip and transport your refreshment without worry bpafree  toxinfree removable components for easy cleaning dishwasher safe flex straw cap not intended for use with hot liquids show more',
]
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]

Training Details

Training Dataset

Unnamed Dataset

  • Size: 5,864 training samples
  • Columns: sentence_0, sentence_1, and label
  • Approximate statistics based on the first 1000 samples:
    sentence_0 sentence_1 label
    type string string int
    details
    • min: 5 tokens
    • mean: 145.16 tokens
    • max: 512 tokens
    • min: 3 tokens
    • mean: 147.19 tokens
    • max: 512 tokens
    • 0: ~87.50%
    • 1: ~12.50%
  • Samples:
    sentence_0 sentence_1 label
    squishmallows original inch bluey hugmees mediumsized ultrasoft official jazwares plush squad up grow your squishmallows squad with bluey a supersoft collectible mediumsized hugmees plush musthave bring the fun home with this squishmallows made with ultrasoft highquality materials hugmees squishmallows hugmees have extended arms and are always ready for a hug collectible look for other squishmallows extensions including flipamallows fuzzamallows mystery squad and stackables only by original squishmallows officially licensed product this inch plush is officially licensed by the bbc squishmallows original inch bluey hugmees mediumsized ultrasoft official jazwares plush squad up grow your squishmallows squad with bluey a supersoft collectible mediumsized hugmees plush musthave bring the fun home with this squishmallows made with ultrasoft highquality materials hugmees squishmallows hugmees have extended arms and are always ready for a hug collectible look for other squishmallows extensions including flipamallows fuzzamallows mystery squad and stackables only by original squishmallows officially licensed product this inch plush is officially licensed by the bbc 1
    rechargeable headlamp high lumen bright led head lamp with red white light ipx waterproof headlight mode head flashlight for outdoor running hunting fishing hiking camping gear illuminate your world in all directions designed in the usa mioisy head lamp features powerful xpgled bulbs that provide up to lumens max ensuring that you can see everything around you clearly perfect for exploring caves night runningcyclingfishingcamping construction work and other outdoor adventure activities the red safety warning light switch is located on the back battery compartment to ensure all direction safety and emergency response usb rechargeable and long battery life do not use unsafe cylindrical batteries our rechargeable headlamp usa builtin rechargeable batteries to ensure your safety first our head lamps support typec usb charging making it convenient for everyday use the headlamp rechargeable can provide hours of longlasting power in different lighting modes so you can adventure without worrying about running out of juice long press and motion sensor in any mode press the on switch button for seconds the rechargeable headlamp flashlight will turn off directly no need to cycle through all the modes the headlights for head is also equipped with the smart motion sensor which easily controls the headlamps for adults on and off with a wave of your hand more convenient for your work ipx waterproof and modes for any situation our headlamp flashlight is built to withstand splashes of water from all angles so you can take it on any weather rain or shine the head light has modes controlled by buttons one button switch key modes the other button switch sensor modes our led headlamp is the ultimate adaptable tool for any situation ensuring you have the right light for any adventure adjustable angle and comfortable headband to ensure flexible lighting our head lights for forehead can be adjusted and the handsfree headlamp provides bright and steady lighting while you work the headlights for head use a soft and comfortable elastic headband that can be adjusted to fit different head size perfect headlamps for adults and kids only weight oz its comfortable to wear for long time ensuring you can explore with easethe band can be taken off to wash perfect gift for any occasion whether its fathers day thanksgiving christmas valentines day easter halloween or any special festival our rechargeable head flashlight is the perfect gift for anyone who loves the outdoor adventure give your father mother husband son or boyfriend the great gift with our powerful and reliable led headlamps if you have any questions please reach out to us to get professional solutions ocyclone tablet stand ipad stand for desk adjustable height and angle foldable tablet holder stand compatible with portable monitor ipad pro air mini black wide compability ocyclone tablet holder stand works with all inches smartphones and most tablets with cases such as ipad pro ipad air ipad ipad mini samsung galaxy tabs surface surface pro kindle fire hd portable monitor drawing tablet height angle adjustable the height of the tablet stand holder can be simply adjusted the angle can be adjusted from to by hand with this ocyclone tablet holder you can enjoy your movies cooking reading studying playing games watching youtube without any worries providing you comfortable viewing angle which helps to fix your posture and reduce neck back ache hands free portable the foldable design of the ipad stand makes you easy to carry your phone and ipad everywhere you can put the stand in the bag or on the body undoubltly it is a great ideal accessories for you take it any place of course it is also a great ideal gift for your family or your friends they will definitely be satisfied with the portable tablet stand super sturdy fully protective silicone pad ocyclone desk tablet ipad stand with premium aluminum abs material makes it more durable than others quality nonskid rubber covered on the front and the bottom can mamximum protect your phone from slide and scratches you can easily tap the screen without worrying the devices will tip over or fall off friendly user design the reserved charging hole makes it more convenient to charge your devices while using this tablet phone holder in addtion the silicone hook pad will not cover the subtitle when you watching movies ocyclone always aims at providing our customers the best happy shopping experience if you have any confusing please get in touch with us we will answer you within hours 0
    colgate extra soft toothbrush for sensitive teeth and gums with tongue and cheek cleaner pack extra soft toothbrush for sensitive teeth softer bristles protect tooth enamel and gums vs an ordinary soft manual toothbrush polishing cups gently remove teeth stains to whiten teeth our unique tongue and cheek cleaner remove bad breath bacteria raised cleaning tip helps get into hard to reach areas water bottle stickers pcs cool neon stickers sticker pack for kids adults teens waterproof vinyl stickers stickers for laptop skateboard journal notesbook computer phone cup guitar luggage etc great variety sticker pack contains pieces mix neon stickers designed to be friendly healthy and nonrepetitive cool neon and fun patterns add a unique eyecatching flair to your bland items make your life more colorful funny gifts neon stickers have a unique visual effect injecting brilliant and cool colors and trendy vitality into life stickers for adults teens kids and stickers lovers stickers can be used as birthday gifts party favors home or classroom behavior rewards etc good quality beautiful vinyl stickers size in waterproof design bright colors and high resolution good sticking power no fading no unhealthy motifs not easy to tear safe and nontoxic even outdoors it can easily handle inclement weather widely used fun stickers can not only cover or embellish items so you can feel the fun and delightful emotions that come with decoration stickers for water bottle laptop journal scrapbook computer skateboard phone case macbook ipad planner cups suitcase luggage notebook scooter bike etc simple to use reusable stickers made with nonmarking adhesive can be randomly pasted or torn off without hurting the surface no residue is left behind when replacing or peel light up life all it takes is a cool and fun neon stickers brand stickers airnogo every product is carefully checked to ensure perfection if you have any questions we will take care of it immediately until you are satisfied 0
  • Loss: ContrastiveTensionLoss

Training Hyperparameters

Non-Default Hyperparameters

  • num_train_epochs: 5
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 8
  • per_device_eval_batch_size: 8
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_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: 5
  • 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}
  • 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: 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
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin

Training Logs

Epoch Step Training Loss
0.6821 500 7.9052
1.3643 1000 4.3803
2.0464 1500 3.6253
2.7285 2000 3.6853
3.4106 2500 3.6878
4.0928 3000 3.602
4.7749 3500 3.6512

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.0.1
  • Transformers: 4.41.2
  • PyTorch: 2.3.0+cu121
  • Accelerate: 0.31.0
  • Datasets: 2.20.0
  • Tokenizers: 0.19.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",
}

ContrastiveTensionLoss

@inproceedings{carlsson2021semantic,
    title={Semantic Re-tuning with Contrastive Tension},
    author={Fredrik Carlsson and Amaru Cuba Gyllensten and Evangelia Gogoulou and Erik Ylip{"a}{"a} Hellqvist and Magnus Sahlgren},
    booktitle={International Conference on Learning Representations},
    year={2021},
    url={https://openreview.net/forum?id=Ov_sMNau-PF}
}
Downloads last month
175
Safetensors
Model size
109M params
Tensor type
F32
·
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Finetuned from