[CI] Add mteb testing to test the accuracy of the embedding model #17175
+142
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Task selection
Although mteb v2 significantly speeds up the testing process, it still requires several hours to complete all tests.
Here choose a small test task in mteb: STS12.
Running time on 4090 is approximately 26.95s
The score for this test set is strongly numerical stability ( <1e-4 ) with respect to minor variations in the model implementation and tensor data types.
The score differences between different models are also quite noticeable ( >1e-3).
This makes mteb STS12 a great embedding model test set.
numerical stability
The difference is very subtle (<1e-4) at least on this test set.
Ten rounds:
The results of ten iterations seem to show that converting float32 to float16 yields better results than bfloat16 (vllm defaults to converting float32 to float16).
more about numerical stability
Most models exhibit excellent numerical stability
fp16:
| intfloat/multilingual-e5-small | 0.7805425596252846 | -0.2749311085815237 | 0.006216913108536066 |
fp32:
| intfloat/multilingual-e5-small | 0.7805425596252846 | -1.6403316041024851e-06 | 7.53539269543218e-06 |
fp16:
| jinaai/jina-embeddings-v3 | 0.7834129787836271 | -0.0709833671361465 | 0.004834963031278825 |
fp32:
| jinaai/jina-embeddings-v3 | 0.8243646209061513 | -3.119267999662778e-05 | 6.651161140301139e-06 |
with rope_scaling
| Snowflake/snowflake-arctic-embed-m-long | 0.6811445157066163 | 0.002028678862646127 | 1.7115555299524317e-05 |
without rope_scaling
| Snowflake/snowflake-arctic-embed-m-long | 0.6811445157066163 | 3.396798716037708e-05 | 1.224356222837439e-05 |