Update README.md
Browse files
README.md
CHANGED
@@ -63,8 +63,8 @@ document = "The quick brown fox jumps over the lazy dog."
|
|
63 |
query_instruction = ""
|
64 |
doc_instruction = ""
|
65 |
|
66 |
-
query_emb = model.encode(query,
|
67 |
-
doc_emb = model.encode(document,
|
68 |
|
69 |
sim = model.similarity(query_emb, doc_emb)
|
70 |
```
|
@@ -72,7 +72,7 @@ sim = model.similarity(query_emb, doc_emb)
|
|
72 |
It is important to also include `trust_remote_code=True` and `torch_dtype="auto"` as discussed earlier.
|
73 |
|
74 |
> [!NOTE]
|
75 |
-
> There are some very slight floating point
|
76 |
|
77 |
## Citation
|
78 |
```
|
|
|
63 |
query_instruction = ""
|
64 |
doc_instruction = ""
|
65 |
|
66 |
+
query_emb = model.encode(query, prompt=query_instruction)
|
67 |
+
doc_emb = model.encode(document, prompt=doc_instruction)
|
68 |
|
69 |
sim = model.similarity(query_emb, doc_emb)
|
70 |
```
|
|
|
72 |
It is important to also include `trust_remote_code=True` and `torch_dtype="auto"` as discussed earlier.
|
73 |
|
74 |
> [!NOTE]
|
75 |
+
> There are some very slight floating point discrepancies when using the model via SentenceTransformer caused by how the models are cast to the `bfloat16` dtype, though it should not affect the results in general.
|
76 |
|
77 |
## Citation
|
78 |
```
|