SentenceTransformer based on NovaSearch/stella_en_1.5B_v5
This is a sentence-transformers model finetuned from NovaSearch/stella_en_1.5B_v5. It maps sentences & paragraphs to a 1024-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: NovaSearch/stella_en_1.5B_v5
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 1024 dimensions
- 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': 512, 'do_lower_case': False}) with Transformer model: Qwen2Model
(1): Pooling({'word_embedding_dimension': 1536, '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): Dense({'in_features': 1536, 'out_features': 1024, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
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("bod9/fulldshardneg")
# Run inference
sentences = [
'#1 small corded treadmill without remote control',
'SUNNY HEALTH & FITNESS ASUNA Space Saving Treadmill, Motorized with Speakers for AUX Audio Connection - 8730G',
'Goplus Under Desk Treadmill, with Touchable LED Display and Wireless Remote Control, Built-in 3 Workout Modes and 12 Programs, Walking Jogging Machine, Superfit Electric Treadmill for Home Office',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Evaluation
Metrics
Information Retrieval
- Dataset:
ir_evaluation - Evaluated with
InformationRetrievalEvaluator
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5244 |
| cosine_accuracy@3 | 0.7189 |
| cosine_accuracy@5 | 0.7823 |
| cosine_accuracy@10 | 0.8453 |
| cosine_precision@1 | 0.5244 |
| cosine_precision@3 | 0.4476 |
| cosine_precision@5 | 0.4002 |
| cosine_precision@10 | 0.3198 |
| cosine_recall@1 | 0.0937 |
| cosine_recall@3 | 0.2136 |
| cosine_recall@5 | 0.298 |
| cosine_recall@10 | 0.4318 |
| cosine_ndcg@5 | 0.4676 |
| cosine_ndcg@10 | 0.4681 |
| cosine_mrr@1 | 0.5244 |
| cosine_mrr@5 | 0.6257 |
| cosine_mrr@10 | 0.6341 |
| cosine_map@10 | 0.3493 |
| cosine_map@100 | 0.4065 |
Graded IR
- Dataset:
gr_evaluation - Evaluated with
GradedIREvaluator.GradedIREvaluator
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.7088 |
| cosine_accuracy@3 | 0.9038 |
| cosine_accuracy@5 | 0.9463 |
| cosine_accuracy@10 | 0.984 |
| cosine_precision@1 | 0.7088 |
| cosine_precision@3 | 0.6469 |
| cosine_precision@5 | 0.6045 |
| cosine_precision@10 | 0.5284 |
| cosine_recall@1 | 0.1272 |
| cosine_recall@3 | 0.3093 |
| cosine_recall@5 | 0.449 |
| cosine_recall@10 | 0.7099 |
| cosine_ndcg@5 | 0.7127 |
| cosine_ndcg@10 | 0.7543 |
| cosine_mrr@1 | 0.7088 |
| cosine_mrr@5 | 0.8066 |
| cosine_mrr@10 | 0.8118 |
| cosine_map@10 | 0.6051 |
| cosine_map@100 | 0.6944 |
Framework Versions
- Python: 3.11.12
- Sentence Transformers: 4.1.0
- Transformers: 4.51.3
- PyTorch: 2.6.0+cu124
- Accelerate: 1.6.0
- Datasets: 3.6.0
- Tokenizers: 0.21.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",
}
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}
}
Model tree for bod9/stella_en_1.5B_v5-ecom-retrieval
Base model
NovaSearch/stella_en_1.5B_v5Evaluation results
- Cosine Accuracy@1 on ir evaluationself-reported0.524
- Cosine Accuracy@3 on ir evaluationself-reported0.719
- Cosine Accuracy@5 on ir evaluationself-reported0.782
- Cosine Accuracy@10 on ir evaluationself-reported0.845
- Cosine Precision@1 on ir evaluationself-reported0.524
- Cosine Precision@3 on ir evaluationself-reported0.448
- Cosine Precision@5 on ir evaluationself-reported0.400
- Cosine Precision@10 on ir evaluationself-reported0.320
- Cosine Recall@1 on ir evaluationself-reported0.094
- Cosine Recall@3 on ir evaluationself-reported0.214