Sentence Similarity
sentence-transformers
Safetensors
xlm-roberta
product-similarity
product-embeddings
weak-supervision
text-embeddings-inference
Instructions to use beno-rohman/product-embedding-e5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use beno-rohman/product-embedding-e5-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("beno-rohman/product-embedding-e5-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download reports/functional/examples.json from beno-rohman/product-embedding-e5-base: direct link, hf CLI and curl.
- Browser
- Download file 5.54 kB
-
https://huggingface.co/beno-rohman/product-embedding-e5-base/resolve/main/reports/functional/examples.json
- Command line
-
hf download hf://beno-rohman/product-embedding-e5-base/reports/functional/examples.json
-
curl -L -o examples.json https://huggingface.co/beno-rohman/product-embedding-e5-base/resolve/main/reports/functional/examples.json
5.54 kB
| { | |
| "consoles": { | |
| "products": [ | |
| "ps5", | |
| "playstation 3", | |
| "wii", | |
| "nintendo switch oled", | |
| "sticker nintendo switch", | |
| "naruto ultimate ninja" | |
| ], | |
| "same_type_indices": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3 | |
| ], | |
| "contrast_index": 4, | |
| "similarities": [ | |
| [ | |
| 1.0000001192092896, | |
| 0.8629862070083618, | |
| 0.7244985103607178, | |
| 0.6863471865653992, | |
| 0.4104842245578766, | |
| 0.348721981048584 | |
| ], | |
| [ | |
| 0.8629862070083618, | |
| 1.0, | |
| 0.7635881900787354, | |
| 0.7316844463348389, | |
| 0.44447582960128784, | |
| 0.297852486371994 | |
| ], | |
| [ | |
| 0.7244985103607178, | |
| 0.7635881900787354, | |
| 1.000000238418579, | |
| 0.7813860774040222, | |
| 0.47669610381126404, | |
| 0.3473331034183502 | |
| ], | |
| [ | |
| 0.6863471865653992, | |
| 0.7316844463348389, | |
| 0.7813860774040222, | |
| 1.0, | |
| 0.5764724016189575, | |
| 0.3486233949661255 | |
| ], | |
| [ | |
| 0.4104842245578766, | |
| 0.44447582960128784, | |
| 0.47669610381126404, | |
| 0.5764724016189575, | |
| 0.9999998807907104, | |
| 0.28555166721343994 | |
| ], | |
| [ | |
| 0.348721981048584, | |
| 0.297852486371994, | |
| 0.3473331034183502, | |
| 0.3486233949661255, | |
| 0.28555166721343994, | |
| 0.9999997615814209 | |
| ] | |
| ], | |
| "min_same_type_cosine": 0.6863471865653992, | |
| "max_contrast_cosine": 0.5764724016189575, | |
| "ordering_pass": true, | |
| "margin": 0.10987478494644165 | |
| }, | |
| "phones": { | |
| "products": [ | |
| "Apple iPhone 13 smartphone", | |
| "Samsung Galaxy S21 smartphone", | |
| "Google Pixel 6 smartphone", | |
| "Protective case for Samsung Galaxy S21" | |
| ], | |
| "same_type_indices": [ | |
| 0, | |
| 1, | |
| 2 | |
| ], | |
| "contrast_index": 3, | |
| "similarities": [ | |
| [ | |
| 1.0, | |
| 0.8741918802261353, | |
| 0.8973511457443237, | |
| 0.11750806868076324 | |
| ], | |
| [ | |
| 0.8741918802261353, | |
| 0.9999999403953552, | |
| 0.9346611499786377, | |
| 0.1243891566991806 | |
| ], | |
| [ | |
| 0.8973511457443237, | |
| 0.9346611499786377, | |
| 0.9999998807907104, | |
| 0.12338785827159882 | |
| ], | |
| [ | |
| 0.11750806868076324, | |
| 0.1243891566991806, | |
| 0.12338785827159882, | |
| 1.000000238418579 | |
| ] | |
| ], | |
| "min_same_type_cosine": 0.8741918802261353, | |
| "max_contrast_cosine": 0.1243891566991806, | |
| "ordering_pass": true, | |
| "margin": 0.7498027235269547 | |
| }, | |
| "laptops": { | |
| "products": [ | |
| "ASUS laptop computer", | |
| "Apple MacBook Air laptop", | |
| "Lenovo ThinkPad laptop", | |
| "65W laptop charger" | |
| ], | |
| "same_type_indices": [ | |
| 0, | |
| 1, | |
| 2 | |
| ], | |
| "contrast_index": 3, | |
| "similarities": [ | |
| [ | |
| 1.0000003576278687, | |
| 0.927545428276062, | |
| 0.8521203398704529, | |
| 0.118956059217453 | |
| ], | |
| [ | |
| 0.927545428276062, | |
| 1.0, | |
| 0.8487429618835449, | |
| 0.130229651927948 | |
| ], | |
| [ | |
| 0.8521203398704529, | |
| 0.8487429618835449, | |
| 1.0000001192092896, | |
| 0.1119147390127182 | |
| ], | |
| [ | |
| 0.118956059217453, | |
| 0.130229651927948, | |
| 0.1119147390127182, | |
| 1.0 | |
| ] | |
| ], | |
| "min_same_type_cosine": 0.8487429618835449, | |
| "max_contrast_cosine": 0.130229651927948, | |
| "ordering_pass": true, | |
| "margin": 0.7185133099555969 | |
| }, | |
| "footwear": { | |
| "products": [ | |
| "Nike running shoes", | |
| "Adidas running shoes", | |
| "Brooks running shoes", | |
| "Nike cotton t-shirt" | |
| ], | |
| "same_type_indices": [ | |
| 0, | |
| 1, | |
| 2 | |
| ], | |
| "contrast_index": 3, | |
| "similarities": [ | |
| [ | |
| 1.0, | |
| 0.9955270886421204, | |
| 0.9913436770439148, | |
| 0.07657626271247864 | |
| ], | |
| [ | |
| 0.9955270886421204, | |
| 1.0, | |
| 0.993928074836731, | |
| 0.0914757028222084 | |
| ], | |
| [ | |
| 0.9913436770439148, | |
| 0.993928074836731, | |
| 1.0, | |
| 0.07082120329141617 | |
| ], | |
| [ | |
| 0.07657626271247864, | |
| 0.0914757028222084, | |
| 0.07082120329141617, | |
| 1.000000238418579 | |
| ] | |
| ], | |
| "min_same_type_cosine": 0.9913436770439148, | |
| "max_contrast_cosine": 0.0914757028222084, | |
| "ordering_pass": true, | |
| "margin": 0.8998679742217064 | |
| }, | |
| "kitchen": { | |
| "products": [ | |
| "DeLonghi espresso machine", | |
| "Philips coffee maker", | |
| "Krups coffee machine", | |
| "Stainless steel electric kettle" | |
| ], | |
| "same_type_indices": [ | |
| 0, | |
| 1, | |
| 2 | |
| ], | |
| "contrast_index": 3, | |
| "similarities": [ | |
| [ | |
| 0.9999998211860657, | |
| 0.872557520866394, | |
| 0.8660846948623657, | |
| 0.38212132453918457 | |
| ], | |
| [ | |
| 0.872557520866394, | |
| 0.9999999403953552, | |
| 0.9823188781738281, | |
| 0.35910871624946594 | |
| ], | |
| [ | |
| 0.8660846948623657, | |
| 0.9823188781738281, | |
| 1.000000238418579, | |
| 0.34682920575141907 | |
| ], | |
| [ | |
| 0.38212132453918457, | |
| 0.35910871624946594, | |
| 0.34682920575141907, | |
| 0.9999998807907104 | |
| ] | |
| ], | |
| "min_same_type_cosine": 0.8660846948623657, | |
| "max_contrast_cosine": 0.38212132453918457, | |
| "ordering_pass": true, | |
| "margin": 0.48396337032318115 | |
| } | |
| } | |