MCPcopy Create free account

hub / github.com/huggingface/sentence-transformers / functions

Functions4,575 in github.com/huggingface/sentence-transformers

Functiontest_incorrect_backend
()
tests/cross_encoder/test_backends.py:142
Functiontest_incorrect_backend
()
tests/sparse_encoder/test_backends.py:139
Functiontest_incorrect_string_arguments
(argument_name)
tests/sentence_transformer/test_training_args.py:89
Functiontest_infer_flatten_position_offset
RoBERTa-family embeddings compute positions starting at padding_idx + 1, so flattened inputs need their collator-produced 0-based position_ids shi
tests/base/modules/test_transformer.py:48
Methodtest_infer_modalities_edge_cases_returns_none_for_unknown
Should return None for model types not in _EDGE_CASE_MODALITY_CONFIGS.
tests/base/modules/test_transformer.py:1815
Methodtest_infer_modalities_from_processor_text
Should identify 'text' modality for a tokenizer-based processor.
tests/base/modules/test_transformer.py:1821
Functiontest_inference_free_splade
(inference_free_splade_bert_tiny_model: SparseEncoder)
tests/sparse_encoder/test_model.py:223
Functiontest_inference_free_splade_max_active_dims_routing
(inference_free_splade_bert_tiny_model: SparseEncoder)
tests/sparse_encoder/test_model.py:250
Methodtest_inference_with_supported_modalities
Test inference with each supported modality (single and multi-modal).
tests/base/modules/transformer/test_any_to_any.py:129
Methodtest_inference_with_supported_modalities
Test inference with each supported modality (single and multi-modal).
tests/base/modules/transformer/test_text_generation.py:120
Methodtest_inference_with_supported_modalities
Test inference with each supported modality (single and multi-modal).
tests/base/modules/transformer/test_sequence_classification.py:121
Methodtest_inference_with_supported_modalities
Test inference with each supported modality.
tests/base/modules/transformer/test_fill_mask.py:111
Methodtest_inference_with_supported_modalities
Test inference with each supported modality (single and multi-modal).
tests/base/modules/transformer/test_feature_extraction.py:179
Methodtest_inference_with_supported_modality_pairs
Test inference with pair inputs for each supported modality combination.
tests/base/modules/transformer/test_any_to_any.py:192
Methodtest_inference_with_supported_modality_pairs
Test inference with pair inputs for each supported modality combination.
tests/base/modules/transformer/test_text_generation.py:183
Methodtest_inference_with_supported_modality_pairs
Test inference with pair inputs for each supported modality combination.
tests/base/modules/transformer/test_sequence_classification.py:187
Functiontest_information_retrieval_evaluator
(mve_bert_tiny_model: MultiVectorEncoder)
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:23
Functiontest_information_retrieval_evaluator_rejects_xtr_scoring
XTR's global top-k is incompatible with the evaluator's per-chunk corpus scoring, so an XTR scorer in ``score_functions`` must raise at constructi
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:47
Functiontest_init_args_decorator
( monkeypatch: pytest.MonkeyPatch, in_args: tuple, in_kwargs: dict, out_args: tuple, out_kwargs: dict )
tests/cross_encoder/test_model.py:678
Functiontest_init_does_not_mutate_kwargs
(reranker_bert_tiny_model: CrossEncoder, tmp_path: Path)
tests/cross_encoder/test_model.py:70
Functiontest_init_token_pooling_defaults_and_overrides
(mve_bert_tiny_model, method: str, output: str)
tests/multi_vector_encoder/test_model.py:1600
Functiontest_init_token_pooling_does_not_change_forward
(mve_bert_tiny_model)
tests/multi_vector_encoder/test_model.py:1629
Functiontest_init_token_pooling_is_not_saved
(mve_bert_tiny_model, tmp_path, pooler: str)
tests/multi_vector_encoder/test_model.py:1649
Functiontest_init_truncate_dim
(mve_bert_tiny_model: MultiVectorEncoder, method: str, output: str)
tests/multi_vector_encoder/test_model.py:1547
Functiontest_init_truncate_dim_save_load
(mve_bert_tiny_model: MultiVectorEncoder, tmp_path)
tests/multi_vector_encoder/test_model.py:1573
Functiontest_initialization_with_embedding_dim
(tokenizer: Tokenizer)
tests/sentence_transformer/modules/test_static_embedding.py:33
Functiontest_initialization_with_embedding_weights
(tokenizer: Tokenizer, embedding_weights)
tests/sentence_transformer/modules/test_static_embedding.py:28
Functiontest_input_precision_and_output_cast
(model)
tests/test_merging.py:167
Methodtest_int_column_stats
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/base/test_model_card.py:872
Methodtest_int_ids_resolve_end_to_end
(self)
tests/util/test_dataset.py:492
Methodtest_integer_ids
(self)
tests/util/test_dataset.py:70
Functiontest_intersection
(splade_bert_tiny_model: SparseEncoder)
tests/sparse_encoder/test_model.py:458
Functiontest_invalid_arguments
(model, kwargs, exception)
tests/test_merging.py:385
Methodtest_invalid_backend_error
(self)
tests/base/modules/test_transformer.py:1763
Functiontest_invalid_base_and_arity
(model)
tests/test_merging.py:390
Methodtest_invalid_budget
(self, target: float)
tests/multi_vector_encoder/modules/test_token_pooling.py:496
Methodtest_invalid_config_selection
(self, selection)
tests/cross_encoder/test_model.py:1398
Functiontest_invalid_distance_metric_raises
(stsb_bert_tiny_model: SentenceTransformer)
tests/sentence_transformer/losses/test_embed_distill.py:18
Methodtest_invalid_message_skipped
(self)
tests/base/test_modality.py:550
Methodtest_invalid_modality_config_missing_method
(self)
tests/base/modules/test_transformer.py:524
Methodtest_invalid_modality_config_missing_output_name
(self)
tests/base/modules/test_transformer.py:532
Methodtest_invalid_output_format_rejected
(self, documents: Dataset)
tests/util/test_dataset.py:305
Methodtest_invalid_threshold
(self, threshold: float)
tests/multi_vector_encoder/modules/test_token_pooling.py:486
Methodtest_invalid_transformer_task
(self)
tests/base/modules/test_transformer.py:116
Functiontest_io_nameless_dense_config_defaults_to_token_level
Dense configs that predate module IO names (PyLate / pre-v5.4 ST saves) load token-level via ``_get_module_init_defaults``, keyed on the saved con
tests/multi_vector_encoder/test_model.py:867
Methodtest_ir_cross_column_deduplicates_documents
IR model should deduplicate documents from the second column.
tests/sentence_transformer/test_model_card.py:303
Methodtest_ir_cross_column_sourcing
IR model should source query from first column and documents from second column.
tests/sentence_transformer/test_model_card.py:275
Methodtest_ir_default_examples
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/sentence_transformer/test_model_card.py:209
Functiontest_ir_evaluator_chunk_elements_reaches_scoring
The budget is bound onto the model-resolved scorer and actually invoked: a one-document-per- chunk budget must score identically to the default.
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:95
Functiontest_ir_evaluator_defers_scoring_resolution_to_call_time
Default scoring resolves from the evaluated model's ``similarity_fn_name`` inside ``__call__``, not eagerly at init: a model carrying a different
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:70
Functiontest_ir_evaluator_rejects_chunk_elements_with_score_functions
chunk_elements only configures the default model-resolved scoring, so pairing it with score_functions raises instead of being silently ignored.
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:167
Functiontest_ir_evaluator_rejects_compiled_xtr_scoring
The XTR rejection must not be evaded by torch.compile, which the XTR docstring itself recommends for the hot path.
tests/multi_vector_encoder/test_model.py:1151
Methodtest_ir_evaluator_sets_ir_model
(self, evaluator_factory)
tests/base/test_model_card.py:1577
Functiontest_ir_evaluator_token_pooling_matches_pipeline_pooling
(mve_bert_tiny_model: MultiVectorEncoder)
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:192
Functiontest_ir_evaluator_truncate_dim_matches_manual_truncation
(mve_bert_tiny_model: MultiVectorEncoder)
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:224
Functiontest_ir_evaluator_warns_when_explicit_prompt_replaces_model_prompt
An explicit query_prompt replaces the model's registered marker prompt instead of composing with it, so the evaluator warns once.
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:113
Methodtest_ir_snippet_shapes
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/sentence_transformer/test_model_card.py:218
Methodtest_ir_snippet_structure
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/sentence_transformer/test_model_card.py:194
Methodtest_ir_with_similarities
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/sentence_transformer/test_model_card.py:229
Functiontest_is_dist_initialized_returns_false_when_distributed_unavailable
(monkeypatch: pytest.MonkeyPatch)
tests/util/test_environment.py:32
Functiontest_is_singular_input_conversation
A bare conversation (list of role/content message dicts) is one input, not a batch.
tests/base/test_model.py:1817
Functiontest_is_singular_input_conversation_batch
A list of conversations is a batch, and non-message dicts do not trigger the conversation rule.
tests/base/test_model.py:1827
Functiontest_is_singular_input_list
A list input should be a batch (not singular).
tests/base/test_model.py:1807
Functiontest_is_singular_input_numpy
A numeric numpy array should be singular (treated as an audio waveform).
tests/base/test_model.py:1835
Functiontest_is_singular_input_numpy_0d_string
A 0-dim numpy string array represents a single text.
tests/base/test_model.py:1867
Functiontest_is_singular_input_numpy_1d_pair
A 1D numpy string array represents a single (query, document) pair.
tests/cross_encoder/test_model.py:284
Functiontest_is_singular_input_numpy_1d_strings
A 1D numpy string array is a batch of texts (e.g. from np.unique), not a single audio input.
tests/base/test_model.py:1845
Functiontest_is_singular_input_numpy_2d_pairs
A 2D numpy string array is a batch of pairs.
tests/cross_encoder/test_model.py:289
Functiontest_is_singular_input_numpy_2d_strings
A 2D numpy string array is a batch of text pairs.
tests/base/test_model.py:1851
Functiontest_is_singular_input_numpy_bytes
A numpy byte-string array is not treated as a text batch (downstream modality inference does not handle Python ``bytes``), so it falls through to
tests/base/test_model.py:1856
Functiontest_is_singular_input_numpy_empty
An empty 1D string ndarray is an empty batch, not a singular pair, matching ``predict([])``.
tests/cross_encoder/test_model.py:294
Functiontest_is_singular_input_numpy_object
A numpy object array is a batch (no valid single-sample type is an object ndarray).
tests/base/test_model.py:1862
Functiontest_is_singular_input_string
A string input should be singular.
tests/base/test_model.py:1802
Functiontest_is_singular_input_tensor
A torch tensor should be singular (not a list type).
tests/base/test_model.py:1840
Functiontest_is_singular_input_tuple
A tuple input should be a batch (not singular).
tests/base/test_model.py:1812
Functiontest_jina_clip
()
tests/sentence_transformer/test_custom_models.py:75
Functiontest_jina_embeddings_v3
()
tests/sentence_transformer/test_custom_models.py:60
Methodtest_kd_shape_explodes_lists_into_numbered_columns
(self, queries: Dataset, documents: Dataset)
tests/util/test_dataset.py:25
Methodtest_kd_shape_with_string_encoded_ids_and_scores
(self, queries: Dataset, documents: Dataset)
tests/util/test_dataset.py:128
Methodtest_kept_column_collision_raises
(self, documents: Dataset)
tests/util/test_dataset.py:357
Methodtest_known_model_type
(self, model_type)
tests/base/test_modality.py:436
Methodtest_kwargs_forward_excludes_bookkeeping_keys
When forward accepts ``**kwargs`` (``model_forward_params is None``), forward() passes the real model inputs but drops ST bookkeeping and toke
tests/base/modules/test_transformer.py:1010
Methodtest_kwargs_forward_keeps_bookkeeping_keys_the_model_declares
A custom model whose forward names a bookkeeping key wants it (e.g. task adapters keyed on ``task``), so the denylist must yield to an explici
tests/base/modules/test_transformer.py:1060
Methodtest_label_column_extracted
(self)
tests/base/test_data_collator.py:41
Functiontest_labeled_list_output_scores_match_similarity
Verify that labeled-list scores match recomputed query-passage similarity for all items. Runs over both the single- and multiple-positive dataset
tests/util/test_hard_negatives.py:859
Functiontest_labeled_pair_output_scores_match_similarity
Verify that labeled-pair scores match recomputed query-passage similarity. Runs over both the single- and multiple-positive datasets.
tests/util/test_hard_negatives.py:825
Methodtest_lambda_pooling_with_lambda_does_not_pickle
(self)
tests/multi_vector_encoder/modules/test_token_pooling.py:320
Methodtest_lambda_pooling_with_top_level_func_pickles
(self)
tests/multi_vector_encoder/modules/test_token_pooling.py:312
Methodtest_large_model_roundtrip
( self, tmp_path: Path, model_name: str, expected_class_name: str, extra_kwargs: dict )
tests/base/modules/test_transformer.py:2184
Functiontest_larger_dataset_with_combinations
Test with a larger dataset and challenging parameter combinations.
tests/util/test_hard_negatives.py:1529
Methodtest_left_pad_middle_zero_preserved_no_mask
(self)
tests/multi_vector_encoder/modules/test_token_pooling.py:668
Functiontest_legacy_mlm_transformer
(splade_bert_tiny_model, tmp_path, legacy_first, method)
tests/test_merging.py:452
Functiontest_legacy_model_module_paths
(tmp_path: Path, external: bool)
tests/base/test_model.py:2257
Functiontest_legacy_router_module_paths
(tmp_path: Path, external: bool)
tests/base/modules/test_router.py:1593
Functiontest_len_matches_iteration
(balanced_dataset: Dataset)
tests/base/samplers/test_group_by_label_batch_sampler.py:86
Functiontest_len_matches_iteration_remainder_of_two
When stream_length % batch_size == 2, __len__ and __iter__ must agree. 2 labels with 6 and 4 samples -> stream_length=8, batch_size=6 -> remainde
tests/base/samplers/test_group_by_label_batch_sampler.py:95
Functiontest_linear_merge_and_roundtrip
(model, tmp_path)
tests/test_merging.py:40
Methodtest_list_column_all_same_length
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/base/test_model_card.py:901
Methodtest_list_column_varying_lengths
(self, stsb_bert_tiny_model: SentenceTransformer)
tests/base/test_model_card.py:910
Methodtest_list_input_returns_list
(self)
tests/multi_vector_encoder/modules/test_token_pooling.py:57
← previousnext →3,001–3,100 of 4,575, ranked by callers