Feature Extraction
sentence-transformers
PyTorch
Safetensors
Transformers
English
distilbert
fill-mask
learned sparse
opensearch
retrieval
passage-retrieval
document-expansion
bag-of-words
sparse-encoder
sparse
asymmetric
inference-free
splade
text-embeddings-inference
Instructions to use opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill") model = AutoModelForMaskedLM.from_pretrained("opensearch-project/opensearch-neural-sparse-encoding-doc-v2-distill", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit Β·
f8aba87
1
Parent(s): 15b428a
Adapt to the new naming of IDF
Browse files- {query_0_IDF β query_0_SparseStaticEmbedding}/config.json +0 -0
- {query_0_IDF β query_0_SparseStaticEmbedding}/model.safetensors +0 -0
- {query_0_IDF β query_0_SparseStaticEmbedding}/special_tokens_map.json +0 -0
- {query_0_IDF β query_0_SparseStaticEmbedding}/tokenizer.json +0 -0
- {query_0_IDF β query_0_SparseStaticEmbedding}/tokenizer_config.json +0 -0
- {query_0_IDF β query_0_SparseStaticEmbedding}/vocab.txt +0 -0
- router_config.json +2 -2
- sentence_bert_config.json +4 -0
{query_0_IDF β query_0_SparseStaticEmbedding}/config.json
RENAMED
|
File without changes
|
{query_0_IDF β query_0_SparseStaticEmbedding}/model.safetensors
RENAMED
|
File without changes
|
{query_0_IDF β query_0_SparseStaticEmbedding}/special_tokens_map.json
RENAMED
|
File without changes
|
{query_0_IDF β query_0_SparseStaticEmbedding}/tokenizer.json
RENAMED
|
File without changes
|
{query_0_IDF β query_0_SparseStaticEmbedding}/tokenizer_config.json
RENAMED
|
File without changes
|
{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 |
"": "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 |
"",
|
|
|
|
| 1 |
{
|
| 2 |
"types": {
|
| 3 |
+
"query_0_SparseStaticEmbedding": "sentence_transformers.sparse_encoder.models.SparseStaticEmbedding.SparseStaticEmbedding",
|
| 4 |
"": "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 |
"",
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 512,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|