Update README.md
Browse files
README.md
CHANGED
@@ -80,4 +80,37 @@ configs:
|
|
80 |
data_files:
|
81 |
- split: queries
|
82 |
path: queries/queries-*
|
83 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
data_files:
|
81 |
- split: queries
|
82 |
path: queries/queries-*
|
83 |
+
---
|
84 |
+
Employing the MTEB evaluation framework's dataset version, utilize the code below for assessment:
|
85 |
+
|
86 |
+
```python
|
87 |
+
import mteb
|
88 |
+
import logging
|
89 |
+
from sentence_transformers import SentenceTransformer
|
90 |
+
from mteb import MTEB
|
91 |
+
|
92 |
+
logger = logging.getLogger(__name__)
|
93 |
+
|
94 |
+
model_name = 'intfloat/e5-base-v2'
|
95 |
+
model = SentenceTransformer(model_name)
|
96 |
+
tasks = mteb.get_tasks(
|
97 |
+
tasks=[
|
98 |
+
"AppsRetrieval",
|
99 |
+
"CodeFeedbackMT",
|
100 |
+
"CodeFeedbackST",
|
101 |
+
"CodeTransOceanContest",
|
102 |
+
"CodeTransOceanDL",
|
103 |
+
"CosQA",
|
104 |
+
"SyntheticText2SQL",
|
105 |
+
"StackOverflowQA",
|
106 |
+
"COIRCodeSearchNetRetrieval",
|
107 |
+
"CodeSearchNetCCRetrieval",
|
108 |
+
]
|
109 |
+
)
|
110 |
+
evaluation = MTEB(tasks=tasks)
|
111 |
+
results = evaluation.run(
|
112 |
+
model=model,
|
113 |
+
overwrite_results=True
|
114 |
+
)
|
115 |
+
print(result)
|
116 |
+
```
|