---
base_model: jinaai/jina-clip-v2
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:63802
- loss:CoSENTLoss
widget:
- source_sentence: машинка детская самоходная бибикар желтый
sentences:
- 'машинка детская красная бибикар '
- моторное масло alpine dx1 5w 30 5л 0101662
- 'спинбайк schwinn ic7 '
- source_sentence: 'велосипед stels saber 20 фиолетовый '
sentences:
- 'детские спортивные комплексы '
- 'велосипед bmx stels saber 20 v010 2020 '
- 50218 кабель ugreen hd132 hdmi zinc alloy optical fiber cable черный 40m
- source_sentence: гидравличесские прессы
sentences:
- пресс гидравлический ручной механизмом
- ракетка для настольного тенниса fora 7
- 'объектив panasonic 20mm f1 7 asph ii h h020ae k '
- source_sentence: 'бокс пластиковый монтажной платой щмп п 300х200х130 мм ip65 proxima
ящики щитки шкафы '
sentences:
- батарейный отсек для 4xаа открытый проволочные выводы разъем dcx2 1 battery holder
4xaa 6v dc
- 'bugera bc15 '
- 'бокс пластиковый монтажной платой щмп п 500х350х190 мм ip65 proxima ящики щитки
шкафы '
- source_sentence: 'honor watch gs pro black '
sentences:
- 'honor watch gs pro white '
- трансформер pituso carlo hb gy 06 lemon
- 'электровелосипед колхозник volten greenline 500w '
model-index:
- name: SentenceTransformer based on jinaai/jina-clip-v2
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: example dev
type: example-dev
metrics:
- type: pearson_cosine
value: 0.46018545926876964
name: Pearson Cosine
- type: spearman_cosine
value: 0.4873837299726027
name: Spearman Cosine
---
# SentenceTransformer based on jinaai/jina-clip-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [jinaai/jina-clip-v2](https://huggingface.co/jinaai/jina-clip-v2). It maps sentences & paragraphs to a None-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:** [jinaai/jina-clip-v2](https://huggingface.co/jinaai/jina-clip-v2)
- **Maximum Sequence Length:** None tokens
- **Output Dimensionality:** None dimensions
- **Similarity Function:** Cosine Similarity
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(transformer): Transformer(
(model): JinaCLIPModel(
(text_model): HFTextEncoder(
(transformer): XLMRobertaLoRA(
(roberta): XLMRobertaModel(
(embeddings): XLMRobertaEmbeddings(
(word_embeddings): ParametrizedEmbedding(
250002, 1024, padding_idx=1
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
(token_type_embeddings): ParametrizedEmbedding(
1, 1024
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
)
(emb_drop): Dropout(p=0.1, inplace=False)
(emb_ln): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)
(encoder): XLMRobertaEncoder(
(layers): ModuleList(
(0-23): 24 x Block(
(mixer): MHA(
(rotary_emb): RotaryEmbedding()
(Wqkv): ParametrizedLinearResidual(
in_features=1024, out_features=3072, bias=True
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
(inner_attn): SelfAttention(
(drop): Dropout(p=0.1, inplace=False)
)
(inner_cross_attn): CrossAttention(
(drop): Dropout(p=0.1, inplace=False)
)
(out_proj): ParametrizedLinear(
in_features=1024, out_features=1024, bias=True
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
)
(dropout1): Dropout(p=0.1, inplace=False)
(drop_path1): StochasticDepth(p=0.0, mode=row)
(norm1): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)
(mlp): Mlp(
(fc1): ParametrizedLinear(
in_features=1024, out_features=4096, bias=True
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
(fc2): ParametrizedLinear(
in_features=4096, out_features=1024, bias=True
(parametrizations): ModuleDict(
(weight): ParametrizationList(
(0): LoRAParametrization()
)
)
)
)
(dropout2): Dropout(p=0.1, inplace=False)
(drop_path2): StochasticDepth(p=0.0, mode=row)
(norm2): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)
)
)
)
)
)
(pooler): MeanPooler()
(proj): Identity()
)
(vision_model): EVAVisionTransformer(
(patch_embed): PatchEmbed(
(proj): Conv2d(3, 1024, kernel_size=(14, 14), stride=(14, 14))
)
(pos_drop): Dropout(p=0.0, inplace=False)
(rope): VisionRotaryEmbeddingFast()
(blocks): ModuleList(
(0-23): 24 x Block(
(norm1): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
(attn): Attention(
(q_proj): Linear(in_features=1024, out_features=1024, bias=False)
(k_proj): Linear(in_features=1024, out_features=1024, bias=False)
(v_proj): Linear(in_features=1024, out_features=1024, bias=False)
(attn_drop): Dropout(p=0.0, inplace=False)
(inner_attn_ln): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
(proj): Linear(in_features=1024, out_features=1024, bias=True)
(proj_drop): Dropout(p=0.0, inplace=False)
(rope): VisionRotaryEmbeddingFast()
)
(drop_path): Identity()
(norm2): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
(mlp): SwiGLU(
(w1): Linear(in_features=1024, out_features=2730, bias=True)
(w2): Linear(in_features=1024, out_features=2730, bias=True)
(act): SiLU()
(ffn_ln): LayerNorm((2730,), eps=1e-06, elementwise_affine=True)
(w3): Linear(in_features=2730, out_features=1024, bias=True)
(drop): Dropout(p=0.0, inplace=False)
)
)
)
(norm): LayerNorm((1024,), eps=1e-06, elementwise_affine=True)
(head): Identity()
(patch_dropout): PatchDropout()
)
(visual_projection): Identity()
(text_projection): Identity()
)
)
(normalizer): Normalize()
)
```
## 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 SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("seregadgl/t12")
# Run inference
sentences = [
'honor watch gs pro black ',
'honor watch gs pro white ',
'трансформер pituso carlo hb gy 06 lemon',
]
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
#### Semantic Similarity
* Dataset: `example-dev`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| pearson_cosine | 0.4602 |
| **spearman_cosine** | **0.4874** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 63,802 training samples
* Columns: doc
, candidate
, and label
* Approximate statistics based on the first 1000 samples:
| | doc | candidate | label |
|:--------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
| type | string | string | int |
| details |
массажер xiaomi massage gun eu bhr5608eu
| перкуссионный массажер xiaomi massage gun mini bhr6083gl
| 0
|
| безударная дрель ingco ed50028
| ударная дрель ingco id211002
| 0
|
| жидкость old smuggler 30мл 20мг
| жидкость old smuggler salt 30ml marlboro 20mg
| 0
|
* Loss: [CoSENTLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 7,090 evaluation samples
* Columns: doc
, candidate
, and label
* Approximate statistics based on the first 1000 samples:
| | doc | candidate | label |
|:--------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
| type | string | string | int |
| details | круглое пляжное парео селфи коврик пляжная подстилка пляжное покрывало пляжный коврик пироженко
| круглое пляжное парео селфи коврик пляжная подстилка пляжное покрывало пляжный коврик клубника
| 0
|
| аккумулятор батарея для ноутбука asus g751
| аккумулятор батарея для ноутбука asus g75 series
| 0
|
| миксер bosch mfq3520 mfq 3520
| миксер bosch mfq 4020
| 0
|
* Loss: [CoSENTLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.1
- `load_best_model_at_end`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters