MCPcopy Create free account

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

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

Methodpool_one
(self, embedding: Tensor)
tests/multi_vector_encoder/losses/test_token_pooling.py:305
Functionprepare_dataset
(batch)
examples/sentence_transformer/training/multilingual/make_multilingual.py:129
Methodprepare_loss
( self, loss: Callable[[SparseEncoder], torch.nn.Module] | torch.nn.Module, model: Spa
sentence_transformers/sparse_encoder/trainer.py:172
Methodpreprocess
(self, inputs, **kwargs)
tests/base/test_distributed_evaluation.py:27
Functionpreprocess_docstring
(app, obj_type: str, name: str, obj, options: sphinx.ext.autodoc.Options, lines: list[str])
docs/conf.py:202
Functionpreprocess_fn
(texts, prompt=None, task=None)
tests/base/test_data_collator.py:14
Functionpreprocess_tracker
(texts, prompt=None, **kwargs)
tests/sentence_transformer/test_trainer.py:500
Functionpreprocess_tracker
(texts, prompt=None, **kwargs)
tests/sparse_encoder/test_trainer.py:203
Methodprocess
(max_length, restore_suffix=True)
tests/base/modules/test_transformer.py:1699
Methodprocessor_with_labels
(*args, **kwargs)
tests/base/modules/test_transformer.py:549
Functionpytest_collection_modifyitems
(items: list[pytest.Item])
tests/conftest.py:121
Functionqueries
()
tests/util/test_dataset.py:15
Functionqueries
Return a list of sample queries.
tests/util/test_hard_negatives.py:60
Methodquery_expansion
ColBERT-style query expansion config. See :class:`QueryExpansionConfig`. Validated and normalized on assignment, so re-setting after construct
sentence_transformers/base/modules/transformer.py:1030
Methodraise_boom
(*a, **kw)
tests/base/modules/test_transformer.py:1851
Functionraise_oserror
(*args, **kwargs)
tests/util/test_misc.py:151
Functionrecord
(emb)
tests/multi_vector_encoder/evaluation/test_information_retrieval.py:206
Functionrecord
(a, b, a_mask, b_mask)
tests/util/test_similarity.py:1062
Methodrecord
(distances, lengths, cluster_counts)
tests/multi_vector_encoder/modules/test_token_pooling.py:157
Functionrecord_batch
(batch, **parameters)
tests/test_merging.py:229
Functionrecording_init
(self, *args, **kwargs)
tests/base/test_trainer.py:189
Methodregister_model
(self, model: MultiVectorEncoder)
sentence_transformers/multi_vector_encoder/model_card.py:76
Methodregister_model
(self, model)
sentence_transformers/cross_encoder/model_card.py:154
Methodregister_model
(self, model: SparseEncoder)
sentence_transformers/sparse_encoder/model_card.py:92
Functionregression_loss
(logits: torch.Tensor, labels: torch.Tensor)
tests/sentence_transformer/losses/test_softmax.py:79
Methodreport
(self)
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:343
Functionreranker_bert_tiny_model
(_reranker_bert_tiny_model)
tests/conftest.py:214
Functionreranker_bert_tiny_model_v54
(_reranker_bert_tiny_model_v54)
tests/cross_encoder/conftest.py:26
Functionrestore_cross_encoder_class
trust_remote_code models may patch the CrossEncoder class itself at import time (zeroentropy/zerank-1-small replaces CrossEncoder.to and CrossEnco
tests/cross_encoder/test_pretrained.py:28
Methodrun_usage_snippet
(self)
sentence_transformers/sentence_transformer/model_card.py:90
Methodrun_usage_snippet
(self)
sentence_transformers/multi_vector_encoder/model_card.py:111
Methodrun_usage_snippet
(self)
sentence_transformers/cross_encoder/model_card.py:164
Methodrun_usage_snippet
(self)
sentence_transformers/sparse_encoder/model_card.py:137
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/bow.py:89
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/dropout.py:26
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/weighted_layer_pooling.py:50
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/static_embedding.py:133
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/layer_norm.py:28
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/word_weights.py:69
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/lstm.py:70
Methodsave
(self, output_path: str)
sentence_transformers/sentence_transformer/modules/tokenizer/word.py:412
Methodsave
(self, output_path: str)
sentence_transformers/sentence_transformer/modules/tokenizer/word.py:436
Methodsave
(self, output_path: str)
sentence_transformers/sentence_transformer/modules/tokenizer/phrase.py:104
Methodsave
(self, output_path: str)
sentence_transformers/sentence_transformer/modules/tokenizer/whitespace.py:62
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/multi_vector_encoder/modules/token_pooling.py:205
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/multi_vector_encoder/modules/multi_vector_mask.py:154
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sparse_encoder/modules/sparse_static_embedding.py:99
Methodsave
(self, output_path, safe_serialization: bool = True)
sentence_transformers/sparse_encoder/modules/sparse_auto_encoder.py:222
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sparse_encoder/modules/splade_pooling.py:164
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
tests/base/test_model.py:2007
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
tests/base/modules/test_router.py:56
Methodsave
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
tests/base/modules/test_router.py:605
Methodsave
(self, output_path, *args, safe_serialization=True, **kwargs)
tests/base/modules/test_input_module.py:19
Methodsave
(self, output_path, *args, safe_serialization=True, **kwargs)
tests/base/modules/test_input_module.py:34
Methodsave
(self, output_path, *args, safe_serialization=True, **kwargs)
tests/base/modules/test_input_module.py:44
Functionsave_to_hub_args_decorator
A decorator to update the signature of the :class:`~sentence_transformers.base.model.BaseModel.save_to_hub` method to replace the deprecated
sentence_transformers/util/decorators.py:225
Functionselect_first
(group: merge_methods.TensorGroup)
tests/test_merging.py:134
Methodset_epoch
(self, epoch: int)
sentence_transformers/base/sampler.py:712
Methodset_label_examples
(self, dataset: Dataset)
sentence_transformers/base/model_card.py:961
Methodset_vocab
(self, vocab: Iterable[str])
sentence_transformers/sentence_transformer/modules/tokenizer/word.py:400
Methodset_vocab
(self, vocab: Iterable[str])
sentence_transformers/sentence_transformer/modules/tokenizer/word.py:430
Methodset_widget_examples
We don't set widget examples, but only load the prediction example. This is because the Hugging Face Hub doesn't currently have a Sen
sentence_transformers/cross_encoder/model_card.py:100
Functionsetup
(app: Sphinx)
docs/conf.py:337
Methodsetup_method
(self)
tests/base/test_modality.py:567
Methodsetup_method
(self)
tests/base/test_modality.py:1128
Methodsetup_method
(self)
tests/base/test_modality.py:1224
Functionsimcse_map
(example)
examples/sentence_transformer/unsupervised_learning/SimCSE/train_stsb_simcse.py:40
Methodsimilarity_fn_name
Return the name of the similarity function. If not previously set, accessing this property defaults it to ``"cosine"``.
sentence_transformers/sentence_transformer/model.py:1041
Methodsimilarity_fn_name
The similarity function used by :meth:`similarity` and :meth:`similarity_pairwise`. Set it to ``"meanmaxsim"`` for a model trained with length
sentence_transformers/multi_vector_encoder/model.py:1044
Methodsimilarity_fn_name
Return the name of the similarity function used by :meth:`SparseEncoder.similarity` and :meth:`SparseEncoder.similarity_pairwise`. Returns:
sentence_transformers/sparse_encoder/model.py:842
Methodsimilarity_pairwise
Compute the pairwise similarity between two collections of embeddings, i.e. the similarity between ``embeddings1[i]`` and ``embedding
sentence_transformers/sentence_transformer/model.py:1088
Functionsimilarity_spy
(embeddings1, embeddings2)
tests/util/test_hard_negatives.py:946
Functionsimulate_rank1_world2
Run the rank=1/world=2 gather path in a single process: ``all_gather_with_grad`` prepends a deterministic rank-0 block, and the rank is reported a
tests/sentence_transformer/losses/test_gist_embed.py:37
Functionsimulate_rank1_world2
Monkeypatch the distributed helpers so ``calculate_loss`` runs the rank=1/world=2 gather path in a single process: ``all_gather_with_grad`` prepen
tests/sentence_transformer/losses/test_cached_gist_embed.py:136
Methodsingleton
(distances, lengths, cluster_counts)
tests/multi_vector_encoder/modules/test_token_pooling.py:170
Methodsmart_batching_collate
Transforms a batch from a SmartBatchingDataset to a batch of tensors for the model Here, batch is a list of InputExample instances: [
sentence_transformers/sentence_transformer/fit_mixin.py:441
Methodsmart_batching_collate
(self, batch: list[InputExample])
sentence_transformers/cross_encoder/fit_mixin.py:370
Methodsmart_batching_collate_text_only
(self, batch: list[InputExample])
sentence_transformers/cross_encoder/fit_mixin.py:396
Methodsort_metrics
(key: str)
sentence_transformers/base/model_card.py:1555
Functionsparse_tensors
Create two large sparse tensors of shape (50, 100) each.
tests/util/test_similarity.py:161
Functionsplade_bert_tiny_model
(_splade_bert_tiny_model: SparseEncoder)
tests/conftest.py:228
Methodsplade_pooling_chunk_size
Returns the chunk size of the SpladePooling module, if present. This chunk size is along the sequence length dimension (i.e., number
sentence_transformers/sparse_encoder/model.py:1293
Functionspy
(**kwargs)
tests/sentence_transformer/losses/test_cached_gist_embed.py:370
Functionspy
(**kwargs)
tests/sentence_transformer/losses/test_mega_batch_margin.py:96
Functionspy
(**kwargs)
tests/sentence_transformer/losses/test_gradcache.py:105
Functionspy
(inputs, prompt=None, task=None, **kwargs)
tests/multi_vector_encoder/test_trainer.py:190
Functionspy
(**kwargs)
tests/cross_encoder/losses/test_cached_multiple_negatives_ranking.py:76
Functionspy
(**kwargs)
tests/sparse_encoder/losses/test_cached_splade.py:262
Functionspy
(**kwargs)
tests/base/modules/test_router.py:296
Methodspy
(**kwargs)
tests/base/modules/test_transformer.py:1038
Functionspy_encode
(*args, **kwargs)
tests/sentence_transformer/test_model.py:1036
Functionspy_encode
(*args, **kwargs)
tests/sparse_encoder/test_model.py:281
Functionspy_forward
(*args, **kwargs)
tests/sparse_encoder/test_model.py:315
Methodstart
(self)
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:329
Functionstart_pool
(*args, **kwargs)
tests/base/test_multi_process.py:207
Functionstatic_embedding_model
(static_embedding: StaticEmbedding)
tests/conftest.py:296
Functionstatic_retrieval_mrl_en_v1_model
(_static_retrieval_mrl_en_v1_model: SentenceTransformer)
tests/conftest.py:179
Methodstop
(self)
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:335
Functionstsb_bert_tiny_model
(_stsb_bert_tiny_model: SentenceTransformer)
tests/conftest.py:148
Functionstsb_dataset_dict
()
tests/conftest.py:303
← previousnext →2,101–2,200 of 4,575, ranked by callers