Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,56 @@ on:
pull_request:

jobs:
changes:
name: Detect code changes
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
fetch-depth: 0

- name: Check for changes outside non-code files
id: filter
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE: ${{ github.event.pull_request.base.sha }}
PR_HEAD: ${{ github.event.pull_request.head.sha }}
PUSH_BEFORE: ${{ github.event.before }}
PUSH_AFTER: ${{ github.event.after }}
run: |
if [[ "$EVENT_NAME" == "pull_request" ]]; then
range="$PR_BASE...$PR_HEAD"
elif [[ -z "$PUSH_BEFORE" || "$PUSH_BEFORE" =~ ^0+$ ]]; then
echo "code=true" >> "$GITHUB_OUTPUT"
exit 0
else
range="$PUSH_BEFORE..$PUSH_AFTER"
fi

if ! files=$(git diff --no-renames --name-only "$range"); then
echo "code=true" >> "$GITHUB_OUTPUT"
exit 0
fi

code=false
while IFS= read -r file; do
case "$file" in
"") ;;
model2vec/modelcards/*) code=true ;;
*.md|assets/*|docs/*|results/*|LICENSE|CITATION.cff) ;;
*) code=true ;;
esac
done <<< "$files"

echo "code=$code" >> "$GITHUB_OUTPUT"

test:
name: Run tests with pytest
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -57,3 +105,23 @@ jobs:
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
with:
token: ${{ secrets.CODECOV_TOKEN }}

tests-passed:
name: Tests passed
needs: [changes, test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check test results
shell: bash
env:
CHANGES_RESULT: ${{ needs.changes.result }}
TEST_RESULT: ${{ needs.test.result }}
run: |
echo "changes: $CHANGES_RESULT, test: $TEST_RESULT"
if [[ "$CHANGES_RESULT" != "success" ]]; then
exit 1
fi
if [[ "$TEST_RESULT" != "success" && "$TEST_RESULT" != "skipped" ]]; then
exit 1
fi
16 changes: 10 additions & 6 deletions results/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,14 @@ Note: the MMTEB leaderboard ranks models using a [Borda count](https://en.wikipe
| Model | Mean (Task) | Mean (TaskType) | BitMining | Class | Clust | InstRet | MultiClass | PairClass | Rank | Ret | STS |
| :---------------------------------------- | :---------- | :-------------- | :------------ | :------------- | :--------- | :-------------------- | :------------------------ | :------------------ | :-------- | :-------- | :-------- |
| [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) | 52.07 | 45.65 | 76.35 | 54.60 | 38.08 | −3.00 | 20.12 | 75.97 | 50.20 | 33.17 | 65.35 |
| [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) | 47.31 | 40.40 | 40.72 | 52.36 | 38.80 | −2.08 | 15.95 | 71.39 | 47.39 | 37.86 | 61.23 |
| [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) | 47.24 | 41.38 | 50.62 | 48.60 | 30.67 | −1.24 | 14.74 | 74.34 | 49.45 | 41.21 | 64.02 |
| [blink-multilingual-64M](https://huggingface.co/minishlab/blink-multilingual-64M) | 51.60 | 45.11 | 57.03 | 52.11 | 39.67 | −1.33 | 17.47 | 73.47 | 52.61 | 47.52 | 67.47 |
| [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) | 47.21 | 41.28 | 50.62 | 48.60 | 30.67 | −1.24 | 13.83 | 74.34 | 49.45 | 41.21 | 64.02 |
| [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) | 47.20 | 40.18 | 40.72 | 52.36 | 37.63 | −2.08 | 15.11 | 71.39 | 47.39 | 37.86 | 61.23 |
| [M2V_multilingual_output](https://huggingface.co/minishlab/M2V_multilingual_output) | 42.13 | 35.89 | 36.88 | 49.75 | 30.09 | −0.07 | 14.34 | 69.74 | 41.51 | 25.42 | 55.33 |

As can be seen, [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) is the most performant static multilingual model, reaching 90.86% of the performance of [LaBSE](https://huggingface.co/sentence-transformers/LaBSE). There are differences per task. The [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) model is better for retrieval and STS tasks (which can be explained by the fact that it's trained for STS), while the [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) model is better for classification and clustering tasks. It is important to note that the [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) model supports a total of 101 languages, while [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) supports only 50 languages. It is also important to note that MMTEB does not include tasks for every language, and there may be a bias towards larger languages.
As can be seen, [blink-multilingual-64M](https://huggingface.co/minishlab/blink-multilingual-64M) is the most performant static multilingual model, reaching 99.10% of the performance of [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) with half the parameters of [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M). It outperforms [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) on clustering, reranking, retrieval and STS, and outperforms the other static models on every task type except classification, pair classification and instruction retrieval.

Among the older static models, [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) reaches 90.65% of the performance of [LaBSE](https://huggingface.co/sentence-transformers/LaBSE). There are differences per task. The [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) model is better for retrieval and STS tasks (which can be explained by the fact that it's trained for STS), while the [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) model is better for classification and clustering tasks. It is important to note that the [potion-multilingual-128M](https://huggingface.co/minishlab/potion-multilingual-128M) model supports a total of 101 languages, while [static-similarity-mrl-multilingual-v1](https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1) supports only 50 languages. It is also important to note that MMTEB does not include tasks for every language, and there may be a bias towards larger languages.


<details>
Expand All @@ -81,16 +84,17 @@ For readability, the MMTEB task names are abbreviated as follows:

## Retrieval Results

Some of our models are specifically designed for retrieval tasks. The results are shown in the table below, with [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) included as a transformer baseline and [potion-base-32M](https://huggingface.co/minishlab/potion-base-32M) as a general-purpose static baseline.
We used to release models specifically designed for retrieval, such as [potion-retrieval-32M](https://huggingface.co/minishlab/potion-retrieval-32M). Our newer general-purpose model, [blink-8M](https://huggingface.co/minishlab/blink-8m), now outperforms them on retrieval, so there is no longer a need for a separate retrieval model. The results are shown in the table below, with [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) included as a transformer baseline and [potion-base-32M](https://huggingface.co/minishlab/potion-base-32M) as a general-purpose static baseline.

| Model | Retrieval Score |
|:-----------------------|------------------:|
| [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) | 42.92 |
| [blink-8M](https://huggingface.co/minishlab/blink-8m) | 38.86 |
| [potion-retrieval-32M](https://huggingface.co/minishlab/potion-retrieval-32M) | 35.06 |
| [static-retrieval-mrl-en-v1](https://huggingface.co/minishlab/static-retrieval-mrl-en-v1) | 34.95 |
| [static-retrieval-mrl-en-v1](https://huggingface.co/sentence-transformers/static-retrieval-mrl-en-v1) | 34.95 |
| [potion-base-32M](https://huggingface.co/minishlab/potion-base-32M) | 32.67 |

As can be seen, [potion-retrieval-32M](https://huggingface.co/minishlab/potion-retrieval-32M) is the most performant static retrieval model, reaching 81.69% of the performance of [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) with a retrieval score of 35.06.
As can be seen, [blink-8M](https://huggingface.co/minishlab/blink-8m) is the most performant static retrieval model, reaching 90.54% of the performance of [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) with a retrieval score of 38.86. Even though it is a general-purpose model, it outperforms the retrieval-specific [potion-retrieval-32M](https://huggingface.co/minishlab/potion-retrieval-32M) by 3.8 points, with a quarter of the parameters.

## Training Results

Expand Down
Loading