---
language:
- en
license: apache-2.0
tags:
- sentence-transformers
- sparse-encoder
- sparse
- splade
- e-commerce
- product-search
- information-retrieval
- multi-domain
- dataset_size:99712
- loss:SpladeLoss
- loss:SparseMultipleNegativesRankingLoss
- loss:FlopsLoss
base_model: distilbert/distilbert-base-uncased
datasets:
- tasksource/esci
- wayfair/wands
widget:
- text: '[KIDS TOYLAND] Wooden Dessert Play Set for Kids, Pretend Play Food Sets for
Birthday Party ,Great for 3, 4, 5, and 6 Year Olds Girls and Boys Wooden Pretend
Play Food Desserts Set,Wood Dessert Tower and Cakes,Educational Play Food Toys
for 2 years old kids Birthday Gift
Packing Includ:
cake stand
*1 chocolates and cakes*12
Pretend Play Wooden Food Set Features:
This high-quality wooden toy is designed for kids three and up, can be used as
educational toys for shape matching, counting and concepts of reconstruction.
1. size: 9.17*9.17*2.2 inch, this beautifully decorated multi shaped
c'
- text: mathematical compass
- text: '[NYX PROFESSIONAL MAKEUP] NYX PROFESSIONAL MAKEUP Lip Lingerie Matte Liquid
Lipstick - Beauty Mark, Chocolate Brown'
- text: '[Aladdin] Mrs. Frisby and the Rats of NIMH'
- text: '[Office Chairs] ginata salon beauty drafting chair'
pipeline_tag: feature-extraction
library_name: sentence-transformers
---
# SPLADE Multi-Domain E-Commerce Search
A SPLADE sparse encoder fine-tuned on multiple e-commerce datasets (Amazon ESCI + Wayfair WANDS + Home Depot) for better cross-domain generalization. Trades slight in-domain performance for significantly better generalization across e-commerce domains.
## Benchmark Results
### Cross-Domain Performance (vs Single-Domain Model)
| Dataset | Single-Domain | **Multi-Domain** | Improvement |
|---------|---------------|------------------|-------------|
| ESCI (in-domain) | 0.389 | 0.372 | -4% |
| WANDS (Wayfair) | 0.355 | **0.366** | +3% |
| Home Depot | 0.384 | **0.410** | +7% |
### vs BM25 Baseline
| Dataset | BM25 | **This Model** | Improvement |
|---------|------|----------------|-------------|
| ESCI | 0.305 | 0.372 | +22% |
| WANDS | 0.329 | 0.366 | +11% |
| Home Depot | 0.349 | 0.410 | +17% |
## Model Description
This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) using the [sentence-transformers](https://www.SBERT.net) library. It maps sentences & paragraphs to a 30522-dimensional sparse vector space and can be used for semantic search and sparse retrieval.
## Model Details
### Model Description
- **Model Type:** SPLADE Sparse Encoder
- **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 30522 dimensions
- **Similarity Function:** Dot Product
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
### Full Model Architecture
```
SparseEncoder(
(0): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'DistilBertForMaskedLM'})
(1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("sparse_encoder_model_id")
# Run inference
sentences = [
'mpow',
'[Mpow] Wireless Earbuds Active Noise Cancelling, Mpow X3 ANC Bluetooth Earphones w/4 Mics Noise Cancelling, Stereo Earbuds w/Deep Bass, 30Hrs ANC Earbuds w/USB-C Charge, Smart Touch Control, IPX8 Waterproof',
'[Jerzees] Jerzees Dri-Power Poly Pocketed Open-Bottom Sweatpants, Large - Black 100% Polyester Pre-shrunk Jersey',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 69.1663, 66.0022, 51.6937],
# [ 66.0022, 238.3157, 60.5486],
# [ 51.6937, 60.5486, 174.3004]])
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 99,712 training samples
* Columns: anchor and positive
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details |
bird feeder pole station | [EXCMARK] EXCMARK 2 Pack Shepherd Hook 32 inch 1/2 inch Thick Use at Weddings, Hanging Solar Lights, Lanterns, Bird Feeders, Metal Hanger Hook (Bronze, 32 inch) Create the garden of your dreams with our Shepherds Hooks!
These amazing hooks with the perfect balance of tradition and versatility are the perfect accessory to any outdoor space! A super easy and convenient way to tackle any outdoor gardening party or event! It will make any hanging object stand out with ultimate beauty. Hang your decorative lights, bird feeders, lanterns, and more!
Each hook includes 2 extenders for three height options. The hooks can measure up to 32”
|
| chrome bath lighting | Progress Lighting Archie Collection 2-Light Chrome Bath Light Archie is a standout in any room and provides a fun and fashionable way to light your home. The authentic, prismatic style glass shade diffuses light to provide functional and stylish illumination. This fixture can be installed with the glass facing up or down to suit your preference.California residents: see Proposition 65 informationChrome finishClear prismatic glass17 in. W x 8-3/4 in. HUses (2) 100-Watt medium base bulbs (not included)Fixture can be installed facing upwards or downwards |
| sex toys kinky for female | [Knaughty Knickers] Knaughty Knickers Daddys Little Lil Fuck Toy Fucktoy DDLG BDSM Owned Boyshort Black 95% combed and ringspun cotton/5% spandex --- Low rise shortie boyshort style panty --- Satin trim fold over elastic waistband --- Custom embelished on quality Bella product --- Super soft and comfortable --- Funny or rude underwear |
* Loss: [SpladeLoss](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
```json
{
"loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score', gather_across_devices=False)",
"document_regularizer_weight": 3e-05,
"query_regularizer_weight": 5e-05
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 32
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
- `router_mapping`: {'anchor': 'query', 'positive': 'document'}
#### All Hyperparameters