Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ For more details, including benchmark evaluation, hardware requirements, and inf
|
|
| 14 |
refer to our [Github](https://github.com/Y-Research-SBU/CSRv2).
|
| 15 |
|
| 16 |
## Sentence Transformer Usage
|
| 17 |
-
You can evaluate this model loaded by Sentence Transformers with the following code snippet (take
|
| 18 |
```python
|
| 19 |
import mteb
|
| 20 |
from sentence_transformers import SparseEncoder
|
|
@@ -23,14 +23,14 @@ model = SparseEncoder(
|
|
| 23 |
trust_remote_code=True
|
| 24 |
)
|
| 25 |
model.prompts = {
|
| 26 |
-
"
|
| 27 |
}
|
| 28 |
-
task = mteb.get_tasks(tasks=["
|
| 29 |
evaluation = mteb.MTEB(tasks=task)
|
| 30 |
evaluation.run(
|
| 31 |
model,
|
| 32 |
eval_splits=["test"],
|
| 33 |
-
output_folder="./results/
|
| 34 |
show_progress_bar=True
|
| 35 |
encode_kwargs={"convert_to_sparse_tensor": False, "batch_size": 8}
|
| 36 |
) # MTEB don't support sparse tensors yet, so we need to convert to dense tensors
|
|
|
|
| 14 |
refer to our [Github](https://github.com/Y-Research-SBU/CSRv2).
|
| 15 |
|
| 16 |
## Sentence Transformer Usage
|
| 17 |
+
You can evaluate this model loaded by Sentence Transformers with the following code snippet (take ArXivHierarchicalClusteringS2S as one example):
|
| 18 |
```python
|
| 19 |
import mteb
|
| 20 |
from sentence_transformers import SparseEncoder
|
|
|
|
| 23 |
trust_remote_code=True
|
| 24 |
)
|
| 25 |
model.prompts = {
|
| 26 |
+
"ArXivHierarchicalClusteringS2S": "Instruct: Identify the main and secondary category of Arxiv papers based on the titles\n Query:"
|
| 27 |
}
|
| 28 |
+
task = mteb.get_tasks(tasks=["ArXivHierarchicalClusteringS2S"])
|
| 29 |
evaluation = mteb.MTEB(tasks=task)
|
| 30 |
evaluation.run(
|
| 31 |
model,
|
| 32 |
eval_splits=["test"],
|
| 33 |
+
output_folder="./results/ArXivHierarchicalClusteringS2S",
|
| 34 |
show_progress_bar=True
|
| 35 |
encode_kwargs={"convert_to_sparse_tensor": False, "batch_size": 8}
|
| 36 |
) # MTEB don't support sparse tensors yet, so we need to convert to dense tensors
|