diff --git a/examples/training/prompts/README.md b/examples/training/prompts/README.md index 81779e78a..860e0bd2e 100644 --- a/examples/training/prompts/README.md +++ b/examples/training/prompts/README.md @@ -96,7 +96,7 @@ Additionally, some research papers (`INSTRUCTOR `_: This script finetunes `mpnet-base `_ on 100k query-answer pairs from the `natural-questions `_ dataset using the :class:`~sentence_transformers.losses.CachedMultipleNegativesRankingLoss` loss. The model is evaluated during training using the :class:`~sentence_transformers.evaluation.NanoBEIREvaluator`. +* `training_nq_prompts.py `_: This script finetunes `mpnet-base `_ on 100k query-answer pairs from the `natural-questions `_ dataset using the :class:`~sentence_transformers.losses.CachedMultipleNegativesRankingLoss` loss. The model is evaluated during training using the :class:`~sentence_transformers.evaluation.NanoBEIREvaluator`. This script has two variables that affect 1) whether prompts are used and 2) whether prompts are included in the pooling. I have finetuned both ``mpnet-base`` and ``bert-base-uncased`` under the various different settings, resulting in a 0.66% and 0.90% relative improvements on ``NDCG@10`` at no extra cost. diff --git a/pyproject.toml b/pyproject.toml index 57195bde7..00f301f8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sentence-transformers" -version = "3.3.0" +version = "3.3.1" description = "State-of-the-Art Text Embeddings" license = { text = "Apache 2.0" } readme = "README.md" diff --git a/sentence_transformers/__init__.py b/sentence_transformers/__init__.py index edd629a63..2188ac836 100644 --- a/sentence_transformers/__init__.py +++ b/sentence_transformers/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -__version__ = "3.3.0" +__version__ = "3.3.1" __MODEL_HUB_ORGANIZATION__ = "sentence-transformers" import importlib diff --git a/sentence_transformers/models/Transformer.py b/sentence_transformers/models/Transformer.py index 1af4dccb7..48a3bc768 100644 --- a/sentence_transformers/models/Transformer.py +++ b/sentence_transformers/models/Transformer.py @@ -101,7 +101,15 @@ def __init__( def _load_config(self, model_name_or_path: str, cache_dir: str | None, backend: str, config_args: dict[str, Any]): """Loads the configuration of a model""" - if find_adapter_config_file(model_name_or_path) is not None: + if ( + find_adapter_config_file( + model_name_or_path, + token=config_args.get("token"), + revision=config_args.get("revision"), + local_files_only=config_args.get("local_files_only", False), + ) + is not None + ): if not is_peft_available(): raise Exception( "Loading a PEFT model requires installing the `peft` package. You can install it via `pip install peft`."