Feature Extraction
sentence-transformers
Safetensors
Transformers
English
new
fill-mask
learned sparse
opensearch
retrieval
passage-retrieval
document-expansion
bag-of-words
sparse-encoder
sparse
asymmetric
inference-free
custom_code
text-embeddings-inference
Instructions to use opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte 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-v3-gte with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte", trust_remote_code=True) 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-v3-gte 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-v3-gte", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
zhichao-aws commited on
Commit ·
7b838cb
1
Parent(s): da2f64e
update max length
Browse files
query_0_SparseStaticEmbedding/tokenizer.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 8192,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
query_0_SparseStaticEmbedding/tokenizer_config.json
CHANGED
|
@@ -46,8 +46,8 @@
|
|
| 46 |
"do_lower_case": true,
|
| 47 |
"extra_special_tokens": {},
|
| 48 |
"mask_token": "[MASK]",
|
| 49 |
-
"max_length":
|
| 50 |
-
"model_max_length":
|
| 51 |
"pad_to_multiple_of": null,
|
| 52 |
"pad_token": "[PAD]",
|
| 53 |
"pad_token_type_id": 0,
|
|
|
|
| 46 |
"do_lower_case": true,
|
| 47 |
"extra_special_tokens": {},
|
| 48 |
"mask_token": "[MASK]",
|
| 49 |
+
"max_length": 8192,
|
| 50 |
+
"model_max_length": 8192,
|
| 51 |
"pad_to_multiple_of": null,
|
| 52 |
"pad_token": "[PAD]",
|
| 53 |
"pad_token_type_id": 0,
|
sentence_bert_config.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"max_seq_length":
|
| 3 |
"do_lower_case": false
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"max_seq_length": 8192,
|
| 3 |
"do_lower_case": false
|
| 4 |
}
|
tokenizer.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 8192,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|