infgrad commited on
Commit
6d24526
1 Parent(s): 129dc50

Fix query_prompt_name variable name (#15)

Browse files

- Fix query_prompt_name variable name (0bfdc3c2571aa91bf8ab3224b4a54f3b37f856a5)
- Update model author to dunzhang (530e1f3bd2efb84e62fddeeb94ff2f9f03eb7f8f)

Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -5480,7 +5480,7 @@ from sentence_transformers import SentenceTransformer
5480
 
5481
  # This model supports two prompts: "s2p_query" and "s2s_query" for sentence-to-passage and sentence-to-sentence tasks, respectively.
5482
  # They are defined in `config_sentence_transformers.json`
5483
- prompt_name = "s2p_query"
5484
  queries = [
5485
  "What are some ways to reduce stress?",
5486
  "What are the benefits of drinking green tea?",
@@ -5492,7 +5492,7 @@ docs = [
5492
  ]
5493
 
5494
  # !The default dimension is 1024, if you need other dimensions, please clone the model and modify `modules.json` to replace `2_Dense_1024` with another dimension, e.g. `2_Dense_256` or `2_Dense_8192` !
5495
- model = SentenceTransformer("infgrad/stella_en_1.5B_v5", trust_remote_code=True).cuda()
5496
  query_embeddings = model.encode(queries, prompt_name=query_prompt_name)
5497
  doc_embeddings = model.encode(docs)
5498
  print(query_embeddings.shape, doc_embeddings.shape)
 
5480
 
5481
  # This model supports two prompts: "s2p_query" and "s2s_query" for sentence-to-passage and sentence-to-sentence tasks, respectively.
5482
  # They are defined in `config_sentence_transformers.json`
5483
+ query_prompt_name = "s2p_query"
5484
  queries = [
5485
  "What are some ways to reduce stress?",
5486
  "What are the benefits of drinking green tea?",
 
5492
  ]
5493
 
5494
  # !The default dimension is 1024, if you need other dimensions, please clone the model and modify `modules.json` to replace `2_Dense_1024` with another dimension, e.g. `2_Dense_256` or `2_Dense_8192` !
5495
+ model = SentenceTransformer("dunzhang/stella_en_1.5B_v5", trust_remote_code=True).cuda()
5496
  query_embeddings = model.encode(queries, prompt_name=query_prompt_name)
5497
  doc_embeddings = model.encode(docs)
5498
  print(query_embeddings.shape, doc_embeddings.shape)