Downloads · 30 days
1.1K
7% of all-time downloads
knguyennguyen/fashion_5k
fashion_5k is a sentence similarity model from knguyennguyen. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from FacebookAI/roberta-base. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, pa…
Downloads · 30 days
1.1K
7% of all-time downloads
All-time downloads
15.8K
Public
Parameters
125M
499 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
This is a sentence-transformers model finetuned from FacebookAI/roberta-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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: RobertaModel
(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})
)
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/fashion_5k")
# Run inference
sentences = [
"I'm looking for a charming ring that embodies innocence and purity, suitable for daily wear. It should have a minimalistic design and be stackable with other rings. Durability is key, and I prefer it to be available in a unique metallic finish.",
"Title: CozzySayido Daisy Flower Ring Bands for Woman Innocent Daisy Promise Dainty Delicate Design Minimalistic Stackable Available in Silver and Rose Gold Descripion: ['“Always have something beautiful in sight, even if it’s just a daisy in a jelly glass.”'\n '- H. Jackson, Brown Jr.'\n 'Simple, sweet, stackable everyday ring for the sweetest ones.' 'Perks'\n 'Silver or rose gold Stainless steel No corrosion No peeling No spotting or staining No green fingers Resistant to perfume, sweat, and salt water Styling versatility (stack rings, minimalistic one-piece, knuckle, toe, stopper) Medical-grade stainless steel Unbreakable Unbendable Dainty, sweet, and delicate design 30-day full refund'\n 'Sizing'\n 'Available in size 3-10 (For sizing specs and how to know your size, please consult out sizing guide in the photo panel above.)'\n 'CozzySayido'\n 'We brainstorm for our customer to get the best value product. Proudly present, a daisy flower ring. We chose stainless-steel material which is no allergies for sensitive skin, durable and tough in any conditions, no matter if you wash your hand with alcohol sanitizer or washing tons of dishes or swimming in chlorine and salt water, it never gets spotting, staining or turn your finger green or any other color. Unbreakable and unbendable no matter, how you wear it.'\n 'Meaningful design, daisy flower is the symbol of innocence, purity, true love and new beginning to make every of your day the start of something new.'\n 'Designs as well as on-trend fashion jewelry for women with minimalist, dainty, sweet, and delicate style.']",
'Title: Chelsea FC Official Soccer Gift Mens Graphic T-Shirt Navy XXL Descripion: [\'Official CFC mens T-shirt Large club crest & text print to front Garment Size (Chest): Sm. 40"; Med. 41"; Lge. 42"; XL 44"; XXL 48"; 3XL 52" 100% cotton, top quality T-shirt Many more gift ideas for him @ FootballShopOnline\']',
]
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]
<!--
### 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.*
-->
| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 26 tokens</li><li>mean: 44.9 tokens</li><li>max: 87 tokens</li></ul> | <ul><li>min: 21 tokens</li><li>mean: 106.64 tokens</li><li>max: 128 tokens</li></ul> |
| sentence_0 | sentence_1 |
|---|---|
| <code>I'm looking for a spooky mask that can enhance my costume for a Halloween event. It should have a unique design, feature some lighting effects, and come with hair, suitable for adults.</code> | <code>Title: Scary Clown Mask for Penny It Cosplay Costume Halloween Led Light Up Joker Mask with Hair Latex Horror Adult Mask Party Props Descripion: ['This clown costume mask for adults is available in a standard size that fits most adults and teens and is perfect for Halloween, themed parties, haunted houses, and more. Does not include shoes or costume. Care for this 100% latex mask with attached synthetic polyester hair']</code> |
| <code>I'm looking for a festive accessory set to celebrate a special birthday. It should include a stylish decorative piece that can be adjusted for comfort and a fun headpiece that adds a touch of sparkle, perfect for both intimate gatherings and lively celebrations.</code> | <code>Title: Birthday Queen Sash & Rhinestone Headband Set - Silver Glitter Birthday Sash Birthday Gifts for Women Birthday Party Supplies Descripion: ['"Birthday Queen" sash & rhinestone headband set ↑ No need to keep looking...it's the ultimate birthday party gifts set! ✓ Silver glitter sash + black lettering looks great on Instagram. Make the birthday queen feel special and stand out from the crowd. ✓ It's party tested and approved...will last day into night! Not only perfect for the cozy birthday parties with family but also for the crazy night at Vegas. ✓ No size trouble + Comfortable wearing: Sash can be adjust by clip on to fit from all type body figure. Headband can sit comfortably on the head and the letters are large enough to be clearly identifiable We had so much fun designing this birthday gifts set, we hope they add just as much fun to your parties too. Get the sash and headband at the same time and be prepare for the birthday celebration!']</code> |
| <code>I'm looking for a cozy and stylish outerwear option for the colder months, ideally with a hood and a playful design. It should be warm and plush, perfect for layering, and have a comfortable fit.</code> | <code>Title: OutTop Sherpa Jacket Women Fall Winter Plush Warm Hooded Stripe Color Block Thicken Warm Fleece Coats Parka Outwear Descripion: ['Package Include:1 PC Coats'<br> '==========================================================================='<br> 'SIZE TABLE' ': International standard : 1 inch = 2.54 cm☺'<br> "Size:S____US:4____Bust:100cm/39.37''____Sleeve:56.5cm/22.24''____Length:88cm/34.65''"<br> "Size:M____US:6____Bust:105cm/41.34''____Sleeve:57cm/22.44''____Length:89cm/35.04''"<br> "Size:L____US:8____Bust:110cm/43.31''____Sleeve:57.5cm/22.64''____Length:90cm/35.43''"<br> "Size:XL____US:10____Bust:115cm/45.28''____Sleeve:58cm/22.83''____Length:91cm/35.83''"<br> "Size:XXL____US:12____Bust:120cm/47.24''____Sleeve:58.5cm/23.03''____Length:92cm/36.22''"<br> "Size:XXXL____US:14____Bust:125cm/49.21''____Sleeve:59cm/23.23''____Length:93cm/36.61''"<br> "Size:XXXXL____US:16____Bust:130cm/51.18''____Sleeve:59.5cm/23.43''____Length:94cm/37.01''"<br> "Size:XXXXXL____US:18____Bust:135cm/53.15''____Sleeve:60cm/23.62''____Length:95cm/37.40''"<br> '==========================================================================='<br> 'Any questions, please feel free to contact us.☺☺' 'Delivery:'<br> 'Standard express would take 7-20 days to deliver. Expedited express need 5-7 days.☺☺']</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
per_device_train_batch_size: 128per_device_eval_batch_size: 128num_train_epochs: 5multi_dataset_batch_sampler: round_robinoverwrite_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@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",
}
@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.*
-->