Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/huggingface/sentence-transformers
/ functions
Functions
3,759 in github.com/huggingface/sentence-transformers
⨍
Functions
3,759
◇
Types & classes
446
↳
Endpoints
48
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_lambda.py:15
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_lambda_preprocessed.py:15
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_listnet.py:14
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_listmle.py:14
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_lambda_hard_neg.py:16
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_ranknet.py:17
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_adrmse.py:15
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_bce.py:15
↓ 1 callers
Function
main
()
examples/cross_encoder/training/ms_marco/training_ms_marco_bce_preprocessed.py:14
↓ 1 callers
Function
main
()
examples/cross_encoder/training/rerankers/training_gooaq_bce.py:24
↓ 1 callers
Function
main
()
examples/cross_encoder/training/rerankers/training_gooaq_lambda.py:23
↓ 1 callers
Function
main
()
examples/cross_encoder/training/rerankers/training_nq_bce.py:24
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/distillation/train_splade_msmarco_margin_mse.py:28
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/retrievers/train_csr_nq.py:34
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/retrievers/train_splade_nq.py:32
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/retrievers/train_splade_gooaq.py:32
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/retrievers/train_splade_nq_cached.py:32
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/sts/train_splade_stsbenchmark.py:32
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/quora_duplicate_questions/training_splade_quora.py:36
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/ms_marco/train_splade_msmarco_mnrl.py:30
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/nli/train_splade_nli.py:33
↓ 1 callers
Function
main
()
examples/sparse_encoder/training/peft/train_splade_gooaq_peft.py:34
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_make_multilingual_example.py:175
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_cross_encoder_example.py:106
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sparse_encoder_distillation_example.py:138
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_with_lora_example.py:156
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/mine_hard_negatives.py:133
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_example.py:117
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_matryoshka_example.py:95
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_cross_encoder_distillation_example.py:141
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_multi_vector_encoder_example.py:118
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sparse_encoder_example.py:106
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py:125
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_multi_dataset_example.py:140
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_static_embedding_example.py:149
↓ 1 callers
Function
main
()
skills/train-sentence-transformers/scripts/train_sentence_transformer_distillation_example.py:148
↓ 1 callers
Function
make_loss
()
tests/sentence_transformer/losses/test_cached_gist_embed.py:199
↓ 1 callers
Function
make_modules
()
tests/multi_vector_encoder/test_model.py:1183
↓ 1 callers
Method
map_label
(self, label)
sentence_transformers/sentence_transformer/readers/nli_data.py:56
↓ 1 callers
Method
maybe_warn_about_column_order
Warn the user if the columns are likely not in the expected order.
sentence_transformers/base/data_collator.py:150
↓ 1 callers
Method
method
(self, **kwargs)
tests/util/test_decorators.py:79
↓ 1 callers
Method
next_entry
(self, data_idx)
sentence_transformers/sentence_transformer/datasets/parallel_sentences.py:169
↓ 1 callers
Function
noise_transform
Applies noise by randomly deleting words. WARNING: nltk's tokenization/detokenization is designed primarily for English. For other langu
examples/sentence_transformer/unsupervised_learning/TSDAE/train_askubuntu_tsdae.py:53
↓ 1 callers
Function
noise_transform
Applies noise by randomly deleting words. WARNING: nltk's tokenization/detokenization is designed primarily for English. For other langu
examples/sentence_transformer/unsupervised_learning/TSDAE/train_tsdae_from_file.py:59
↓ 1 callers
Function
noise_transform
Applies noise by randomly deleting words. WARNING: nltk's tokenization/detokenization is designed primarily for English. For other langu
examples/sentence_transformer/unsupervised_learning/TSDAE/train_stsb_tsdae.py:41
↓ 1 callers
Function
normalized_mean_squared_error
:param reconstruction: output of Autoencoder.decode (shape: [batch, n_inputs]) :param original_input: input of Autoencoder.encode (shape: [ba
sentence_transformers/sparse_encoder/losses/csr.py:15
↓ 1 callers
Function
offset_of
(model)
tests/base/modules/test_transformer.py:56
↓ 1 callers
Method
on_evaluate
( self, args: transformers.TrainingArguments, state: TrainerState, control: Tr
sentence_transformers/sentence_transformer/fit_mixin.py:143
↓ 1 callers
Method
on_evaluate
( self, args: CrossEncoderTrainingArguments, state: TrainerState, control: Tra
sentence_transformers/cross_encoder/fit_mixin.py:129
↓ 1 callers
Method
on_init_end
( self, args: BaseTrainingArguments, state: TrainerState, control: TrainerCont
sentence_transformers/base/model_card.py:105
↓ 1 callers
Method
on_model_ready
Hook called once the owning model is fully constructed, with every module, the tokenizer or processor, and any legacy checkpoint fixu
sentence_transformers/base/modules/module.py:389
↓ 1 callers
Method
output_scores
(self, scores)
sentence_transformers/sentence_transformer/evaluation/information_retrieval.py:570
↓ 1 callers
Function
outputs
(cached: bool)
tests/sparse_encoder/losses/test_cached_splade.py:220
↓ 1 callers
Function
paraphrase_mining_embeddings
Given a list of sentences / texts, this function performs paraphrase mining. It compares all sentences against all other sentences and return
sentence_transformers/util/retrieval.py:89
↓ 1 callers
Function
parseGithubButtons
* modified to run programmatically
docs/_static/js/custom.js:28
↓ 1 callers
Function
parse_args
()
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:168
↓ 1 callers
Function
plot_across_dimensions
( model_name_to_dim_to_score: dict[str, dict[int, float]], filename: str, figsize: tuple[float, fl
examples/sentence_transformer/training/matryoshka/matryoshka_eval_stsb.py:69
↓ 1 callers
Method
predict_minibatch
Do forward pass on a minibatch of the input features and return corresponding logits. Pairs are tokenized and moved to the device before the
sentence_transformers/cross_encoder/losses/cached_multiple_negatives_ranking.py:143
↓ 1 callers
Method
prepare_loss
( self, loss: Callable[[BaseModel], torch.nn.Module] | torch.nn.Module, model: BaseMod
sentence_transformers/base/trainer.py:440
↓ 1 callers
Method
preprocess
( self, inputs: list[str], prompt: str | None = None, **kwargs, )
sentence_transformers/sparse_encoder/modules/sparse_static_embedding.py:87
↓ 1 callers
Method
preprocess
Preprocesses the input texts and returns a dictionary of preprocessed features. Args: inputs (Sequence[SingleInput | Pai
sentence_transformers/base/modules/input_module.py:80
↓ 1 callers
Method
preprocess_fn
(texts, prompt=None, task=None, **extra)
tests/base/test_data_collator.py:177
↓ 1 callers
Function
preprocess_function
(examples)
sentence_transformers/backend/quantize.py:194
↓ 1 callers
Function
pretrained_model_score
( model_name, expected_score: float, sts_dataset: Dataset, max_test_samples: int = 100, ca
tests/sentence_transformer/test_pretrained_stsb.py:16
↓ 1 callers
Function
print_similarity_map
(model: MultiVectorEncoder, query: str, document: str, score: float)
examples/multi_vector_encoder/interpretability/text_similarity_map.py:40
↓ 1 callers
Method
query_points
(self, query, **kwargs)
tests/sparse_encoder/test_search_engines.py:101
↓ 1 callers
Method
register_model
(self, model: BaseModel)
sentence_transformers/base/model_card.py:1298
↓ 1 callers
Function
repad_flattened_features
Reverse FA2 input flattening on a features dict, in place. When :class:`Transformer` runs with FA2 unpadding, ``DataCollatorWithFlattening`` flat
sentence_transformers/util/tensor.py:232
↓ 1 callers
Method
report
(self)
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:282
↓ 1 callers
Method
retokenize
(self, sentence_features: dict[str, Tensor])
sentence_transformers/sentence_transformer/losses/denoising_auto_encoder.py:175
↓ 1 callers
Function
row
(name: str, match: str, value: float)
examples/multi_vector_encoder/interpretability/text_similarity_map.py:67
↓ 1 callers
Method
run
(content, max_length, truncation=True)
tests/base/modules/test_transformer.py:1149
↓ 1 callers
Function
run_one
(name: str, dataset: Dataset)
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:395
↓ 1 callers
Function
run_sampler
Run one sampler and print timing + batch count.
examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py:58
↓ 1 callers
Method
save
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/word_embeddings.py:96
↓ 1 callers
Method
save
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/sentence_transformer/modules/pooling.py:333
↓ 1 callers
Method
save
(self, output_path: str, *args, safe_serialization: bool = True, **kwargs)
sentence_transformers/multi_vector_encoder/modules/token_pooling.py:300
↓ 1 callers
Method
save
Save the module to disk. This method should be overridden by subclasses to implement the specific behavior of the module. Args:
sentence_transformers/base/modules/module.py:406
↓ 1 callers
Method
save_tokenizer
Saves the tokenizer to the specified output path. Args: output_path (str): Path to save the tokenizer. **kwa
sentence_transformers/base/modules/input_module.py:131
↓ 1 callers
Function
search
(query, top_k: int = 10, rescore_multiplier: int = 4)
examples/sentence_transformer/applications/embedding-quantization/semantic_search_recommended.py:68
↓ 1 callers
Function
search
(query: str)
examples/multi_vector_encoder/applications/retrieve_rerank.py:37
↓ 1 callers
Function
search
(query: str)
examples/multi_vector_encoder/applications/semantic_search.py:31
↓ 1 callers
Function
search
(query: str)
examples/multi_vector_encoder/interpretability/text_similarity_map.py:103
↓ 1 callers
Function
search_papers
(title, abstract)
examples/sentence_transformer/applications/semantic-search/semantic_search_publications.py:40
↓ 1 callers
Function
semantic_search_elasticsearch
Performs semantic search using sparse embeddings with Elasticsearch. Args: query_embeddings_decoded: List of query embeddings in for
sentence_transformers/sparse_encoder/search_engines.py:164
↓ 1 callers
Function
semantic_search_opensearch
Performs semantic search using sparse embeddings with OpenSearch. Args: query_embeddings_decoded: List of query embeddings in format
sentence_transformers/sparse_encoder/search_engines.py:431
↓ 1 callers
Method
set_adapter
Sets a specific adapter by forcing the model to use that adapter and disable the other adapters. Args: *args:
sentence_transformers/base/peft_mixin.py:85
↓ 1 callers
Method
set_best_model_step
(self, step: int)
sentence_transformers/base/model_card.py:509
↓ 1 callers
Method
set_dim
(self, dim)
sentence_transformers/sentence_transformer/losses/matryoshka.py:46
↓ 1 callers
Method
set_language
(self, language: str | list[str])
sentence_transformers/base/model_card.py:1348
↓ 1 callers
Method
set_layer_idx
(self, layer_idx)
sentence_transformers/sentence_transformer/losses/adaptive_layer.py:33
↓ 1 callers
Method
set_license
(self, license: str)
sentence_transformers/base/model_card.py:1353
↓ 1 callers
Method
set_losses
(self, losses: list[nn.Module])
sentence_transformers/base/model_card.py:478
↓ 1 callers
Method
set_pooling_include_prompt
Sets the `include_prompt` attribute in the pooling layer in the model, if there is one. This is useful for INSTRUCTOR models, as the
sentence_transformers/sentence_transformer/model.py:1221
↓ 1 callers
Method
set_vocab
(self, vocab: Iterable[str])
sentence_transformers/sentence_transformer/modules/tokenizer/word.py:400
↓ 1 callers
Method
set_vocab
(self, vocab: Iterable[str])
sentence_transformers/sentence_transformer/modules/tokenizer/phrase.py:44
↓ 1 callers
Method
set_vocab
(self, vocab: Iterable[str])
sentence_transformers/sentence_transformer/modules/tokenizer/whitespace.py:28
↓ 1 callers
Function
setup_deprecated_module_imports
Install a meta path finder that issues deprecation warnings for deprecated import paths and aliases them to their new locations in ``sys.modules``
sentence_transformers/util/deprecated_import.py:263
↓ 1 callers
Function
setup_logging
Configure logging + TF32. Tees to logs/{RUN_NAME}.log and silences HTTP spam.
skills/train-sentence-transformers/scripts/train_sentence_transformer_make_multilingual_example.py:105
↓ 1 callers
Function
setup_logging
Configure logging + TF32. Tees to logs/{RUN_NAME}.log and silences HTTP spam.
skills/train-sentence-transformers/scripts/train_cross_encoder_example.py:90
← previous
next →
801–900 of 3,759, ranked by callers