Feature Extraction
sentence-transformers
Safetensors
English
sparse-encoder
sparse
asymmetric
inference-free
splade
Generated from Trainer
dataset_size:99000
loss:SpladeLoss
loss:SparseMultipleNegativesRankingLoss
loss:FlopsLoss
Eval Results (legacy)
Instructions to use sparse-encoder/example-inference-free-splade-distilbert-base-uncased-nq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sparse-encoder/example-inference-free-splade-distilbert-base-uncased-nq with sentence-transformers:
from sentence_transformers import SparseEncoder model = SparseEncoder("sparse-encoder/example-inference-free-splade-distilbert-base-uncased-nq") queries = ["Which planet is known as the Red Planet?"] documents = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", ] query_embeddings = model.encode_query(queries) document_embeddings = model.encode_document(documents) similarities = model.similarity(query_embeddings, document_embeddings) print(similarities) - Notebooks
- Google Colab
- Kaggle
Tom Aarsen commited on
Commit ·
56ccabc
1
Parent(s): 4a6a63b
IDF -> SparseStaticEmbedding
Browse files- .vscode/settings.json +3 -0
- {query_0_IDF → query_0_SparseStaticEmbedding}/config.json +2 -2
- {query_0_IDF → query_0_SparseStaticEmbedding}/model.safetensors +0 -0
- {query_0_IDF → query_0_SparseStaticEmbedding}/special_tokens_map.json +7 -7
- {query_0_IDF → query_0_SparseStaticEmbedding}/tokenizer.json +0 -0
- {query_0_IDF → query_0_SparseStaticEmbedding}/tokenizer_config.json +56 -56
- {query_0_IDF → query_0_SparseStaticEmbedding}/vocab.txt +0 -0
- router_config.json +2 -2
.vscode/settings.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"iis.configDir": ""
|
| 3 |
+
}
|
{query_0_IDF → query_0_SparseStaticEmbedding}/config.json
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
{
|
| 2 |
-
"frozen": false
|
| 3 |
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"frozen": false
|
| 3 |
}
|
{query_0_IDF → query_0_SparseStaticEmbedding}/model.safetensors
RENAMED
|
File without changes
|
{query_0_IDF → query_0_SparseStaticEmbedding}/special_tokens_map.json
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
{
|
| 2 |
-
"cls_token": "[CLS]",
|
| 3 |
-
"mask_token": "[MASK]",
|
| 4 |
-
"pad_token": "[PAD]",
|
| 5 |
-
"sep_token": "[SEP]",
|
| 6 |
-
"unk_token": "[UNK]"
|
| 7 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
{query_0_IDF → query_0_SparseStaticEmbedding}/tokenizer.json
RENAMED
|
File without changes
|
{query_0_IDF → query_0_SparseStaticEmbedding}/tokenizer_config.json
RENAMED
|
@@ -1,56 +1,56 @@
|
|
| 1 |
-
{
|
| 2 |
-
"added_tokens_decoder": {
|
| 3 |
-
"0": {
|
| 4 |
-
"content": "[PAD]",
|
| 5 |
-
"lstrip": false,
|
| 6 |
-
"normalized": false,
|
| 7 |
-
"rstrip": false,
|
| 8 |
-
"single_word": false,
|
| 9 |
-
"special": true
|
| 10 |
-
},
|
| 11 |
-
"100": {
|
| 12 |
-
"content": "[UNK]",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false,
|
| 17 |
-
"special": true
|
| 18 |
-
},
|
| 19 |
-
"101": {
|
| 20 |
-
"content": "[CLS]",
|
| 21 |
-
"lstrip": false,
|
| 22 |
-
"normalized": false,
|
| 23 |
-
"rstrip": false,
|
| 24 |
-
"single_word": false,
|
| 25 |
-
"special": true
|
| 26 |
-
},
|
| 27 |
-
"102": {
|
| 28 |
-
"content": "[SEP]",
|
| 29 |
-
"lstrip": false,
|
| 30 |
-
"normalized": false,
|
| 31 |
-
"rstrip": false,
|
| 32 |
-
"single_word": false,
|
| 33 |
-
"special": true
|
| 34 |
-
},
|
| 35 |
-
"103": {
|
| 36 |
-
"content": "[MASK]",
|
| 37 |
-
"lstrip": false,
|
| 38 |
-
"normalized": false,
|
| 39 |
-
"rstrip": false,
|
| 40 |
-
"single_word": false,
|
| 41 |
-
"special": true
|
| 42 |
-
}
|
| 43 |
-
},
|
| 44 |
-
"clean_up_tokenization_spaces": false,
|
| 45 |
-
"cls_token": "[CLS]",
|
| 46 |
-
"do_lower_case": true,
|
| 47 |
-
"extra_special_tokens": {},
|
| 48 |
-
"mask_token": "[MASK]",
|
| 49 |
-
"model_max_length": 512,
|
| 50 |
-
"pad_token": "[PAD]",
|
| 51 |
-
"sep_token": "[SEP]",
|
| 52 |
-
"strip_accents": null,
|
| 53 |
-
"tokenize_chinese_chars": true,
|
| 54 |
-
"tokenizer_class": "DistilBertTokenizer",
|
| 55 |
-
"unk_token": "[UNK]"
|
| 56 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_lower_case": true,
|
| 47 |
+
"extra_special_tokens": {},
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "[PAD]",
|
| 51 |
+
"sep_token": "[SEP]",
|
| 52 |
+
"strip_accents": null,
|
| 53 |
+
"tokenize_chinese_chars": true,
|
| 54 |
+
"tokenizer_class": "DistilBertTokenizer",
|
| 55 |
+
"unk_token": "[UNK]"
|
| 56 |
+
}
|
{query_0_IDF → query_0_SparseStaticEmbedding}/vocab.txt
RENAMED
|
File without changes
|
router_config.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
{
|
| 2 |
"types": {
|
| 3 |
-
"
|
| 4 |
"document_0_MLMTransformer": "sentence_transformers.sparse_encoder.models.MLMTransformer.MLMTransformer",
|
| 5 |
"document_1_SpladePooling": "sentence_transformers.sparse_encoder.models.SpladePooling.SpladePooling"
|
| 6 |
},
|
| 7 |
"structure": {
|
| 8 |
"query": [
|
| 9 |
-
"
|
| 10 |
],
|
| 11 |
"document": [
|
| 12 |
"document_0_MLMTransformer",
|
|
|
|
| 1 |
{
|
| 2 |
"types": {
|
| 3 |
+
"query_0_SparseStaticEmbedding": "sentence_transformers.sparse_encoder.models.SparseStaticEmbedding.SparseStaticEmbedding",
|
| 4 |
"document_0_MLMTransformer": "sentence_transformers.sparse_encoder.models.MLMTransformer.MLMTransformer",
|
| 5 |
"document_1_SpladePooling": "sentence_transformers.sparse_encoder.models.SpladePooling.SpladePooling"
|
| 6 |
},
|
| 7 |
"structure": {
|
| 8 |
"query": [
|
| 9 |
+
"query_0_SparseStaticEmbedding"
|
| 10 |
],
|
| 11 |
"document": [
|
| 12 |
"document_0_MLMTransformer",
|