SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-mpnet-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: sentence-transformers/all-mpnet-base-v2
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 768 tokens
- 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': 128, 'do_lower_case': False}) with Transformer model: MPNetModel
(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})
)
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("knguyennguyen/mpnet_jacket4k_adjustedv2")
# Run inference
sentences = [
"women's cropped puffer jacket featuring a solid color, long sleeves, and a stand collar with a zipper closure.",
"Title: Women's Zip Up Cropped Puffer Jacket Winter Long Sleeve Quilted Drawstring Short Down Coats Warm Outerwear Descripion: Women's Winter Warm Short Down Coat Solid Color Long Sleeve Stand Collar Zipper Puffer Jacket Outerwear Size(inch) S Length: 18.90 Bust: 44.09 Sleeve: 22.05 Shoulder: 19.69 M Length: 19.29 Bust: 45.67 Sleeve: 22.44 Shoulder: 20.08 L Length: 19.69 Bust: 47.24 Sleeve: 22.83 Shoulder: 20.47 Specification: Material: Polyester Sleeve Length: Long Pattern Type: Solid Color Gender: Women Item Type: Coat Package Included: 1 x coat 100% Polyester Imported Zipper closure Machine Wash Material: Wome cropped puffer jacket winter coat is made of high quality polyester material, lightweight, safe to skin and easy to wash, thick and warm, comfortable and soft to wear. This quilted short down jacket is a must have this winter! Design: Women's winter casual warm puffer coat, solid color, long sleeve, stand collar, full zipper closure, quilted design, drop shoulder, crop length, elastic drawstring design on the hem, very all-match and is a timeless and ideal companion on cold days! Occasion: Womens windproof short down coats suitable for casual daily wear, outdoor activity, school, streetwear, working, office, holiday, club, friends party, photography outfit and so on. Perfect addition to your winter chic and fashionable look. Match: This relax fit quilted puffer jacket can pair with crop tops, blouses, basic t-shirts,sweaters, skinny jeans, casual pants, leggings, skirts, boots, sneakers for a winter trendy look. Package&Size: 1 x coat. If the product has any quality problems, please feel free to contact us, we will help you solve the problem as quickly as possible. S, M, L. Please check the size chart carefully before buying to get the clothes that fit your size.",
'Title: My Little Pony Hoodie for Girls, Zip Up Friendship Jacket with 3D Ears, Mane and Wings, Gray, Size 5 Descripion: SWEATER WEATHER OUTFIT TOPPER Include our fun and cute 3D zip up jacket in your list of must have outfit for your child for cold and chilly seasons. Its versatile gray color can complement other outfit colors, can be worn to school, for jogging, or hanging out with friends and family! FEATURES: Lined Hood3D Ears and ManeDetachable WingsRainbow Ribbed CuffsSoft-touch PrintsFull-Zip Closure LONG LASTING QUALITY Super soft and lightweight fabric that provides insulation without the added bulk. Won’t weigh your child down and provides ample freedom of motion while protecting her the cold and chill. Its double lined hood provides extra protection from the wind and moisture. Fleece Zip Up closure Hand Wash Only FUN AND COMFY. Keep your child fashionably warm with this My Little Pony hoodie for girls. Made with soft fleece fabric and brushed interior for added plushness. This zip up hoodie is comfortable without being bulky. Its lightweight design does not compromise its quality, a perfect jacket for your precious one! FRIENDSHIP IS MAGIC. Celebrate the magic of friendship with the stars of Equestria! Featuring the super friendly Twilight Sparkle, the loyal and dependable Rainbow Dash and the funniest pony, Pinkie Pie! Join their adventure and explore the true meaning of friendship along the way. EASY TO WEAR HOODIE. Our My Little Pony 3D hoodie jacket features a zip front, cuffed sleeves and bottom cuffs. This hooded jacket is easy to wear and its cuffed sleeves and bottom design keeps its form and helps the jacket stay in place. Pair with your child’s favorite shirt or blouse, skirt, shorts, jeans, this hoodie will bring your child’s usual outfit to another level! ITS ALL IN THE DETAILS. Girls will surely be thrilled to wear our hoodie jacket with 3D details and design. With My Little Pony characters printed in front, FRIENDSHIP written on the sleeve, 3D ears, rainbow Mohawk style mane and adorable detachable wings at the back. With rainbow ribbed cuffs that adds an extra colorful accent to this fun and magical 3D My Little Pony hoodie MACHINE WASHABLE. Machine wash / hand wash in cold water with like colors, tumble dry low.',
]
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: 7,598 training samples
- Columns:
sentence_0
andsentence_1
- Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 type string string details - min: 4 tokens
- mean: 18.12 tokens
- max: 51 tokens
- min: 43 tokens
- mean: 121.06 tokens
- max: 128 tokens
- Samples:
sentence_0 sentence_1 a hoodie for daily wear and cosplay events for anime fans
Title: DAVIKO Boku No Hero Academia Shoto Todoroki Midoriya Izuku Hoodie Deku Hoodies Pullover Sweatshirt Jacket Cospaly Costume (3, Small) Yellow Descripion: Small(Chest:104cm/42.1inch, Shoulder:43cm/17.0inch, Sleeve:60cm/23.6inch, Length:62.5cm/24.6inch); Medium(Chest:112cm/44.3inch, Shoulder:53cm/17.8inch, Sleeve:64.5cm/25.4inch, Length:68.8cm/27.1inch); Large(Chest:115cm/45.6inch, Shoulder:45.9cm/18.1inch, Sleeve:67.8cm/26.7inch, Length:70.8cm/27.9inch); X-Large(Chest:119cm/46.8inch, Shoulder:46.9cm/18.5inch, Sleeve:69.9cm/27.55inch, Length:71.5cm/28.7inch); XX-Large(Chest:125cm/49.21inch, Shoulder:48.9cm/19.29inch, Sleeve:73.9cm/29.13inch, Length:74.5cm/29.3inch). Cloth,Polyester,Spandex Pull On closure 1. Our material is:90% polyester / 10%Spandex Healthy cloth,breathable, soft and smooth,very comfortable to wear. 2. My Hero Academia hoodie cosplay costume hoodies are perfect for daily wear, Halloween, theme party, cosplay, on the stage,etc. It's also a great gift for friends and Anime lovers. 3. Deku hoodie Material: polyster and design with Advance 3D technology printed. Soft and comfortable. 4.There are lots of anime cosplay costume hoodies in our shop, welcome to visit our store. 5.After-sale Services: If you have any problem, please feel free to contact us, we will help you as best we could!
a fleece jacket for girls to keep warm during winter
Title: Disney Elsa and Anna Zip Fleece Jacket for Girls – Frozen 2 Descripion: Keep warm during icy Arendelle winters when you zip up in our Elsa and Anna jacket. Featuring a solid fleece body adorned with an Elsa and Anna appliqué, this comfy cover-up will keep you looking cool while staying cozy. Fleece Zipper closure Hand Wash Only Genuine, Original, Authentic Disney Store Elsa and Anna appliqué on chest with glittering embroidered snowflakes Details include stand collar and full front zip Additional details include contrast trim and seam pockets Inspired by Frozen 2
a leather jacket for casual weekend rides and social gatherings for men
Title: Molluska Apparel Men’s Vintage Café Racer Premium Leather Jacket
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size
: 128per_device_eval_batch_size
: 128num_train_epochs
: 5multi_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
: 128per_device_eval_batch_size
: 128per_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
: 5max_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}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
: Falsehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseeval_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
: Falsebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: round_robin
Framework Versions
- Python: 3.11.11
- Sentence Transformers: 3.1.1
- Transformers: 4.45.2
- PyTorch: 2.5.1+cu121
- Accelerate: 1.2.1
- Datasets: 3.2.0
- Tokenizers: 0.20.3
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
- 3
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.
Model tree for knguyennguyen/mpnet_jacket4k_adjustedv2
Base model
sentence-transformers/all-mpnet-base-v2