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