dariakryvosheieva commited on
Commit
f9464e7
·
verified ·
1 Parent(s): 47838a0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -102,7 +102,7 @@ model = SentenceTransformer(
102
  model_kwargs={
103
  "torch_dtype": torch.bfloat16,
104
  "attn_implementation": "flash_attention_2",
105
- "device_map": "auto"
106
  }
107
  )
108
 
@@ -122,8 +122,8 @@ document_embeddings = model.encode(documents, prompt_name="nl2code_document")
122
  # Compute the (cosine) similarity between the query and document embeddings
123
  similarity = model.similarity(query_embeddings, document_embeddings)
124
  print(similarity)
125
- # tensor([[0.8157, 0.1222],
126
- # [0.1201, 0.5500]])
127
  ```
128
  </details>
129
 
 
102
  model_kwargs={
103
  "torch_dtype": torch.bfloat16,
104
  "attn_implementation": "flash_attention_2",
105
+ "device_map": "cuda"
106
  }
107
  )
108
 
 
122
  # Compute the (cosine) similarity between the query and document embeddings
123
  similarity = model.similarity(query_embeddings, document_embeddings)
124
  print(similarity)
125
+ # tensor([[0.7650, 0.1131],
126
+ # [0.0938, 0.6607]])
127
  ```
128
  </details>
129