Add new SentenceTransformer model
Browse files- README.md +40 -26
- model.safetensors +1 -1
- tokenizer_config.json +1 -7
README.md
CHANGED
|
@@ -13,8 +13,8 @@ tags:
|
|
| 13 |
- reranking
|
| 14 |
- generated_from_trainer
|
| 15 |
- dataset_size:483820
|
| 16 |
-
- loss:
|
| 17 |
-
base_model:
|
| 18 |
widget:
|
| 19 |
- source_sentence: 'See Precambrian time scale # Proposed Geologic timeline for another
|
| 20 |
set of periods 4600 -- 541 MYA .'
|
|
@@ -87,40 +87,40 @@ model-index:
|
|
| 87 |
type: test
|
| 88 |
metrics:
|
| 89 |
- type: cosine_accuracy
|
| 90 |
-
value: 0.
|
| 91 |
name: Cosine Accuracy
|
| 92 |
- type: cosine_accuracy_threshold
|
| 93 |
-
value: 0.
|
| 94 |
name: Cosine Accuracy Threshold
|
| 95 |
- type: cosine_f1
|
| 96 |
-
value: 0.
|
| 97 |
name: Cosine F1
|
| 98 |
- type: cosine_f1_threshold
|
| 99 |
-
value: 0.
|
| 100 |
name: Cosine F1 Threshold
|
| 101 |
- type: cosine_precision
|
| 102 |
-
value: 0.
|
| 103 |
name: Cosine Precision
|
| 104 |
- type: cosine_recall
|
| 105 |
-
value: 0.
|
| 106 |
name: Cosine Recall
|
| 107 |
- type: cosine_ap
|
| 108 |
-
value: 0.
|
| 109 |
name: Cosine Ap
|
| 110 |
- type: cosine_mcc
|
| 111 |
-
value: 0.
|
| 112 |
name: Cosine Mcc
|
| 113 |
---
|
| 114 |
|
| 115 |
# Redis fine-tuned BiEncoder model for semantic caching on LangCache
|
| 116 |
|
| 117 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [
|
| 118 |
|
| 119 |
## Model Details
|
| 120 |
|
| 121 |
### Model Description
|
| 122 |
- **Model Type:** Sentence Transformer
|
| 123 |
-
- **Base model:** [
|
| 124 |
- **Maximum Sequence Length:** 100 tokens
|
| 125 |
- **Output Dimensionality:** 768 dimensions
|
| 126 |
- **Similarity Function:** Cosine Similarity
|
|
@@ -173,9 +173,9 @@ print(embeddings.shape)
|
|
| 173 |
# Get the similarity scores for the embeddings
|
| 174 |
similarities = model.similarity(embeddings, embeddings)
|
| 175 |
print(similarities)
|
| 176 |
-
# tensor([[
|
| 177 |
-
# [0.
|
| 178 |
-
# [0.
|
| 179 |
```
|
| 180 |
|
| 181 |
<!--
|
|
@@ -213,14 +213,14 @@ You can finetune this model on your own dataset.
|
|
| 213 |
|
| 214 |
| Metric | Value |
|
| 215 |
|:--------------------------|:-----------|
|
| 216 |
-
| cosine_accuracy | 0.
|
| 217 |
-
| cosine_accuracy_threshold | 0.
|
| 218 |
-
| cosine_f1 | 0.
|
| 219 |
-
| cosine_f1_threshold | 0.
|
| 220 |
-
| cosine_precision | 0.
|
| 221 |
-
| cosine_recall | 0.
|
| 222 |
-
| **cosine_ap** | **0.
|
| 223 |
-
| cosine_mcc | 0.
|
| 224 |
|
| 225 |
<!--
|
| 226 |
## Bias, Risks and Limitations
|
|
@@ -254,7 +254,14 @@ You can finetune this model on your own dataset.
|
|
| 254 |
| <code>The newer Punts are still very much in existence today and race in the same fleets as the older boats .</code> | <code>The newer punts are still very much in existence today and run in the same fleets as the older boats .</code> | <code>1</code> |
|
| 255 |
| <code>After losing his second election , he resigned as opposition leader and was replaced by Geoff Pearsall .</code> | <code>Max Bingham resigned as opposition leader after losing his second election , and was replaced by Geoff Pearsall .</code> | <code>1</code> |
|
| 256 |
| <code>The 12F was officially homologated on August 21 , 1929 and exhibited at the Paris Salon in 1930 .</code> | <code>The 12F was officially homologated on 21 August 1929 and displayed at the 1930 Paris Salon .</code> | <code>1</code> |
|
| 257 |
-
* Loss: [<code>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
|
| 259 |
### Evaluation Dataset
|
| 260 |
|
|
@@ -274,12 +281,19 @@ You can finetune this model on your own dataset.
|
|
| 274 |
| <code>The newer Punts are still very much in existence today and race in the same fleets as the older boats .</code> | <code>The newer punts are still very much in existence today and run in the same fleets as the older boats .</code> | <code>1</code> |
|
| 275 |
| <code>After losing his second election , he resigned as opposition leader and was replaced by Geoff Pearsall .</code> | <code>Max Bingham resigned as opposition leader after losing his second election , and was replaced by Geoff Pearsall .</code> | <code>1</code> |
|
| 276 |
| <code>The 12F was officially homologated on August 21 , 1929 and exhibited at the Paris Salon in 1930 .</code> | <code>The 12F was officially homologated on 21 August 1929 and displayed at the 1930 Paris Salon .</code> | <code>1</code> |
|
| 277 |
-
* Loss: [<code>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
### Training Logs
|
| 280 |
| Epoch | Step | test_cosine_ap |
|
| 281 |
|:-----:|:----:|:--------------:|
|
| 282 |
-
| -1 | -1 | 0.
|
| 283 |
|
| 284 |
|
| 285 |
### Framework Versions
|
|
|
|
| 13 |
- reranking
|
| 14 |
- generated_from_trainer
|
| 15 |
- dataset_size:483820
|
| 16 |
+
- loss:MultipleNegativesSymmetricRankingLoss
|
| 17 |
+
base_model: Alibaba-NLP/gte-modernbert-base
|
| 18 |
widget:
|
| 19 |
- source_sentence: 'See Precambrian time scale # Proposed Geologic timeline for another
|
| 20 |
set of periods 4600 -- 541 MYA .'
|
|
|
|
| 87 |
type: test
|
| 88 |
metrics:
|
| 89 |
- type: cosine_accuracy
|
| 90 |
+
value: 0.7036165169861821
|
| 91 |
name: Cosine Accuracy
|
| 92 |
- type: cosine_accuracy_threshold
|
| 93 |
+
value: 0.8524742126464844
|
| 94 |
name: Cosine Accuracy Threshold
|
| 95 |
- type: cosine_f1
|
| 96 |
+
value: 0.7123780174627633
|
| 97 |
name: Cosine F1
|
| 98 |
- type: cosine_f1_threshold
|
| 99 |
+
value: 0.8120777606964111
|
| 100 |
name: Cosine F1 Threshold
|
| 101 |
- type: cosine_precision
|
| 102 |
+
value: 0.5992426552810817
|
| 103 |
name: Cosine Precision
|
| 104 |
- type: cosine_recall
|
| 105 |
+
value: 0.8781750465549348
|
| 106 |
name: Cosine Recall
|
| 107 |
- type: cosine_ap
|
| 108 |
+
value: 0.6475972261979004
|
| 109 |
name: Cosine Ap
|
| 110 |
- type: cosine_mcc
|
| 111 |
+
value: 0.44221965028695587
|
| 112 |
name: Cosine Mcc
|
| 113 |
---
|
| 114 |
|
| 115 |
# Redis fine-tuned BiEncoder model for semantic caching on LangCache
|
| 116 |
|
| 117 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) on the [LangCache Sentence Pairs (all)](https://huggingface.co/datasets/redis/langcache-sentencepairs-v1) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for sentence pair similarity.
|
| 118 |
|
| 119 |
## Model Details
|
| 120 |
|
| 121 |
### Model Description
|
| 122 |
- **Model Type:** Sentence Transformer
|
| 123 |
+
- **Base model:** [Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) <!-- at revision e7f32e3c00f91d699e8c43b53106206bcc72bb22 -->
|
| 124 |
- **Maximum Sequence Length:** 100 tokens
|
| 125 |
- **Output Dimensionality:** 768 dimensions
|
| 126 |
- **Similarity Function:** Cosine Similarity
|
|
|
|
| 173 |
# Get the similarity scores for the embeddings
|
| 174 |
similarities = model.similarity(embeddings, embeddings)
|
| 175 |
print(similarities)
|
| 176 |
+
# tensor([[0.9922, 0.9922, 0.5352],
|
| 177 |
+
# [0.9922, 0.9961, 0.5391],
|
| 178 |
+
# [0.5352, 0.5391, 1.0000]], dtype=torch.bfloat16)
|
| 179 |
```
|
| 180 |
|
| 181 |
<!--
|
|
|
|
| 213 |
|
| 214 |
| Metric | Value |
|
| 215 |
|:--------------------------|:-----------|
|
| 216 |
+
| cosine_accuracy | 0.7036 |
|
| 217 |
+
| cosine_accuracy_threshold | 0.8525 |
|
| 218 |
+
| cosine_f1 | 0.7124 |
|
| 219 |
+
| cosine_f1_threshold | 0.8121 |
|
| 220 |
+
| cosine_precision | 0.5992 |
|
| 221 |
+
| cosine_recall | 0.8782 |
|
| 222 |
+
| **cosine_ap** | **0.6476** |
|
| 223 |
+
| cosine_mcc | 0.4422 |
|
| 224 |
|
| 225 |
<!--
|
| 226 |
## Bias, Risks and Limitations
|
|
|
|
| 254 |
| <code>The newer Punts are still very much in existence today and race in the same fleets as the older boats .</code> | <code>The newer punts are still very much in existence today and run in the same fleets as the older boats .</code> | <code>1</code> |
|
| 255 |
| <code>After losing his second election , he resigned as opposition leader and was replaced by Geoff Pearsall .</code> | <code>Max Bingham resigned as opposition leader after losing his second election , and was replaced by Geoff Pearsall .</code> | <code>1</code> |
|
| 256 |
| <code>The 12F was officially homologated on August 21 , 1929 and exhibited at the Paris Salon in 1930 .</code> | <code>The 12F was officially homologated on 21 August 1929 and displayed at the 1930 Paris Salon .</code> | <code>1</code> |
|
| 257 |
+
* Loss: [<code>MultipleNegativesSymmetricRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
|
| 258 |
+
```json
|
| 259 |
+
{
|
| 260 |
+
"scale": 20.0,
|
| 261 |
+
"similarity_fct": "cos_sim",
|
| 262 |
+
"gather_across_devices": false
|
| 263 |
+
}
|
| 264 |
+
```
|
| 265 |
|
| 266 |
### Evaluation Dataset
|
| 267 |
|
|
|
|
| 281 |
| <code>The newer Punts are still very much in existence today and race in the same fleets as the older boats .</code> | <code>The newer punts are still very much in existence today and run in the same fleets as the older boats .</code> | <code>1</code> |
|
| 282 |
| <code>After losing his second election , he resigned as opposition leader and was replaced by Geoff Pearsall .</code> | <code>Max Bingham resigned as opposition leader after losing his second election , and was replaced by Geoff Pearsall .</code> | <code>1</code> |
|
| 283 |
| <code>The 12F was officially homologated on August 21 , 1929 and exhibited at the Paris Salon in 1930 .</code> | <code>The 12F was officially homologated on 21 August 1929 and displayed at the 1930 Paris Salon .</code> | <code>1</code> |
|
| 284 |
+
* Loss: [<code>MultipleNegativesSymmetricRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
|
| 285 |
+
```json
|
| 286 |
+
{
|
| 287 |
+
"scale": 20.0,
|
| 288 |
+
"similarity_fct": "cos_sim",
|
| 289 |
+
"gather_across_devices": false
|
| 290 |
+
}
|
| 291 |
+
```
|
| 292 |
|
| 293 |
### Training Logs
|
| 294 |
| Epoch | Step | test_cosine_ap |
|
| 295 |
|:-----:|:----:|:--------------:|
|
| 296 |
+
| -1 | -1 | 0.6476 |
|
| 297 |
|
| 298 |
|
| 299 |
### Framework Versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 298041696
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95d02211c4cca89113f9f3e93ed91f5176bf50170faa2cb835f7bfea15bb9dd2
|
| 3 |
size 298041696
|
tokenizer_config.json
CHANGED
|
@@ -938,15 +938,9 @@
|
|
| 938 |
"input_ids",
|
| 939 |
"attention_mask"
|
| 940 |
],
|
| 941 |
-
"model_max_length":
|
| 942 |
-
"pad_to_multiple_of": null,
|
| 943 |
"pad_token": "[PAD]",
|
| 944 |
-
"pad_token_type_id": 0,
|
| 945 |
-
"padding_side": "right",
|
| 946 |
"sep_token": "[SEP]",
|
| 947 |
-
"stride": 0,
|
| 948 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 949 |
-
"truncation_side": "right",
|
| 950 |
-
"truncation_strategy": "longest_first",
|
| 951 |
"unk_token": "[UNK]"
|
| 952 |
}
|
|
|
|
| 938 |
"input_ids",
|
| 939 |
"attention_mask"
|
| 940 |
],
|
| 941 |
+
"model_max_length": 1000000000000000019884624838656,
|
|
|
|
| 942 |
"pad_token": "[PAD]",
|
|
|
|
|
|
|
| 943 |
"sep_token": "[SEP]",
|
|
|
|
| 944 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
|
|
|
|
|
|
| 945 |
"unk_token": "[UNK]"
|
| 946 |
}
|