Skip to content

Commit

Permalink
Merge branch 'master' into pr-2712
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaarsen committed Sep 30, 2024
2 parents 1a9b1c0 + 80393d0 commit f91747f
Show file tree
Hide file tree
Showing 70 changed files with 2,164 additions and 573 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python environment
uses: actions/setup-python@v5
with:
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,37 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Remove unnecessary files
run: |
df -h /
# Remove software and language runtimes we're not using
sudo rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/opt/pipx \
/usr/lib/mono \
/usr/local/julia* \
/usr/local/lib/android \
/usr/local/lib/node_modules \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift
df -h /
if: runner.os == 'Linux'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python environment
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Try to load cached dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: restore-cache
with:
path: ${{ env.pythonLocation }}
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
intersphinx_mapping = {
"datasets": ("https://huggingface.co/docs/datasets/main/en/", None),
"transformers": ("https://huggingface.co/docs/transformers/main/en/", None),
"huggingface_hub": ("https://huggingface.co/docs/huggingface_hub/main/en/", None),
"torch": ("https://pytorch.org/docs/stable/", None),
}

Expand Down
2 changes: 1 addition & 1 deletion docs/cross_encoder/usage/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Characteristics of Cross Encoder (a.k.a reranker) models:
3. Often **slower** than a Sentence Transformer model, as it requires computation for each pair rather than each text.
4. Due to the previous 2 characteristics, Cross Encoders are often used to **re-rank the top-k results** from a Sentence Transformer model.

Once you have installed `installed <installation.md>`_ Sentence Transformers, you can easily use Cross Encoder models:
Once you have `installed <../../installation.html>`_ Sentence Transformers, you can easily use Cross Encoder models:

.. sidebar:: Documentation

Expand Down
1 change: 1 addition & 0 deletions docs/package_reference/sentence_transformer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Sentence Transformer
trainer
training_args
losses
sampler
evaluation
datasets
models
Expand Down
6 changes: 6 additions & 0 deletions docs/package_reference/sentence_transformer/losses.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ This allows our network to be fine-tuned to recognize the similarity of sentence
.. autoclass:: sentence_transformers.losses.MultipleNegativesSymmetricRankingLoss
```

## CachedMultipleNegativesSymmetricRankingLoss

```eval_rst
.. autoclass:: sentence_transformers.losses.CachedMultipleNegativesSymmetricRankingLoss
```

## SoftmaxLoss
```eval_rst
.. autoclass:: sentence_transformers.losses.SoftmaxLoss
Expand Down
39 changes: 39 additions & 0 deletions docs/package_reference/sentence_transformer/sampler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# Samplers

## BatchSamplers
```eval_rst
.. autoclass:: sentence_transformers.training_args.BatchSamplers
:members:
```

```eval_rst
.. autoclass:: sentence_transformers.sampler.DefaultBatchSampler
:members:
```

```eval_rst
.. autoclass:: sentence_transformers.sampler.NoDuplicatesBatchSampler
:members:
```

```eval_rst
.. autoclass:: sentence_transformers.sampler.GroupByLabelBatchSampler
:members:
```

## MultiDatasetBatchSamplers
```eval_rst
.. autoclass:: sentence_transformers.training_args.MultiDatasetBatchSamplers
:members:
```

```eval_rst
.. autoclass:: sentence_transformers.sampler.RoundRobinBatchSampler
:members:
```

```eval_rst
.. autoclass:: sentence_transformers.sampler.ProportionalBatchSampler
:members:
```
12 changes: 0 additions & 12 deletions docs/package_reference/sentence_transformer/training_args.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,3 @@
:members:
:inherited-members:
```

## BatchSamplers
```eval_rst
.. autoclass:: sentence_transformers.training_args.BatchSamplers
:members:
```

## MultiDatasetBatchSamplers
```eval_rst
.. autoclass:: sentence_transformers.training_args.MultiDatasetBatchSamplers
:members:
```
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Characteristics of Sentence Transformer (a.k.a bi-encoder) models:
3. Applicable for a **wide range of tasks**, such as semantic textual similarity, semantic search, clustering, classification, paraphrase mining, and more.
4. Often used as a **first step in a two-step retrieval process**, where a Cross-Encoder (a.k.a. reranker) model is used to re-rank the top-k results from the bi-encoder.

Once you have `installed <installation.md>`_ Sentence Transformers, you can easily use Sentence Transformer models:
Once you have `installed <installation.html>`_ Sentence Transformers, you can easily use Sentence Transformer models:

.. sidebar:: Documentation

Expand Down
Loading

0 comments on commit f91747f

Please sign in to comment.