State-of-the-Art Embeddings, Retrieval, and Reranking
1959 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …entence_transformer/deprecated_model_card_templates.py | 125 | def model_card_get_pooling_function(pooling_mode): |
| LOW | sentence_transformers/sentence_transformer/model.py | 926 | def set_pooling_include_prompt(self, include_prompt: bool) -> None: |
| LOW | sentence_transformers/sentence_transformer/model.py | 972 | def get_sentence_embedding_dimension(self) -> int | None: |
| LOW | sentence_transformers/sentence_transformer/model.py | 1010 | def truncate_sentence_embeddings(self, truncate_dim: int | None) -> Iterator[None]: |
| LOW | …ntence_transformers/sentence_transformer/model_card.py | 118 | def get_model_specific_metadata(self) -> dict[str, Any]: |
| LOW | …sentence_transformer/losses/batch_semi_hard_triplet.py | 110 | def batch_semi_hard_triplet_loss(self, labels: Tensor, embeddings: Tensor) -> Tensor: |
| LOW | …tence_transformer/losses/multiple_negatives_ranking.py | 235 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …ence_transformers/sentence_transformer/losses/angle.py | 83 | def compute_loss_from_embeddings( |
| LOW | …ransformer/losses/cached_multiple_negatives_ranking.py | 416 | def calculate_loss_and_cache_gradients(self, reps: list[list[Tensor]]) -> Tensor: |
| LOW | …transformer/losses/global_orthogonal_regularization.py | 139 | def compute_loss_from_embeddings( |
| LOW | …mers/sentence_transformer/losses/batch_hard_triplet.py | 228 | def get_anchor_positive_triplet_mask(labels: Tensor) -> Tensor: |
| LOW | …mers/sentence_transformer/losses/batch_hard_triplet.py | 247 | def get_anchor_negative_triplet_mask(labels: Tensor) -> Tensor: |
| LOW | …transformers/sentence_transformer/losses/margin_mse.py | 177 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …rmers/sentence_transformer/losses/cosine_similarity.py | 83 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …nce_transformers/sentence_transformer/losses/cosent.py | 86 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …ce_transformers/sentence_transformer/losses/triplet.py | 87 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …e_transformer/losses/batch_hard_soft_margin_triplet.py | 99 | def batch_hard_triplet_soft_margin_loss(self, labels: Tensor, embeddings: Tensor) -> Tensor: |
| LOW | …sformers/sentence_transformer/losses/distill_kl_div.py | 141 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], labels: Tensor) -> Tensor: |
| LOW | …rmers/sentence_transformer/losses/cached_gist_embed.py | 278 | def calculate_loss_and_cache_gradients(self, reps: list[list[Tensor]], reps_guided: list[list[Tensor]]) -> Tensor: |
| LOW | …nsformers/sentence_transformer/losses/embed_distill.py | 196 | def compute_loss_from_embeddings(self, embeddings: list[Tensor], teacher_embeddings: list[Tensor]) -> Tensor: |
| LOW | …ntence_transformer/evaluation/binary_classification.py | 316 | def find_best_acc_and_threshold(scores, labels, high_score_more_similar: bool): |
| LOW | …nsformers/sentence_transformer/evaluation/reranking.py | 291 | def compute_metrics_individual(self, model: SentenceTransformer): |
| LOW | …nsformers/sentence_transformer/evaluation/nano_beir.py | 468 | def _load_dataset_subset_split(self, subset: str, split: str, required_columns: list[str]): |
| LOW | …nsformers/sentence_transformer/evaluation/nano_beir.py | 523 | def store_metrics_in_model_card_data(self, *args, **kwargs): |
| LOW | …e_transformers/sentence_transformer/modules/pooling.py | 26 | def _convert_legacy_pooling_kwargs(kwargs: dict[str, Any]) -> None: |
| LOW | …e_transformers/sentence_transformer/modules/pooling.py | 46 | def _deprecated_pooling_mode_kwargs(func): |
| LOW | …e_transformers/sentence_transformer/modules/pooling.py | 151 | def _exclude_prompt_from_mask(attention_mask: Tensor, prompt_length: int) -> Tensor: |
| LOW | …ransformers/sentence_transformer/modules/clip_model.py | 36 | def _get_default_modality_config(config: dict[str, Any]) -> tuple[ModalityConfig, str]: |
| LOW | sentence_transformers/util/deprecated_import.py | 261 | def setup_deprecated_module_imports() -> None: |
| LOW | sentence_transformers/util/similarity.py | 299 | def to_similarity_pairwise_fn( |
| LOW | sentence_transformers/util/retrieval.py | 89 | def paraphrase_mining_embeddings( |
| LOW | sentence_transformers/util/environment.py | 28 | def suggest_extra_on_exception() -> Generator[None, None, None]: |
| LOW | sentence_transformers/util/environment.py | 72 | def check_package_availability(package_name: str, owner: str) -> bool: |
| LOW | sentence_transformers/util/file_io.py | 34 | def is_sentence_transformer_model( |
| LOW | sentence_transformers/util/decorators.py | 48 | def transformer_kwargs_decorator(func): |
| LOW | sentence_transformers/util/decorators.py | 92 | def cross_encoder_init_args_decorator(func): |
| LOW | sentence_transformers/util/decorators.py | 165 | def cross_encoder_predict_rank_args_decorator(func): |
| LOW | sentence_transformers/util/decorators.py | 190 | def save_to_hub_args_decorator(func): |
| LOW | sentence_transformers/backend/optimize.py | 19 | def export_optimized_onnx_model( |
| LOW | sentence_transformers/backend/quantize.py | 24 | def export_dynamic_quantized_onnx_model( |
| LOW | sentence_transformers/backend/quantize.py | 107 | def export_static_quantized_openvino_model( |
| LOW | sentence_transformers/backend/utils.py | 155 | def save_or_push_to_hub_model( |
| LOW | sentence_transformers/cross_encoder/model.py | 402 | def get_default_activation_fn(self) -> Callable: |
| LOW | sentence_transformers/cross_encoder/model.py | 463 | def default_activation_function(self) -> Callable: |
| LOW | sentence_transformers/cross_encoder/fit_mixin.py | 397 | def smart_batching_collate_text_only(self, batch: list[InputExample]) -> BatchEncoding: |
| LOW | sentence_transformers/cross_encoder/model_card.py | 269 | def get_model_specific_metadata(self) -> dict[str, Any]: |
| LOW | …ss_encoder/losses/cached_multiple_negatives_ranking.py | 239 | def calculate_loss_and_cache_gradients(self, logits: list[Tensor], batch_size: int) -> Tensor: |
| LOW | …nce_transformers/cross_encoder/evaluation/nano_beir.py | 389 | def _load_dataset_subset_split(self, subset: str, split: str, required_columns: list[str]): |
| LOW | sentence_transformers/sparse_encoder/model.py | 597 | def set_pooling_include_prompt(self, include_prompt: bool) -> None: |
| LOW | sentence_transformers/sparse_encoder/model.py | 825 | def get_sentence_embedding_dimension(self) -> int | None: |
| LOW | sentence_transformers/sparse_encoder/model.py | 1110 | def splade_pooling_chunk_size(self) -> int | None: |
| LOW | sentence_transformers/sparse_encoder/model.py | 1131 | def splade_pooling_chunk_size(self, value: int | None) -> None: |
| LOW | sentence_transformers/sparse_encoder/model_card.py | 118 | def get_model_specific_metadata(self) -> dict[str, Any]: |
| LOW | sentence_transformers/sparse_encoder/search_engines.py | 160 | def semantic_search_elasticsearch( |
| LOW | sentence_transformers/sparse_encoder/search_engines.py | 428 | def semantic_search_opensearch( |
| LOW | …ce_transformers/sparse_encoder/losses/cached_splade.py | 182 | def calculate_loss_and_cache_gradients(self, reps: list[list[Tensor]], labels: Tensor | None) -> Tensor: |
| LOW | sentence_transformers/sparse_encoder/losses/flops.py | 47 | def compute_loss_from_embeddings(self, embeddings: torch.Tensor) -> torch.Tensor: |
| LOW | sentence_transformers/sparse_encoder/losses/csr.py | 15 | def normalized_mean_squared_error(reconstruction: torch.Tensor, original_input: torch.Tensor) -> torch.Tensor: |
| LOW | sentence_transformers/sparse_encoder/losses/csr.py | 68 | def compute_loss_from_embeddings(self, outputs: list[dict[str, torch.Tensor]]) -> dict[str, torch.Tensor]: |
| LOW | …arse_encoder/evaluation/sparse_embedding_similarity.py | 159 | def store_metrics_in_model_card_data( |
| 790 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sentence_transformers/__init__.py | 1 | |
| LOW | sentence_transformers/__init__.py | 10 | |
| LOW | sentence_transformers/__init__.py | 10 | |
| LOW | sentence_transformers/__init__.py | 10 | |
| LOW | sentence_transformers/__init__.py | 15 | |
| LOW | sentence_transformers/__init__.py | 15 | |
| LOW | sentence_transformers/__init__.py | 16 | |
| LOW | sentence_transformers/__init__.py | 16 | |
| LOW | sentence_transformers/__init__.py | 16 | |
| LOW | sentence_transformers/__init__.py | 16 | |
| LOW | sentence_transformers/__init__.py | 22 | |
| LOW | sentence_transformers/__init__.py | 22 | |
| LOW | sentence_transformers/__init__.py | 23 | |
| LOW | sentence_transformers/__init__.py | 24 | |
| LOW | sentence_transformers/__init__.py | 25 | |
| LOW | sentence_transformers/__init__.py | 26 | |
| LOW | sentence_transformers/__init__.py | 27 | |
| LOW | sentence_transformers/__init__.py | 28 | |
| LOW | sentence_transformers/__init__.py | 28 | |
| LOW | sentence_transformers/__init__.py | 28 | |
| LOW | sentence_transformers/__init__.py | 28 | |
| LOW | sentence_transformers/__init__.py | 34 | |
| LOW | sentence_transformers/__init__.py | 36 | |
| LOW | sentence_transformers/__init__.py | 37 | |
| LOW | sentence_transformers/__init__.py | 38 | |
| LOW | …entence_transformer/deprecated_model_card_templates.py | 6 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 1 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 3 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 4 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 5 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 6 | |
| LOW | sentence_transformers/sentence_transformer/__init__.py | 7 | |
| LOW | …nce_transformers/sentence_transformer/training_args.py | 1 | |
| LOW | …nce_transformers/sentence_transformer/training_args.py | 5 | |
| LOW | …nce_transformers/sentence_transformer/training_args.py | 5 | |
| LOW | sentence_transformers/sentence_transformer/model.py | 1 | |
| LOW | …nce_transformers/sentence_transformer/data_collator.py | 1 | |
| LOW | sentence_transformers/sentence_transformer/trainer.py | 1 | |
| LOW | sentence_transformers/sentence_transformer/fit_mixin.py | 1 | |
| LOW | …ntence_transformers/sentence_transformer/model_card.py | 1 | |
| LOW | …sentence_transformer/losses/batch_semi_hard_triplet.py | 1 | |
| LOW | …/losses/cached_multiple_negatives_symmetric_ranking.py | 1 | |
| LOW | …ntence_transformers/sentence_transformer/losses/mse.py | 1 | |
| LOW | …tence_transformer/losses/multiple_negatives_ranking.py | 1 | |
| LOW | …transformers/sentence_transformer/losses/gist_embed.py | 1 | |
| LOW | …rmers/sentence_transformer/losses/batch_all_triplet.py | 1 | |
| LOW | …ransformers/sentence_transformer/losses/contrastive.py | 1 | |
| LOW | …ence_transformers/sentence_transformer/losses/angle.py | 1 | |
| LOW | …ransformer/losses/cached_multiple_negatives_ranking.py | 1 | |
| LOW | …transformer/losses/global_orthogonal_regularization.py | 1 | |
| LOW | …mers/sentence_transformer/losses/batch_hard_triplet.py | 1 | |
| LOW | …transformers/sentence_transformer/losses/margin_mse.py | 1 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 2 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 4 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 6 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 7 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 8 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 9 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 10 | |
| LOW | …e_transformers/sentence_transformer/losses/__init__.py | 10 | |
| 493 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | …sentence_transformer/losses/batch_semi_hard_triplet.py | 0 | @misc{hermans2017defense, title={in defense of the triplet loss for person re-identification}, author={alexander hermans |
| HIGH | …rmers/sentence_transformer/losses/batch_all_triplet.py | 0 | @misc{hermans2017defense, title={in defense of the triplet loss for person re-identification}, author={alexander hermans |
| HIGH | …mers/sentence_transformer/losses/batch_hard_triplet.py | 0 | @misc{hermans2017defense, title={in defense of the triplet loss for person re-identification}, author={alexander hermans |
| HIGH | …ce_transformers/sentence_transformer/losses/triplet.py | 0 | @misc{hermans2017defense, title={in defense of the triplet loss for person re-identification}, author={alexander hermans |
| HIGH | …e_transformer/losses/batch_hard_soft_margin_triplet.py | 0 | @misc{hermans2017defense, title={in defense of the triplet loss for person re-identification}, author={alexander hermans |
| HIGH | …ransformer/losses/cached_multiple_negatives_ranking.py | 0 | random-state context manager class. reference: https://github.com/luyug/gradcache. this class will back up the pytorch's |
| HIGH | …rmers/sentence_transformer/losses/cached_gist_embed.py | 0 | random-state context manager class. reference: https://github.com/luyug/gradcache. this class will back up the pytorch's |
| HIGH | …ss_encoder/losses/cached_multiple_negatives_ranking.py | 0 | random-state context manager class. reference: https://github.com/luyug/gradcache. this class will back up the pytorch's |
| HIGH | …ransformer/losses/cached_multiple_negatives_ranking.py | 0 | a backward hook to backpropagate the cached gradients mini-batch by mini-batch. |
| HIGH | …rmers/sentence_transformer/losses/cached_gist_embed.py | 0 | a backward hook to backpropagate the cached gradients mini-batch by mini-batch. |
| HIGH | …ss_encoder/losses/cached_multiple_negatives_ranking.py | 0 | a backward hook to backpropagate the cached gradients mini-batch by mini-batch. |
| HIGH | …ransformer/losses/cached_multiple_negatives_ranking.py | 0 | do forward pass on all the minibatches of the input features and yield corresponding embeddings. |
| HIGH | …rmers/sentence_transformer/losses/cached_gist_embed.py | 0 | do forward pass on all the minibatches of the input features and yield corresponding embeddings. |
| HIGH | …ss_encoder/losses/cached_multiple_negatives_ranking.py | 0 | do forward pass on all the minibatches of the input features and yield corresponding embeddings. |
| HIGH | …rs/sentence_transformer/datasets/parallel_sentences.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …_transformers/sentence_transformer/readers/nli_data.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …_transformers/sentence_transformer/readers/sts_data.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …nsformers/sentence_transformer/readers/paired_files.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …sformers/sentence_transformer/readers/input_example.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …formers/sentence_transformer/readers/label_sentence.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | …e_transformers/sentence_transformer/readers/triplet.py | 0 | this file contains deprecated code that can only be used with the old `model.fit`-style sentence transformers v2.x train |
| HIGH | sentence_transformers/cross_encoder/losses/rank_net.py | 0 | get configuration parameters for this loss function. returns: dictionary containing the configuration parameters |
| HIGH | sentence_transformers/cross_encoder/losses/list_net.py | 0 | get configuration parameters for this loss function. returns: dictionary containing the configuration parameters |
| HIGH | sentence_transformers/cross_encoder/losses/plist_mle.py | 0 | get configuration parameters for this loss function. returns: dictionary containing the configuration parameters |
| HIGH | sentence_transformers/cross_encoder/losses/list_mle.py | 0 | get configuration parameters for this loss function. returns: dictionary containing the configuration parameters |
| HIGH | …tence_transformers/cross_encoder/losses/lambda_loss.py | 0 | get configuration parameters for this loss function. returns: dictionary containing the configuration parameters |
| HIGH | …ce_transformers/cross_encoder/evaluation/deprecated.py | 0 | this evaluator has been deprecated in favor of the more general crossencoderclassificationevaluator. |
| HIGH | …ce_transformers/cross_encoder/evaluation/deprecated.py | 0 | this evaluator has been deprecated in favor of the more general crossencoderclassificationevaluator. |
| HIGH | …ce_transformers/cross_encoder/evaluation/deprecated.py | 0 | this evaluator has been deprecated in favor of the more general crossencoderclassificationevaluator. |
| HIGH | …ce_transformers/cross_encoder/evaluation/deprecated.py | 0 | this evaluator has been deprecated in favor of the more general crossencoderclassificationevaluator. |
| HIGH | sentence_transformers/sparse_encoder/losses/splade.py | 0 | get the configuration dictionary. returns: dictionary containing the configuration parameters |
| HIGH | sentence_transformers/sparse_encoder/losses/csr.py | 0 | get the configuration dictionary. returns: dictionary containing the configuration parameters |
| HIGH | sentence_transformers/sparse_encoder/losses/csr.py | 0 | get the configuration dictionary. returns: dictionary containing the configuration parameters |
| HIGH | tests/sentence_transformer/test_model_card.py | 0 | dummy dataset for testing purposes. the dataset looks as follows: { "anchor": ["anchor 1", "anchor 2", ..., "anchor 10"] |
| HIGH | tests/cross_encoder/test_model_card.py | 0 | dummy dataset for testing purposes. the dataset looks as follows: { "anchor": ["anchor 1", "anchor 2", ..., "anchor 10"] |
| HIGH | tests/sparse_encoder/test_model_card.py | 0 | dummy dataset for testing purposes. the dataset looks as follows: { "anchor": ["anchor 1", "anchor 2", ..., "anchor 10"] |
| HIGH | …ransformer/evaluation/test_label_accuracy_evaluator.py | 0 | tests the correct computation of evaluation scores from binaryclassificationevaluator |
| HIGH | …mer/evaluation/test_binary_classification_evaluator.py | 0 | tests the correct computation of evaluation scores from binaryclassificationevaluator |
| HIGH | …sformer/evaluation/test_paraphrase_mining_evaluator.py | 0 | tests the correct computation of evaluation scores from binaryclassificationevaluator |
| HIGH | tests/util/test_hard_negatives.py | 0 | return a sample dataset with multiple matching passages for each query. |
| HIGH | tests/util/test_hard_negatives.py | 0 | return a sample dataset with multiple matching passages for each query. |
| HIGH | tests/util/test_hard_negatives.py | 0 | return a sample dataset with multiple matching passages for each query. |
| HIGH | tests/cross_encoder/test_model.py | 0 | \ <|im_start|>system judge whether the document meets the requirements based on the query and the instruct provided. not |
| HIGH | tests/cross_encoder/test_model.py | 0 | \ <|im_start|>system judge whether the document meets the requirements based on the query and the instruct provided. not |
| HIGH | tests/cross_encoder/test_model.py | 0 | \ <|im_start|>system judge whether the document meets the requirements based on the query and the instruct provided. not |
| HIGH | tests/base/test_modality.py | 0 | malformed urls (e.g. containing unclosed brackets) should not crash. |
| HIGH | tests/base/test_modality.py | 0 | malformed urls (e.g. containing unclosed brackets) should not crash. |
| HIGH | tests/base/test_modality.py | 0 | malformed urls (e.g. containing unclosed brackets) should not crash. |
| HIGH | tests/base/modules/transformer/test_text_generation.py | 0 | create a transformer instance and return it with its supported modalities. |
| HIGH | tests/base/modules/transformer/test_fill_mask.py | 0 | create a transformer instance and return it with its supported modalities. |
| HIGH | tests/base/modules/transformer/test_any_to_any.py | 0 | create a transformer instance and return it with its supported modalities. |
| HIGH | …se/modules/transformer/test_sequence_classification.py | 0 | create a transformer instance and return it with its supported modalities. |
| HIGH | tests/base/modules/transformer/test_text_generation.py | 0 | test inference with each supported modality (single and multi-modal). |
| HIGH | …ts/base/modules/transformer/test_feature_extraction.py | 0 | test inference with each supported modality (single and multi-modal). |
| HIGH | tests/base/modules/transformer/test_any_to_any.py | 0 | test inference with each supported modality (single and multi-modal). |
| HIGH | …se/modules/transformer/test_sequence_classification.py | 0 | test inference with each supported modality (single and multi-modal). |
| HIGH | tests/base/modules/transformer/test_text_generation.py | 0 | test inference with pair inputs for each supported modality combination. |
| HIGH | tests/base/modules/transformer/test_any_to_any.py | 0 | test inference with pair inputs for each supported modality combination. |
| HIGH | …se/modules/transformer/test_sequence_classification.py | 0 | test inference with pair inputs for each supported modality combination. |
| HIGH | …former/unsupervised_learning/TSDAE/train_stsb_tsdae.py | 0 | applies noise by randomly deleting words. warning: nltk's tokenization/detokenization is designed primarily for english. |
| 40 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | sentence_transformers/sentence_transformer/model.py | 856 | # Create a pool if not provided, but a list of devices is |
| MEDIUM | …transformers/sentence_transformer/losses/gist_embed.py | 193 | # Define the anchor threshold |
| MEDIUM | …transformers/sentence_transformer/losses/gist_embed.py | 211 | # Create a mask to protect true positive pairs in the anchor-positive matrix (i.e., diagonal elements) |
| MEDIUM | …rmers/sentence_transformer/losses/cached_gist_embed.py | 333 | # Define the anchor threshold |
| MEDIUM | …rmers/sentence_transformer/losses/cached_gist_embed.py | 351 | # Create a mask to protect true positive pairs in the anchor-positive matrix (i.e., diagonal elements) |
| MEDIUM | …s/sentence_transformer/evaluation/paraphrase_mining.py | 66 | # Create a mapping from qid to question & a list of duplicates (qid1, qid2) |
| MEDIUM | sentence_transformers/util/tensor.py | 160 | # Create a mask of zeros, then set the top-k positions to 1 |
| MEDIUM | sentence_transformers/util/tensor.py | 165 | # Create a sparse tensor with only the top values |
| MEDIUM | sentence_transformers/util/retrieval.py | 163 | """This function is deprecated. Use semantic_search instead""" |
| MEDIUM | sentence_transformers/cross_encoder/model.py | 297 | # Create a pool if is not provided, but a list of devices is |
| MEDIUM | …ers/cross_encoder/losses/multiple_negatives_ranking.py | 137 | # Create a mask for each anchor to each candidate index, where the matching positive |
| MEDIUM | sentence_transformers/cross_encoder/losses/plist_mle.py | 224 | # Create a mask for valid entries |
| MEDIUM | …ransformers/cross_encoder/evaluation/classification.py | 51 | # Create a list of pairs, and map the labels to the labels that the model knows |
| MEDIUM | sentence_transformers/sparse_encoder/model.py | 723 | # Create a pool if not provided, but a list of devices is |
| MEDIUM | sentence_transformers/base/sampler.py | 533 | # Create a random numpy permutation using int32 (or int64 if necessary) |
| MEDIUM | sentence_transformers/base/modules/transformer.py | 1940 | # This method is only called if this model has a modules.json, i.e. it's already been saved |
| MEDIUM | sentence_transformers/base/modules/router.py | 81 | # Create an asymmetric model with different encoders for queries and documents |
| MEDIUM | tests/sentence_transformer/test_model.py | 1201 | # Create a simple dataset with a text column |
| MEDIUM | tests/sentence_transformer/test_model.py | 1322 | # Create a Router with mixed modules |
| MEDIUM | tests/sentence_transformer/test_model.py | 986 | # Create a mock model with required prompts |
| MEDIUM | tests/sentence_transformer/test_model.py | 1043 | # Create a mock model with required prompts |
| MEDIUM | tests/sentence_transformer/test_multi_process.py | 89 | # Create a pool |
| MEDIUM | tests/sentence_transformer/test_multi_process.py | 163 | # Create a pool |
| MEDIUM | tests/sentence_transformer/test_trainer.py | 197 | # Create a new model card if a Trainer was initialized |
| MEDIUM | tests/sentence_transformer/test_trainer.py | 801 | # Define a custom batch sampler function |
| MEDIUM | tests/sentence_transformer/test_trainer.py | 931 | # Define a custom multi-dataset batch sampler function |
| MEDIUM | tests/util/test_hard_negatives.py | 985 | # Create a larger dataset with 32 entries |
| MEDIUM | tests/util/test_hard_negatives.py | 1100 | # Create a dataset with just 2 pairs |
| MEDIUM | tests/cross_encoder/test_model.py | 753 | # Create a simple dataset with a text column |
| MEDIUM | tests/cross_encoder/test_trainer.py | 101 | # Create a new model card if a Trainer was initialized |
| MEDIUM | tests/sparse_encoder/test_model.py | 426 | # Create a simple dataset with a text column |
| MEDIUM | tests/sparse_encoder/test_model.py | 136 | # Create an empty sparse tensor |
| MEDIUM | tests/sparse_encoder/test_model.py | 171 | # Create a batch where the first sample has values but the second is all zeros |
| MEDIUM | tests/sparse_encoder/test_multi_process.py | 62 | # Create a pool |
| MEDIUM | tests/sparse_encoder/modules/test_csr.py | 11 | # Create a wrapper to measure outputs of the forward method |
| MEDIUM | tests/sparse_encoder/modules/test_csr.py | 61 | # Create the wrapper and replace the forward method |
| MEDIUM | tests/base/samplers/test_no_duplicates_batch_sampler.py | 39 | # Create a list of two 0's, two 1's, two 2's, ... two 49's. Then shuffle. |
| MEDIUM | tests/base/modules/test_router.py | 683 | # Create a Router with different module configurations for each route |
| MEDIUM | tests/base/modules/test_router.py | 693 | # Create a SentenceTransformer with static_embedding followed by router |
| MEDIUM | tests/base/modules/test_router.py | 67 | # Create a custom ModuleDict subclass to track access |
| MEDIUM | tests/base/modules/test_router.py | 209 | # Create a Router with StaticEmbedding modules |
| MEDIUM | tests/base/modules/test_router.py | 313 | # Create a Router with StaticEmbedding modules |
| MEDIUM | tests/base/modules/test_router.py | 439 | # Create a Router with StaticEmbedding modules |
| MEDIUM | tests/base/modules/test_router.py | 457 | # Create a loss function that works with router |
| MEDIUM | tests/base/modules/test_router.py | 481 | # Create a Router with StaticEmbedding modules |
| MEDIUM | tests/base/modules/test_router.py | 493 | # Create a loss function that works with router |
| MEDIUM | tests/base/modules/test_router.py | 1356 | # Create an object that will fail modality inference |
| MEDIUM | tests/base/modules/test_dense.py | 92 | # Create a Dense layer with custom keys |
| MEDIUM | …/training/data_augmentation/train_sts_indomain_bm25.py | 218 | # Define the training arguments |
| MEDIUM | …/training/data_augmentation/train_sts_indomain_bm25.py | 239 | # Create the trainer & start training |
| MEDIUM | …raining/data_augmentation/train_sts_indomain_nlpaug.py | 137 | # Define the training arguments |
| MEDIUM | …raining/data_augmentation/train_sts_indomain_nlpaug.py | 158 | # Create the trainer & start training |
| MEDIUM | …transformer/training/other/training_batch_hard_trec.py | 45 | # Create a dev set from train set |
| MEDIUM | …ansformer/training/other/training_gooaq_infonce_gor.py | 42 | # Define a custom loss that combines InfoNCE and Global Orthogonal Regularization |
| MEDIUM | …ransformer/training/distillation/model_distillation.py | 111 | # Create a relatively small dataset for evaluation |
| MEDIUM | …ransformer/training/distillation/model_distillation.py | 116 | # Create an STSB evaluator |
| MEDIUM | …ransformer/training/distillation/model_distillation.py | 165 | # Define the training arguments |
| MEDIUM | …ransformer/training/distillation/model_distillation.py | 189 | # Create the trainer & start training |
| MEDIUM | …ing/distillation/model_distillation_layer_reduction.py | 58 | # Create a smaller student model by using only some of the teacher layers |
| MEDIUM | …ing/distillation/model_distillation_layer_reduction.py | 134 | # Create a relatively small dataset for evaluation |
| 36 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …entence_transformer/deprecated_model_card_templates.py | 189 | except Exception as e: |
| MEDIUM | …entence_transformer/deprecated_model_card_templates.py | 160 | def get_train_objective_info(dataloader, loss): |
| LOW | …nsformers/sentence_transformer/evaluation/nano_beir.py | 477 | except Exception as e: |
| LOW | sentence_transformers/util/hard_negatives.py | 457 | except Exception: |
| LOW | sentence_transformers/util/logging.py | 19 | except Exception: |
| MEDIUM | sentence_transformers/util/logging.py | 12 | def emit(self, record) -> None: |
| LOW | sentence_transformers/util/misc.py | 69 | except Exception: |
| LOW | sentence_transformers/util/file_io.py | 192 | except Exception as first_error: |
| LOW | sentence_transformers/util/file_io.py | 249 | except Exception: |
| LOW | sentence_transformers/cross_encoder/model.py | 383 | except Exception as e: |
| LOW | sentence_transformers/cross_encoder/model.py | 387 | except Exception: |
| LOW | …nce_transformers/cross_encoder/evaluation/nano_beir.py | 398 | except Exception as e: |
| LOW | sentence_transformers/sparse_encoder/model.py | 788 | except Exception as e: |
| LOW | sentence_transformers/sparse_encoder/model.py | 792 | except Exception: |
| LOW | sentence_transformers/base/model.py | 754 | except Exception: |
| LOW | sentence_transformers/base/model.py | 920 | except Exception as exc: |
| LOW | sentence_transformers/base/model.py | 1093 | except Exception as exc: |
| LOW | sentence_transformers/base/model.py | 1103 | except Exception: |
| LOW | sentence_transformers/base/trainer.py | 685 | except Exception: |
| LOW | sentence_transformers/base/trainer.py | 690 | except Exception as exc: |
| MEDIUM | sentence_transformers/base/model_card.py | 1424 | def try_to_float(metric_value): |
| LOW | sentence_transformers/base/model_card.py | 1937 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 1945 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 1953 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 1960 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 456 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 851 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 894 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1318 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1387 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1427 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1557 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1565 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1587 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1842 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1894 | except Exception: |
| LOW | sentence_transformers/base/model_card.py | 1905 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 1911 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 1922 | except Exception as exc: |
| LOW | sentence_transformers/base/model_card.py | 495 | except Exception: |
| LOW | sentence_transformers/base/modules/transformer.py | 1735 | except Exception: |
| LOW | tests/cross_encoder/test_model_card.py | 290 | except Exception: |
| LOW | tests/sparse_encoder/test_pretrained.py | 142 | except Exception as e: |
| LOW | tests/sparse_encoder/test_pretrained.py | 153 | except Exception as e: |
| LOW | tests/sparse_encoder/test_pretrained.py | 183 | except Exception as e: |
| LOW | tests/sparse_encoder/test_trainer.py | 127 | except Exception as e: |
| LOW | tests/base/test_model_card.py | 281 | except Exception: |
| LOW | tests/base/test_modality.py | 694 | except Exception as exc: |
| LOW | tests/base/modules/transformer/test_text_generation.py | 86 | except Exception as e: |
| LOW | tests/base/modules/transformer/conftest.py | 193 | except Exception as e: |
| LOW | tests/base/modules/transformer/conftest.py | 686 | except Exception: |
| LOW | tests/base/modules/transformer/test_fill_mask.py | 78 | except Exception as e: |
| LOW | …ts/base/modules/transformer/test_feature_extraction.py | 96 | except Exception as e: |
| LOW | tests/base/modules/transformer/test_any_to_any.py | 106 | except Exception as e: |
| LOW | …se/modules/transformer/test_sequence_classification.py | 87 | except Exception as e: |
| LOW | docs/cross_encoder/training_overview.md | 865 | except Exception: |
| LOW | docs/cross_encoder/training_overview.md | 1069 | except Exception: |
| LOW | …ples/sentence_transformer/training/nli/training_nli.py | 117 | except Exception: |
| LOW | …s/sentence_transformer/training/nli/training_nli_v2.py | 126 | except Exception: |
| LOW | …entence_transformer/training/nli/training_nli_angle.py | 127 | except Exception: |
| 114 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | sentence_transformers/sentence_transformer/trainer.py | 37 | SentenceTransformerTrainer is a simple but feature-complete training and eval loop for PyTorch based on the 🤗 T |
| HIGH | …rmers/sentence_transformer/modules/static_embedding.py | 182 | Creates a StaticEmbedding instance from a distillation process using the `model2vec` package. Args: |
| HIGH | …rmers/sentence_transformer/modules/static_embedding.py | 245 | Create a StaticEmbedding instance from a model2vec model. This method loads a pre-trained model2vec model |
| HIGH | sentence_transformers/util/misc.py | 41 | Import a dotted module path and return the attribute/class designated by the last name in the path. Raise Impor |
| HIGH | sentence_transformers/util/similarity.py | 264 | Converts a similarity function name or enum value to the corresponding similarity function. Args: |
| HIGH | sentence_transformers/util/similarity.py | 302 | Converts a similarity function into a pairwise similarity function. The pairwise similarity function r |
| HIGH | sentence_transformers/util/quantization.py | 31 | Performs semantic search using the FAISS library. Rescoring will be performed if: 1. `rescore` is True |
| HIGH | sentence_transformers/util/quantization.py | 198 | Performs semantic search using the usearch library. Rescoring will be performed if: 1. `rescore` is True |
| HIGH | sentence_transformers/util/file_io.py | 41 | Checks if the given model name or path corresponds to a SentenceTransformer model. Args: model_name_or |
| HIGH | sentence_transformers/util/file_io.py | 82 | Loads a file from a local or remote location. Args: model_name_or_path (str): The model name or path. |
| HIGH | sentence_transformers/util/file_io.py | 141 | Loads the subfolder path for a given model name or path. Args: model_name_or_path (str): The name or p |
| HIGH | sentence_transformers/util/file_io.py | 206 | Download a URL to a local file with a progress bar. The content is streamed in chunks and first written to a tempor |
| HIGH | sentence_transformers/backend/optimize.py | 27 | Export an optimized ONNX model from a SentenceTransformer, SparseEncoder, or CrossEncoder model. The O1-O4 opt |
| HIGH | sentence_transformers/backend/quantize.py | 32 | Export a quantized ONNX model from a SentenceTransformer, SparseEncoder, or CrossEncoder model. This function |
| HIGH | sentence_transformers/backend/quantize.py | 119 | Export a quantized OpenVINO model from a SentenceTransformer, SparseEncoder, or CrossEncoder model. This funct |
| HIGH | sentence_transformers/cross_encoder/model.py | 556 | Performs predictions with the CrossEncoder on the given input pairs. .. tip:: Adjusting ` |
| HIGH | sentence_transformers/base/modality.py | 550 | Infer the modality of a single input sample by inspecting its type/structure. Pure type-based detection, does not r |
| HIGH | sentence_transformers/base/modules/module.py | 311 | A utility function to load the PyTorch weights of a model from a checkpoint. The checkpoint can be either a |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sentence_transformers/sentence_transformer/model.py | 481 | |
| LOW | sentence_transformers/sentence_transformer/model.py | 838 | |
| LOW | sentence_transformers/sentence_transformer/model.py | 903 | |
| LOW | sentence_transformers/sentence_transformer/fit_mixin.py | 63 | |
| LOW | sentence_transformers/sentence_transformer/fit_mixin.py | 407 | |
| LOW | sentence_transformers/sentence_transformer/fit_mixin.py | 465 | |
| LOW | …tence_transformer/losses/multiple_negatives_ranking.py | 235 | |
| LOW | …ransformer/losses/cached_multiple_negatives_ranking.py | 65 | |
| LOW | …ransformer/losses/cached_multiple_negatives_ranking.py | 153 | |
| LOW | …ransformer/losses/cached_multiple_negatives_ranking.py | 425 | |
| LOW | …transformers/sentence_transformer/losses/matryoshka.py | 92 | |
| LOW | …rmers/sentence_transformer/losses/cached_gist_embed.py | 46 | |
| LOW | …tence_transformer/datasets/no_duplicates_dataloader.py | 29 | |
| LOW | …ntence_transformer/evaluation/information_retrieval.py | 299 | |
| LOW | …ntence_transformer/evaluation/information_retrieval.py | 447 | |
| LOW | …formers/sentence_transformer/evaluation/translation.py | 102 | |
| LOW | …s/sentence_transformer/evaluation/paraphrase_mining.py | 245 | |
| LOW | …e_transformers/sentence_transformer/modules/pooling.py | 163 | |
| LOW | …e_transformers/sentence_transformer/modules/pooling.py | 237 | |
| LOW | …rmers/sentence_transformer/modules/tokenizer/phrase.py | 63 | |
| LOW | sentence_transformers/util/hard_negatives.py | 25 | |
| LOW | sentence_transformers/util/deprecated_import.py | 210 | |
| LOW | sentence_transformers/util/quantization.py | 18 | |
| LOW | sentence_transformers/util/quantization.py | 185 | |
| LOW | sentence_transformers/util/quantization.py | 371 | |
| LOW | sentence_transformers/util/retrieval.py | 89 | |
| LOW | sentence_transformers/util/retrieval.py | 167 | |
| LOW | sentence_transformers/util/retrieval.py | 258 | |
| LOW | sentence_transformers/util/environment.py | 40 | |
| LOW | sentence_transformers/util/file_io.py | 205 | |
| LOW | sentence_transformers/util/decorators.py | 92 | |
| LOW | sentence_transformers/util/decorators.py | 115 | |
| LOW | sentence_transformers/backend/utils.py | 155 | |
| LOW | sentence_transformers/cross_encoder/model.py | 279 | |
| LOW | sentence_transformers/cross_encoder/model.py | 353 | |
| LOW | sentence_transformers/cross_encoder/fit_mixin.py | 61 | |
| LOW | sentence_transformers/cross_encoder/fit_mixin.py | 417 | |
| LOW | sentence_transformers/sparse_encoder/model.py | 706 | |
| LOW | …rs/sparse_encoder/evaluation/reciprocal_rank_fusion.py | 105 | |
| LOW | …_transformers/sparse_encoder/modules/splade_pooling.py | 65 | |
| LOW | sentence_transformers/base/model.py | 830 | |
| LOW | sentence_transformers/base/model.py | 1028 | |
| LOW | sentence_transformers/base/modality.py | 231 | |
| LOW | sentence_transformers/base/modality.py | 440 | |
| LOW | sentence_transformers/base/modality.py | 464 | |
| LOW | sentence_transformers/base/data_collator.py | 114 | |
| LOW | sentence_transformers/base/trainer.py | 392 | |
| LOW | sentence_transformers/base/trainer.py | 417 | |
| LOW | sentence_transformers/base/trainer.py | 532 | |
| LOW | sentence_transformers/base/trainer.py | 815 | |
| LOW | sentence_transformers/base/trainer.py | 1206 | |
| LOW | sentence_transformers/base/model_card.py | 429 | |
| LOW | sentence_transformers/base/model_card.py | 512 | |
| LOW | sentence_transformers/base/model_card.py | 594 | |
| LOW | sentence_transformers/base/model_card.py | 696 | |
| LOW | sentence_transformers/base/model_card.py | 792 | |
| LOW | sentence_transformers/base/model_card.py | 1361 | |
| LOW | sentence_transformers/base/model_card.py | 1889 | |
| LOW | sentence_transformers/base/modules/transformer.py | 452 | |
| LOW | sentence_transformers/base/modules/transformer.py | 581 | |
| 31 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …mers/sentence_transformer/losses/batch_hard_triplet.py | 240 | # Check if labels[i] == labels[j] |
| LOW | …mers/sentence_transformer/losses/batch_hard_triplet.py | 254 | # Check if labels[i] != labels[k] |
| LOW | sentence_transformers/util/tensor.py | 23 | # Check if list contains sparse tensors |
| LOW | sentence_transformers/util/retrieval.py | 331 | # Check if we need to increase sort_max_size |
| LOW | sentence_transformers/cross_encoder/model_card.py | 211 | # Check if any pair element is non-text (from usage_examples before asset saving) |
| LOW | …arse_encoder/evaluation/sparse_embedding_similarity.py | 78 | # Print the results |
| LOW | …rse_encoder/evaluation/sparse_information_retrieval.py | 128 | # Print the results |
| LOW | …ansformers/sparse_encoder/evaluation/sparse_triplet.py | 90 | # Print the results |
| LOW | …sformers/sparse_encoder/evaluation/sparse_nano_beir.py | 171 | # Print the results |
| LOW | …rse_encoder/evaluation/sparse_binary_classification.py | 104 | # Print the results |
| LOW | …e_transformers/sparse_encoder/evaluation/sparse_mse.py | 78 | # Print the results |
| LOW | …ormers/sparse_encoder/evaluation/sparse_translation.py | 75 | # Print the results |
| LOW | …sformers/sparse_encoder/evaluation/sparse_reranking.py | 102 | # Print the results |
| LOW | …mers/sparse_encoder/modules/sparse_static_embedding.py | 202 | # Check if we have a JSON path in config |
| LOW | sentence_transformers/base/model.py | 971 | # Check if this is a Sentence Transformer model |
| LOW | sentence_transformers/base/model.py | 1057 | # Check if the config_sentence_transformers.json file exists (exists since v2 of the framework) |
| LOW | sentence_transformers/base/model.py | 1082 | # Check if a readme exists. README is optional metadata; a transient Hub error |
| LOW | sentence_transformers/base/model.py | 1136 | # Check if the `load` method only accepts a single parameter (the path to the local directory). |
| LOW | sentence_transformers/base/model_card.py | 651 | # Check if the model has a tuple modality whose parts all match available columns. |
| LOW | tests/sparse_encoder/utils.py | 26 | # Check if shape matches |
| LOW | tests/sparse_encoder/utils.py | 40 | # Check if indices are the same |
| LOW | tests/sparse_encoder/utils.py | 44 | # Check if values are close |
| LOW | tests/sparse_encoder/test_trainer.py | 116 | # Check if model parameters have changed after training |
| LOW | …sparse_encoder/modules/test_sparse_static_embedding.py | 55 | # Check if embeddings are the same before and after save/load |
| LOW | …sparse_encoder/modules/test_sparse_static_embedding.py | 58 | # Check if SparseStaticEmbedding weights are maintained after loading |
| LOW | …modules/transformer/update_transformers_tiny_models.py | 42 | # Check if the model_id contains the architecture name |
| LOW | …raining/data_augmentation/train_sts_qqp_crossdomain.py | 58 | # Check if the QQP dataset exists. If not, download and extract |
| LOW | …er/training/quora_duplicate_questions/create_splits.py | 510 | ####### Write files for Information Retrieval ##### |
| LOW | …/embedding-quantization/semantic_search_recommended.py | 120 | # Output the results |
| LOW | …transformer/applications/clustering/fast_clustering.py | 32 | # Check if the dataset exists. If not, download and extract |
| LOW | …tions/semantic-search/semantic_search_quora_pytorch.py | 35 | # Check if embedding cache path exists |
| LOW | …tions/semantic-search/semantic_search_quora_pytorch.py | 37 | # Check if the dataset exists. If not, download and extract |
| LOW | …cations/semantic-search/semantic_search_quora_annoy.py | 57 | # Check if embedding cache path exists |
| LOW | …cations/semantic-search/semantic_search_quora_annoy.py | 59 | # Check if the dataset exists. If not, download and extract |
| LOW | …tions/semantic-search/semantic_search_quora_hnswlib.py | 47 | # Check if embedding cache path exists |
| LOW | …tions/semantic-search/semantic_search_quora_hnswlib.py | 49 | # Check if the dataset exists. If not, download and extract |
| LOW | …cations/semantic-search/semantic_search_quora_faiss.py | 61 | # Check if embedding cache path exists |
| LOW | …cations/semantic-search/semantic_search_quora_faiss.py | 63 | # Check if the dataset exists. If not, download and extract |
| LOW | …/cross_encoder/applications/cross_encoder_reranking.py | 41 | # Check if embedding cache path exists |
| LOW | …parse_encoder/evaluation/sparse_reranking_evaluator.py | 53 | # Print the results |
| LOW | …coder/evaluation/sparse_nanobeir_advanced_evaluator.py | 45 | # Print the results |
| LOW | …arse_encoder/evaluation/sparse_similarity_evaluator.py | 31 | # Print the results |
| LOW | …rse_encoder/evaluation/sparse_translation_evaluator.py | 30 | # Print the results |
| LOW | …/sparse_encoder/evaluation/sparse_triplet_evaluator.py | 37 | # Print the results |
| LOW | …parse_encoder/evaluation/sparse_retrieval_evaluator.py | 69 | # Print the results |
| LOW | …sparse_encoder/evaluation/sparse_nanobeir_evaluator.py | 94 | # Print the results |
| LOW | …_encoder/evaluation/sparse_classification_evaluator.py | 58 | # Print the results |
| LOW | …ples/sparse_encoder/evaluation/sparse_mse_evaluator.py | 32 | # Print the results |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …transformers/sentence_transformer/losses/gist_embed.py | 240 | # so the label for anchor[i] is i. This means that we can just use arange |
| LOW | …rmers/sentence_transformer/losses/cached_gist_embed.py | 316 | # so the label for anchor[i] is i. This means that we can just use arange |
| LOW | sentence_transformers/base/trainer.py | 514 | # if loss is nan or inf simply add the average of previous logged losses |
| LOW | sentence_transformers/base/trainer.py | 567 | # would not accept it. If None, we just call the super().log() method without it so that it works with all versi |
| LOW | sentence_transformers/base/trainer.py | 644 | # If the evaluator is not defined, we can just return the output |
| MEDIUM | …applications/parallel-sentence-mining/bitext_mining.py | 27 | # Model we want to use for bitext mining. sentence-transformers/LaBSE achieves state-of-the-art performance |
| MEDIUM | …rmer/applications/parallel-sentence-mining/bucc2018.py | 25 | # Model we want to use for bitext mining. sentence-transformers/LaBSE achieves state-of-the-art performance |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …raining/data_augmentation/train_sts_qqp_crossdomain.py | 107 | # Step 1: Train cross-encoder model with STSbenchmark |
| LOW | …raining/data_augmentation/train_sts_qqp_crossdomain.py | 152 | # Step 2: Label QQP train dataset using cross-encoder (BERT) model |
| LOW | …raining/data_augmentation/train_sts_qqp_crossdomain.py | 177 | # Step 3: Train bi-encoder (SBERT) model with QQP dataset - Augmented SBERT |
| LOW | …/training/data_augmentation/train_sts_indomain_bm25.py | 89 | # Step 1: Train cross-encoder model with (gold) STS benchmark dataset |
| LOW | …/training/data_augmentation/train_sts_indomain_bm25.py | 132 | # Step 2: Label BM25 sampled STSb (silver dataset) using cross-encoder model |
| LOW | …/training/data_augmentation/train_sts_indomain_bm25.py | 190 | # Step 3: Train bi-encoder model with both (gold + silver) STSbenchmark dataset - Augmented SBERT |
| LOW | …ining/data_augmentation/train_sts_indomain_semantic.py | 97 | # Step 1: Train cross-encoder model with STSbenchmark |
| LOW | …ining/data_augmentation/train_sts_indomain_semantic.py | 141 | # Step 2: Find silver pairs to label |
| LOW | …ining/data_augmentation/train_sts_indomain_semantic.py | 205 | # Step 3: Train bi-encoder model with both STSbenchmark and labeled AllNlI - Augmented SBERT |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docs/conf.py | 1 | # Configuration file for the Sphinx documentation builder. |
| LOW | docs/sparse_encoder/training_overview.md | 141 | router = Router.for_query_document( |
| LOW | …ransformer/training/distillation/model_quantization.py | 61 | }, |
| LOW | …transformer/training/multilingual/make_multilingual.py | 81 | # If we want, we can limit the maximum sequence length for the model |
| LOW | …ations/embedding-quantization/semantic_search_faiss.py | 61 | # In the first call we'll provide the `corpus_embeddings` and get the `corpus_index` back, which |
| LOW | …ions/embedding-quantization/semantic_search_usearch.py | 61 | # In the first call we'll provide the `corpus_embeddings` and get the `corpus_index` back, which |
| LOW | …ncoder/training/ms_marco/training_ms_marco_plistmle.py | 101 | # lambda_weight = PListMLELambdaWeight(rank_discount_fn=custom_discount) |
| LOW | examples/cross_encoder/training/distillation/README.md | 61 | # {"corpus_id": 4, "score": 0.91639173}, |
| LOW | .github/workflows/sync-skills.yml | 1 | name: Sync skill to huggingface/skills |
| LOW | …train_sentence_transformer_static_embedding_example.py | 1 | #!/usr/bin/env python3 |
| LOW | …cripts/train_sentence_transformer_with_lora_example.py | 1 | #!/usr/bin/env python3 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …te_questions/application_duplicate_questions_mining.py | 10 | # For demonstration purposes, we limit it to a few questions which all have on duplicate |
| MEDIUM | …ce_transformer/training/prompts/training_nq_prompts.py | 26 | # Feel free to adjust these variables: |