format code chunks in readme
#1
by
KennethEnevoldsen
- opened
README.md
CHANGED
|
@@ -89,7 +89,7 @@ attn_implementation='sdpa'<br>
|
|
| 89 |
Details can be found on our <a href="https://github.com/Kingsoft-LLM/QZhou-Embedding">GitHub</a>.
|
| 90 |
#### Evaluation code usage
|
| 91 |
Find our benchmark evaluation code on <a href="https://github.com/Kingsoft-LLM/QZhou-Embedding">GitHub</a>. The mteb benchmark script is **run_mteb_all_v2.py**, and the cmteb benchmark script is **run_cmteb_all.py**. Run the following command:
|
| 92 |
-
```
|
| 93 |
POOLING_MODE=mean
|
| 94 |
normalize=true
|
| 95 |
use_instruction=true
|
|
@@ -116,7 +116,7 @@ This is a general script that can be used to evaluate other huggingface embeddin
|
|
| 116 |
|
| 117 |
### Sentence-transformers
|
| 118 |
|
| 119 |
-
```
|
| 120 |
from sentence_transformers import SentenceTransformer
|
| 121 |
|
| 122 |
model = SentenceTransformer("Kingsoft-LLM/QZhou-Embedding")
|
|
@@ -145,7 +145,7 @@ similarity = model.similarity(query_embeddings, document_embeddings)
|
|
| 145 |
|
| 146 |
### Huggingface Transformers
|
| 147 |
|
| 148 |
-
```
|
| 149 |
import torch
|
| 150 |
import torch.nn.functional as F
|
| 151 |
|
|
|
|
| 89 |
Details can be found on our <a href="https://github.com/Kingsoft-LLM/QZhou-Embedding">GitHub</a>.
|
| 90 |
#### Evaluation code usage
|
| 91 |
Find our benchmark evaluation code on <a href="https://github.com/Kingsoft-LLM/QZhou-Embedding">GitHub</a>. The mteb benchmark script is **run_mteb_all_v2.py**, and the cmteb benchmark script is **run_cmteb_all.py**. Run the following command:
|
| 92 |
+
```bash
|
| 93 |
POOLING_MODE=mean
|
| 94 |
normalize=true
|
| 95 |
use_instruction=true
|
|
|
|
| 116 |
|
| 117 |
### Sentence-transformers
|
| 118 |
|
| 119 |
+
```py
|
| 120 |
from sentence_transformers import SentenceTransformer
|
| 121 |
|
| 122 |
model = SentenceTransformer("Kingsoft-LLM/QZhou-Embedding")
|
|
|
|
| 145 |
|
| 146 |
### Huggingface Transformers
|
| 147 |
|
| 148 |
+
```py
|
| 149 |
import torch
|
| 150 |
import torch.nn.functional as F
|
| 151 |
|