Add new SentenceTransformer model
Browse files- README.md +73 -74
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -12,51 +12,54 @@ tags:
|
|
| 12 |
- retrieval
|
| 13 |
- reranking
|
| 14 |
- generated_from_trainer
|
| 15 |
-
- dataset_size:
|
| 16 |
-
- loss:
|
| 17 |
base_model: Alibaba-NLP/gte-modernbert-base
|
| 18 |
widget:
|
| 19 |
-
- source_sentence:
|
| 20 |
-
All My Children `` , between 1990 and 2002 .
|
| 21 |
sentences:
|
| 22 |
-
-
|
| 23 |
-
|
| 24 |
-
-
|
| 25 |
-
|
| 26 |
-
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
mollusk in the family Olivellidae , the marine olives .
|
| 30 |
sentences:
|
| 31 |
-
-
|
| 32 |
-
|
| 33 |
-
-
|
| 34 |
-
|
| 35 |
-
-
|
| 36 |
-
|
| 37 |
-
- source_sentence:
|
| 38 |
-
|
| 39 |
sentences:
|
| 40 |
-
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
sentences:
|
| 46 |
-
-
|
| 47 |
-
|
| 48 |
-
-
|
| 49 |
-
|
| 50 |
-
-
|
| 51 |
-
|
| 52 |
-
- source_sentence:
|
| 53 |
-
|
| 54 |
sentences:
|
| 55 |
-
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
| 60 |
datasets:
|
| 61 |
- redis/langcache-sentencepairs-v2
|
| 62 |
pipeline_tag: sentence-similarity
|
|
@@ -156,9 +159,9 @@ from sentence_transformers import SentenceTransformer
|
|
| 156 |
model = SentenceTransformer("redis/langcache-embed-experimental")
|
| 157 |
# Run inference
|
| 158 |
sentences = [
|
| 159 |
-
'
|
| 160 |
-
'
|
| 161 |
-
'
|
| 162 |
]
|
| 163 |
embeddings = model.encode(sentences)
|
| 164 |
print(embeddings.shape)
|
|
@@ -167,9 +170,9 @@ print(embeddings.shape)
|
|
| 167 |
# Get the similarity scores for the embeddings
|
| 168 |
similarities = model.similarity(embeddings, embeddings)
|
| 169 |
print(similarities)
|
| 170 |
-
# tensor([[1.0000, 0.
|
| 171 |
-
# [0.
|
| 172 |
-
# [0.
|
| 173 |
```
|
| 174 |
|
| 175 |
<!--
|
|
@@ -235,25 +238,23 @@ You can finetune this model on your own dataset.
|
|
| 235 |
#### LangCache Sentence Pairs (all)
|
| 236 |
|
| 237 |
* Dataset: [LangCache Sentence Pairs (all)](https://huggingface.co/datasets/redis/langcache-sentencepairs-v2)
|
| 238 |
-
* Size:
|
| 239 |
-
* Columns: <code>
|
| 240 |
* Approximate statistics based on the first 1000 samples:
|
| 241 |
-
| |
|
| 242 |
-
|
| 243 |
-
| type | string | string |
|
| 244 |
-
| details | <ul><li>min: 8 tokens</li><li>mean: 27.
|
| 245 |
* Samples:
|
| 246 |
-
|
|
| 247 |
-
|
| 248 |
-
| <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>
|
| 249 |
-
| <code>
|
| 250 |
-
| <code>
|
| 251 |
-
* Loss: <code>
|
| 252 |
```json
|
| 253 |
{
|
| 254 |
-
"
|
| 255 |
-
"similarity_fct": "cos_sim",
|
| 256 |
-
"gather_across_devices": false
|
| 257 |
}
|
| 258 |
```
|
| 259 |
|
|
@@ -262,25 +263,23 @@ You can finetune this model on your own dataset.
|
|
| 262 |
#### LangCache Sentence Pairs (all)
|
| 263 |
|
| 264 |
* Dataset: [LangCache Sentence Pairs (all)](https://huggingface.co/datasets/redis/langcache-sentencepairs-v2)
|
| 265 |
-
* Size:
|
| 266 |
-
* Columns: <code>
|
| 267 |
* Approximate statistics based on the first 1000 samples:
|
| 268 |
-
| |
|
| 269 |
-
|
| 270 |
-
| type | string | string |
|
| 271 |
-
| details | <ul><li>min: 8 tokens</li><li>mean: 27.
|
| 272 |
* Samples:
|
| 273 |
-
|
|
| 274 |
-
|
| 275 |
-
| <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>
|
| 276 |
-
| <code>
|
| 277 |
-
| <code>
|
| 278 |
-
* Loss: <code>
|
| 279 |
```json
|
| 280 |
{
|
| 281 |
-
"
|
| 282 |
-
"similarity_fct": "cos_sim",
|
| 283 |
-
"gather_across_devices": false
|
| 284 |
}
|
| 285 |
```
|
| 286 |
|
|
|
|
| 12 |
- retrieval
|
| 13 |
- reranking
|
| 14 |
- generated_from_trainer
|
| 15 |
+
- dataset_size:8193277
|
| 16 |
+
- loss:CosineSimilarityLoss
|
| 17 |
base_model: Alibaba-NLP/gte-modernbert-base
|
| 18 |
widget:
|
| 19 |
+
- source_sentence: They are sometimes called Marg or also Path in Hindi .
|
|
|
|
| 20 |
sentences:
|
| 21 |
+
- Largs was born in Brisbane House in Noddsdale , near Brisbane in Ayrshire , Scotland
|
| 22 |
+
, the son of Sir Thomas Brisbane and Dame Eleanora Brisbane .
|
| 23 |
+
- Its smallest radius is 1.4 ( 131 thousand light years ) and largest 0.7 angle
|
| 24 |
+
minutes ( 65 thousand light years ) .
|
| 25 |
+
- They are also called Marg or sometimes the path in the Hindi .
|
| 26 |
+
- source_sentence: The main mode of play in `` Crash Bash `` is the Adventure Mode
|
| 27 |
+
, in which one or two players must win all 28 levels to complete .
|
|
|
|
| 28 |
sentences:
|
| 29 |
+
- Parkton is a city in Robeson County , North Carolina , in the Lumberton Metro
|
| 30 |
+
area , in the United States .
|
| 31 |
+
- The CANTAB tests were developed by Professor Barbara Sahakian and Professor Trevor
|
| 32 |
+
Robbins .
|
| 33 |
+
- The main mode in `` Crash Bash `` is the adventure mode in which one or two players
|
| 34 |
+
must complete all 28 levels to win .
|
| 35 |
+
- source_sentence: It was formed in December 2014 from elements of the disbanded 51st
|
| 36 |
+
Mechanized Brigade and newly mobilized units .
|
| 37 |
sentences:
|
| 38 |
+
- It had branches in feature films , television , physical and digital publishing
|
| 39 |
+
, merchandise , recorded music , digital and online media applications and mobile
|
| 40 |
+
and social games .
|
| 41 |
+
- Notts County and Arsenal were relegated to the Second Division ; Preston North
|
| 42 |
+
End and Burnley were promoted to the First Division .
|
| 43 |
+
- It was formed in December 2014 from elements of the dissolved 51st Mechanized
|
| 44 |
+
Brigade and newly mobilized units .
|
| 45 |
+
- source_sentence: The band pursued `` signals `` in January 2012 in three weeks ,
|
| 46 |
+
and drums were recorded in a day and a half .
|
| 47 |
sentences:
|
| 48 |
+
- Kearsarge Lakes , Kearsarge Pass Trail , and Rae Lakes all have a maximum 2 nights
|
| 49 |
+
stay , and Bullfrog Lake along the Charlotte Lake is closed to camping .
|
| 50 |
+
- The band tracked `` Signals `` in three weeks in January 2012 . Drums were recorded
|
| 51 |
+
in a day and a half .
|
| 52 |
+
- From 1954 to 1961 , he was married to Stella Caralis and from 1978 until his death
|
| 53 |
+
with Nina Bohlen .
|
| 54 |
+
- source_sentence: A special case is of the Country B loyalist who controls agents
|
| 55 |
+
or provides managerial supporting or other functions against Country A .
|
| 56 |
sentences:
|
| 57 |
+
- A special case is the loyalist of Country B , who controls agents or provides
|
| 58 |
+
management support or other functions against Country A .
|
| 59 |
+
- Music Story is a music service website and international music data provider that
|
| 60 |
+
curates , aggregates and analyses metadata for digital music services .
|
| 61 |
+
- These six cars were painted in the same lacquering as the buffet cars , silver
|
| 62 |
+
with red lines and text .
|
| 63 |
datasets:
|
| 64 |
- redis/langcache-sentencepairs-v2
|
| 65 |
pipeline_tag: sentence-similarity
|
|
|
|
| 159 |
model = SentenceTransformer("redis/langcache-embed-experimental")
|
| 160 |
# Run inference
|
| 161 |
sentences = [
|
| 162 |
+
'A special case is of the Country B loyalist who controls agents or provides managerial supporting or other functions against Country A .',
|
| 163 |
+
'A special case is the loyalist of Country B , who controls agents or provides management support or other functions against Country A .',
|
| 164 |
+
'Music Story is a music service website and international music data provider that curates , aggregates and analyses metadata for digital music services .',
|
| 165 |
]
|
| 166 |
embeddings = model.encode(sentences)
|
| 167 |
print(embeddings.shape)
|
|
|
|
| 170 |
# Get the similarity scores for the embeddings
|
| 171 |
similarities = model.similarity(embeddings, embeddings)
|
| 172 |
print(similarities)
|
| 173 |
+
# tensor([[1.0000, 0.9844, 0.5195],
|
| 174 |
+
# [0.9844, 0.9922, 0.5078],
|
| 175 |
+
# [0.5195, 0.5078, 0.9922]], dtype=torch.bfloat16)
|
| 176 |
```
|
| 177 |
|
| 178 |
<!--
|
|
|
|
| 238 |
#### LangCache Sentence Pairs (all)
|
| 239 |
|
| 240 |
* Dataset: [LangCache Sentence Pairs (all)](https://huggingface.co/datasets/redis/langcache-sentencepairs-v2)
|
| 241 |
+
* Size: 72,021 training samples
|
| 242 |
+
* Columns: <code>sentence_a</code>, <code>sentence_b</code>, and <code>label</code>
|
| 243 |
* Approximate statistics based on the first 1000 samples:
|
| 244 |
+
| | sentence_a | sentence_b | label |
|
| 245 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
|
| 246 |
+
| type | string | string | int |
|
| 247 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 27.46 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 27.36 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>0: ~50.30%</li><li>1: ~49.70%</li></ul> |
|
| 248 |
* Samples:
|
| 249 |
+
| sentence_a | sentence_b | label |
|
| 250 |
+
|:--------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
|
| 251 |
+
| <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> |
|
| 252 |
+
| <code>Turner Valley , was at the Turner Valley Bar N Ranch Airport , southwest of the Turner Valley Bar N Ranch , Alberta , Canada .</code> | <code>Turner Valley Bar N Ranch Airport , , was located at Turner Valley Bar N Ranch , southwest of Turner Valley , Alberta , Canada .</code> | <code>0</code> |
|
| 253 |
+
| <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> |
|
| 254 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
| 255 |
```json
|
| 256 |
{
|
| 257 |
+
"loss_fct": "torch.nn.modules.loss.BCELoss"
|
|
|
|
|
|
|
| 258 |
}
|
| 259 |
```
|
| 260 |
|
|
|
|
| 263 |
#### LangCache Sentence Pairs (all)
|
| 264 |
|
| 265 |
* Dataset: [LangCache Sentence Pairs (all)](https://huggingface.co/datasets/redis/langcache-sentencepairs-v2)
|
| 266 |
+
* Size: 72,021 evaluation samples
|
| 267 |
+
* Columns: <code>sentence_a</code>, <code>sentence_b</code>, and <code>label</code>
|
| 268 |
* Approximate statistics based on the first 1000 samples:
|
| 269 |
+
| | sentence_a | sentence_b | label |
|
| 270 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
|
| 271 |
+
| type | string | string | int |
|
| 272 |
+
| details | <ul><li>min: 8 tokens</li><li>mean: 27.46 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 27.36 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>0: ~50.30%</li><li>1: ~49.70%</li></ul> |
|
| 273 |
* Samples:
|
| 274 |
+
| sentence_a | sentence_b | label |
|
| 275 |
+
|:--------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
|
| 276 |
+
| <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> |
|
| 277 |
+
| <code>Turner Valley , was at the Turner Valley Bar N Ranch Airport , southwest of the Turner Valley Bar N Ranch , Alberta , Canada .</code> | <code>Turner Valley Bar N Ranch Airport , , was located at Turner Valley Bar N Ranch , southwest of Turner Valley , Alberta , Canada .</code> | <code>0</code> |
|
| 278 |
+
| <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> |
|
| 279 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
| 280 |
```json
|
| 281 |
{
|
| 282 |
+
"loss_fct": "torch.nn.modules.loss.BCELoss"
|
|
|
|
|
|
|
| 283 |
}
|
| 284 |
```
|
| 285 |
|
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
|