SYMBOL INDEX (253 symbols across 68 files) FILE: docs/_static/js/custom.js function addGithubButton (line 1) | function addGithubButton() { function parseGithubButtons (line 28) | function parseGithubButtons (){"use strict";var e=window.document,t=e.lo... function onLoad (line 32) | function onLoad() { FILE: docs/conf.py function linkcode_resolve (line 123) | def linkcode_resolve(domain, info): function visit_download_reference (line 159) | def visit_download_reference(self, node): function setup (line 182) | def setup(app: Sphinx): FILE: examples/cross_encoder/training/distillation/train_cross_encoder_kd_margin_mse.py function main (line 13) | def main(): FILE: examples/cross_encoder/training/distillation/train_cross_encoder_kd_mse.py function main (line 13) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_bce.py function main (line 15) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_bce_preprocessed.py function main (line 14) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_cmnrl.py function main (line 19) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_lambda.py function main (line 15) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_lambda_hard_neg.py function main (line 16) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_lambda_preprocessed.py function main (line 15) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_listmle.py function main (line 14) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_listnet.py function main (line 14) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_plistmle.py function main (line 14) | def main(): FILE: examples/cross_encoder/training/ms_marco/training_ms_marco_ranknet.py function main (line 17) | def main(): FILE: examples/cross_encoder/training/rerankers/training_gooaq_bce.py function main (line 23) | def main(): FILE: examples/cross_encoder/training/rerankers/training_gooaq_lambda.py function main (line 22) | def main(): FILE: examples/cross_encoder/training/rerankers/training_nq_bce.py function main (line 23) | def main(): FILE: examples/sentence_transformer/applications/embedding-quantization/semantic_search_recommended.py function search (line 68) | def search(query, top_k: int = 10, rescore_multiplier: int = 4): FILE: examples/sentence_transformer/applications/parallel-sentence-mining/bitext_mining_utils.py function score (line 18) | def score(x, y, fwd_mean, bwd_mean, margin): function score_candidates (line 22) | def score_candidates(x, y, candidate_inds, fwd_mean, bwd_mean, margin): function kNN (line 31) | def kNN(x, y, k, use_ann_search=False, ann_num_clusters=32768, ann_num_c... function file_open (line 52) | def file_open(filepath): FILE: examples/sentence_transformer/applications/semantic-search/semantic_search_nq_opensearch.py function create_and_ingest_index (line 51) | def create_and_ingest_index(os_client, index_name, corpus, embeddings): FILE: examples/sentence_transformer/applications/semantic-search/semantic_search_publications.py function search_papers (line 39) | def search_papers(title, abstract): FILE: examples/sentence_transformer/applications/text-summarization/LexRank.py function degree_centrality_scores (line 15) | def degree_centrality_scores( function _power_method (line 43) | def _power_method(transition_matrix, increase_power=True, max_iter=10000): function connected_nodes (line 66) | def connected_nodes(matrix): function create_markov_matrix (line 78) | def create_markov_matrix(weights_matrix): function create_markov_matrix_discrete (line 92) | def create_markov_matrix_discrete(weights_matrix, threshold): function stationary_distribution (line 100) | def stationary_distribution( FILE: examples/sentence_transformer/evaluation/evaluation_no_dup_batch_sampler_speed.py function run_sampler (line 58) | def run_sampler( function parse_args (line 168) | def parse_args() -> argparse.Namespace: function _iter_texts (line 207) | def _iter_texts(value: object) -> list[str]: function _format_bytes (line 214) | def _format_bytes(value: int) -> str: class _RssReport (line 225) | class _RssReport: method __init__ (line 226) | def __init__(self, start_rss: int, end_rss: int, peak_rss: int) -> None: class _RssSampler (line 234) | class _RssSampler: method __init__ (line 237) | def __init__(self, interval: float = 0.1) -> None: method _total_rss (line 245) | def _total_rss(self) -> int: method _run (line 261) | def _run(self) -> None: method start (line 268) | def start(self) -> None: method stop (line 274) | def stop(self) -> None: method report (line 282) | def report(self) -> _RssReport: class _UssReport (line 286) | class _UssReport: method __init__ (line 287) | def __init__(self, start_uss: int, end_uss: int, peak_uss: int) -> None: class _UssSampler (line 295) | class _UssSampler: method __init__ (line 298) | def __init__(self, interval: float = 0.1) -> None: method _total_uss (line 306) | def _total_uss(self) -> int: method _run (line 322) | def _run(self) -> None: method start (line 329) | def start(self) -> None: method stop (line 335) | def stop(self) -> None: method report (line 343) | def report(self) -> _UssReport: function _dup_stats (line 347) | def _dup_stats(dataset: Dataset, show_progress: bool, desc: str) -> tupl... function compute_uniqueness (line 388) | async def compute_uniqueness( function _load_hf_dataset (line 412) | def _load_hf_dataset(name: str, subset: str | None, split: str) -> Dataset: function main (line 419) | def main() -> None: FILE: examples/sentence_transformer/training/clip/training_clip_flickr8k_mlflow.py function to_binary_flickr8k (line 25) | def to_binary_flickr8k(batch: dict) -> dict: FILE: examples/sentence_transformer/training/data_augmentation/train_sts_seed_optimization.py class SeedTestingEarlyStoppingCallback (line 106) | class SeedTestingEarlyStoppingCallback(TrainerCallback): method __init__ (line 107) | def __init__(self, num_steps_until_stop: int): method on_step_end (line 110) | def on_step_end( FILE: examples/sentence_transformer/training/distillation/model_distillation.py function combine_sentences (line 66) | def combine_sentences(batch): function deduplicate (line 76) | def deduplicate(dataset): function map_embeddings (line 145) | def map_embeddings(batch): FILE: examples/sentence_transformer/training/distillation/model_distillation_layer_reduction.py function combine_sentences (line 85) | def combine_sentences(batch): function deduplicate (line 95) | def deduplicate(dataset): function map_embeddings (line 129) | def map_embeddings(batch): FILE: examples/sentence_transformer/training/distillation/model_quantization.py function evaluate (line 111) | def evaluate(model: SentenceTransformer, name: str) -> None: FILE: examples/sentence_transformer/training/hpo/hpo_nli.py function hpo_search_space (line 28) | def hpo_search_space(trial): function hpo_model_init (line 38) | def hpo_model_init(trial): function hpo_loss_init (line 43) | def hpo_loss_init(model): function hpo_compute_objective (line 48) | def hpo_compute_objective(metrics): FILE: examples/sentence_transformer/training/matryoshka/matryoshka_eval_stsb.py function _grouped_barplot_ratios (line 23) | def _grouped_barplot_ratios(group_name_to_x_to_y: dict[str, dict[int, fl... function plot_across_dimensions (line 72) | def plot_across_dimensions( FILE: examples/sentence_transformer/training/ms_marco/train-kldiv.py function main (line 23) | def main(): FILE: examples/sentence_transformer/training/ms_marco/train-margin-mse.py function main (line 23) | def main(): FILE: examples/sentence_transformer/training/ms_marco/train_bi-encoder_margin-mse.py class MSMARCODataset (line 197) | class MSMARCODataset(Dataset): method __init__ (line 198) | def __init__(self, queries, corpus, ce_scores): method __getitem__ (line 209) | def __getitem__(self, item): method __len__ (line 233) | def __len__(self): FILE: examples/sentence_transformer/training/ms_marco/train_bi-encoder_mnrl.py class MSMARCODataset (line 217) | class MSMARCODataset(Dataset): method __init__ (line 218) | def __init__(self, queries, corpus): method __getitem__ (line 228) | def __getitem__(self, item): method __len__ (line 242) | def __len__(self): FILE: examples/sentence_transformer/training/multilingual/make_multilingual.py function prepare_dataset (line 128) | def prepare_dataset(batch): FILE: examples/sentence_transformer/training/other/training_batch_hard_trec.py function trec_dataset (line 37) | def trec_dataset( function triplets_from_labeled_dataset (line 58) | def triplets_from_labeled_dataset(dataset): FILE: examples/sentence_transformer/training/other/training_gooaq_infonce_gor.py class InfoNCEGORLoss (line 40) | class InfoNCEGORLoss(torch.nn.Module): method __init__ (line 49) | def __init__(self, model: SentenceTransformer, similarity_fct=cos_sim,... method forward (line 55) | def forward( FILE: examples/sentence_transformer/training/quora_duplicate_questions/create_splits.py function get_duplicate_set (line 389) | def get_duplicate_set(ids_set): function write_qids (line 454) | def write_qids(name, ids_list): function write_mining_files (line 466) | def write_mining_files(name, ids, dups): FILE: examples/sentence_transformer/unsupervised_learning/CT/train_askubuntu_ct.py function to_ct_pairs (line 51) | def to_ct_pairs(sample, pos_neg_ratio=8): FILE: examples/sentence_transformer/unsupervised_learning/CT/train_ct_from_file.py function to_ct_pairs (line 75) | def to_ct_pairs(sample, pos_neg_ratio=8): FILE: examples/sentence_transformer/unsupervised_learning/CT/train_stsb_ct.py function to_ct_pairs (line 36) | def to_ct_pairs(sample, pos_neg_ratio=8): FILE: examples/sentence_transformer/unsupervised_learning/MLM/train_mlm.py class TokenizedSentencesDataset (line 80) | class TokenizedSentencesDataset: method __init__ (line 81) | def __init__(self, sentences, tokenizer, max_length, cache_tokenizatio... method __getitem__ (line 87) | def __getitem__(self, item): method __len__ (line 107) | def __len__(self): FILE: examples/sentence_transformer/unsupervised_learning/SimCSE/train_stsb_simcse.py function simcse_map (line 42) | def simcse_map(example): FILE: examples/sentence_transformer/unsupervised_learning/TSDAE/train_askubuntu_tsdae.py function noise_transform (line 51) | def noise_transform(batch, del_ratio=0.6): FILE: examples/sentence_transformer/unsupervised_learning/TSDAE/train_stsb_tsdae.py function noise_transform (line 39) | def noise_transform(batch, del_ratio=0.6): FILE: examples/sentence_transformer/unsupervised_learning/TSDAE/train_tsdae_from_file.py function noise_transform (line 57) | def noise_transform(batch, del_ratio=0.6): FILE: examples/sparse_encoder/applications/computing_embeddings/compute_embeddings.py function get_memory_size (line 77) | def get_memory_size(tensor): FILE: examples/sparse_encoder/training/distillation/train_splade_msmarco_margin_mse.py function main (line 26) | def main(): FILE: examples/sparse_encoder/training/ms_marco/train_splade_msmarco_mnrl.py function main (line 28) | def main(): FILE: examples/sparse_encoder/training/nli/train_splade_nli.py function main (line 31) | def main(): FILE: examples/sparse_encoder/training/peft/train_splade_gooaq_peft.py function main (line 32) | def main(): FILE: examples/sparse_encoder/training/quora_duplicate_questions/training_splade_quora.py function main (line 31) | def main(): FILE: examples/sparse_encoder/training/retrievers/train_csr_nq.py function main (line 32) | def main(): FILE: examples/sparse_encoder/training/retrievers/train_splade_gooaq.py function main (line 30) | def main(): FILE: examples/sparse_encoder/training/retrievers/train_splade_nq.py function main (line 30) | def main(): FILE: examples/sparse_encoder/training/retrievers/train_splade_nq_cached.py function main (line 30) | def main(): FILE: examples/sparse_encoder/training/sts/train_splade_stsbenchmark.py function main (line 30) | def main(): FILE: sentence_transformers/LoggingHandler.py class LoggingHandler (line 8) | class LoggingHandler(logging.Handler): method __init__ (line 9) | def __init__(self, level=logging.NOTSET) -> None: method emit (line 12) | def emit(self, record) -> None: function install_logger (line 23) | def install_logger(given_logger, level=logging.WARNING, fmt="%(levelname... FILE: sentence_transformers/SentenceTransformer.py class SentenceTransformer (line 61) | class SentenceTransformer(nn.Sequential, FitMixin, PeftAdapterMixin): method __init__ (line 167) | def __init__( method get_backend (line 408) | def get_backend(self) -> Literal["torch", "onnx", "openvino"]: method get_model_kwargs (line 416) | def get_model_kwargs(self) -> list[str]: method encode_query (line 446) | def encode_query( method encode_document (line 581) | def encode_document( method encode (line 721) | def encode( method encode (line 743) | def encode( method encode (line 765) | def encode( method encode (line 786) | def encode( method encode (line 807) | def encode( method encode (line 828) | def encode( method encode (line 849) | def encode( method encode (line 869) | def encode( method forward (line 1179) | def forward(self, input: dict[str, Tensor], **kwargs) -> dict[str, Ten... method similarity_fn_name (line 1197) | def similarity_fn_name(self) -> Literal["cosine", "dot", "euclidean", ... method similarity_fn_name (line 1214) | def similarity_fn_name( method similarity (line 1226) | def similarity(self, embeddings1: Tensor, embeddings2: Tensor) -> Tens... method similarity (line 1229) | def similarity(self, embeddings1: npt.NDArray[np.float32], embeddings2... method similarity (line 1232) | def similarity(self) -> Callable[[Tensor | npt.NDArray[np.float32], Te... method similarity_pairwise (line 1276) | def similarity_pairwise(self, embeddings1: Tensor, embeddings2: Tensor... method similarity_pairwise (line 1279) | def similarity_pairwise( method similarity_pairwise (line 1284) | def similarity_pairwise( method start_multi_process_pool (line 1322) | def start_multi_process_pool( method stop_multi_process_pool (line 1372) | def stop_multi_process_pool(pool: dict[Literal["input", "output", "pro... method encode_multi_process (line 1396) | def encode_multi_process( method _encode_multi_process (line 1487) | def _encode_multi_process( method _encode_multi_process_worker (line 1553) | def _encode_multi_process_worker( method set_pooling_include_prompt (line 1576) | def set_pooling_include_prompt(self, include_prompt: bool) -> None: method _get_prompt_length (line 1594) | def _get_prompt_length(self, prompt: str, **kwargs) -> int: method get_max_seq_length (line 1615) | def get_max_seq_length(self) -> int | None: method tokenize (line 1627) | def tokenize(self, texts: list[str] | list[dict] | list[tuple[str, str... method get_sentence_features (line 1643) | def get_sentence_features(self, *features) -> dict[Literal["sentence_e... method get_sentence_embedding_dimension (line 1646) | def get_sentence_embedding_dimension(self) -> int | None: method truncate_sentence_embeddings (line 1666) | def truncate_sentence_embeddings(self, truncate_dim: int | None) -> It... method _first_module (line 1695) | def _first_module(self) -> torch.nn.Module: method _last_module (line 1699) | def _last_module(self) -> torch.nn.Module: method save (line 1703) | def save( method save_pretrained (line 1796) | def save_pretrained( method _update_default_model_id (line 1824) | def _update_default_model_id(self, model_card): method _create_model_card (line 1832) | def _create_model_card( method save_to_hub (line 1872) | def save_to_hub( method push_to_hub (line 1936) | def push_to_hub( method _text_length (line 2054) | def _text_length(self, text: list[int] | list[list[int]]) -> int: method evaluate (line 2070) | def evaluate(self, evaluator: SentenceEvaluator, output_path: str | No... method _load_auto_model (line 2085) | def _load_auto_model( method _load_module_class_from_ref (line 2143) | def _load_module_class_from_ref( method _load_sbert_model (line 2171) | def _load_sbert_model( method load (line 2354) | def load(input_path) -> SentenceTransformer: method device (line 2358) | def device(self) -> device: method tokenizer (line 2386) | def tokenizer(self) -> Any: method tokenizer (line 2393) | def tokenizer(self, value) -> None: method max_seq_length (line 2400) | def max_seq_length(self) -> int: method max_seq_length (line 2419) | def max_seq_length(self, value) -> None: method transformers_model (line 2426) | def transformers_model(self) -> PreTrainedModel | None: method _target_device (line 2453) | def _target_device(self) -> torch.device: method _target_device (line 2460) | def _target_device(self, device: int | str | torch.device | None = Non... method dtype (line 2464) | def dtype(self) -> torch.dtype | None: method _no_split_modules (line 2471) | def _no_split_modules(self) -> list[str]: method _keys_to_ignore_on_save (line 2478) | def _keys_to_ignore_on_save(self) -> list[str]: method gradient_checkpointing_enable (line 2484) | def gradient_checkpointing_enable(self, gradient_checkpointing_kwargs=... method _get_model_type (line 2490) | def _get_model_type( FILE: sentence_transformers/backend/load.py function load_onnx_model (line 14) | def load_onnx_model(model_name_or_path: str, config: PretrainedConfig, t... function load_openvino_model (line 90) | def load_openvino_model(model_name_or_path: str, config: PretrainedConfi... FILE: sentence_transformers/backend/optimize.py function export_optimized_onnx_model (line 19) | def export_optimized_onnx_model( FILE: sentence_transformers/backend/quantize.py function export_dynamic_quantized_onnx_model (line 24) | def export_dynamic_quantized_onnx_model( function export_static_quantized_openvino_model (line 124) | def export_static_quantized_openvino_model( FILE: sentence_transformers/backend/utils.py function _save_pretrained_wrapper (line 21) | def _save_pretrained_wrapper(_save_pretrained_fn: Callable, subfolder: s... function backend_should_export (line 40) | def backend_should_export( function backend_warn_to_save (line 138) | def backend_warn_to_save(model_name_or_path: str, is_local: bool, backen... function save_or_push_to_hub_model (line 155) | def save_or_push_to_hub_model( FILE: sentence_transformers/cross_encoder/CrossEncoder.py function _save_pretrained_wrapper (line 46) | def _save_pretrained_wrapper(_save_pretrained_fn: Callable, subfolder: s... class CrossEncoder (line 54) | class CrossEncoder(nn.Module, PushToHubMixin, FitMixin): method __init__ (line 125) | def __init__( method _load_model (line 235) | def _load_model( method get_backend (line 265) | def get_backend(self) -> Literal["torch", "onnx", "openvino"]: method start_multi_process_pool (line 273) | def start_multi_process_pool( method stop_multi_process_pool (line 324) | def stop_multi_process_pool(pool: dict[Literal["input", "output", "pro... method _multi_process (line 344) | def _multi_process( method _multi_process_worker (line 423) | def _multi_process_worker( method set_activation_fn (line 460) | def set_activation_fn(self, activation_fn: Callable | None, set_defaul... method get_default_activation_fn (line 469) | def get_default_activation_fn(self) -> Callable: method set_config_value (line 495) | def set_config_value(self, key: str, value) -> None: method config (line 511) | def config(self) -> PretrainedConfig: method num_labels (line 515) | def num_labels(self) -> int: method max_length (line 519) | def max_length(self) -> int: method max_length (line 523) | def max_length(self, value: int) -> None: method default_activation_function (line 531) | def default_activation_function(self) -> Callable: method forward (line 534) | def forward(self, *args, **kwargs): method predict (line 538) | def predict( method predict (line 553) | def predict( method predict (line 568) | def predict( method predict (line 583) | def predict( method predict (line 599) | def predict( method rank (line 744) | def rank( method save (line 856) | def save(self, path: str, *, safe_serialization: bool = True, **kwargs... method save_pretrained (line 869) | def save_pretrained(self, path: str, *, safe_serialization: bool = Tru... method _create_model_card (line 884) | def _create_model_card(self, path: str) -> None: method push_to_hub (line 919) | def push_to_hub( method transformers_model (line 1000) | def transformers_model(self) -> PreTrainedModel | None: method _target_device (line 1024) | def _target_device(self) -> torch.device: method _target_device (line 1031) | def _target_device(self, device: int | str | torch.device | None = Non... method device (line 1035) | def device(self) -> torch.device: method gradient_checkpointing_enable (line 1038) | def gradient_checkpointing_enable(self, gradient_checkpointing_kwargs=... FILE: sentence_transformers/cross_encoder/data_collator.py class CrossEncoderDataCollator (line 13) | class CrossEncoderDataCollator(SentenceTransformerDataCollator): method __call__ (line 29) | def __call__(self, features: list[dict[str, Any]]) -> dict[str, torch.... FILE: sentence_transformers/cross_encoder/evaluation/deprecated.py class CEBinaryAccuracyEvaluator (line 16) | class CEBinaryAccuracyEvaluator(CrossEncoderClassificationEvaluator): method from_input_examples (line 22) | def from_input_examples(cls, examples: list[InputExample], **kwargs): class CEBinaryClassificationEvaluator (line 37) | class CEBinaryClassificationEvaluator(CrossEncoderClassificationEvaluator): method from_input_examples (line 43) | def from_input_examples(cls, examples: list[InputExample], **kwargs): class CEF1Evaluator (line 58) | class CEF1Evaluator(CrossEncoderClassificationEvaluator): method from_input_examples (line 64) | def from_input_examples(cls, examples: list[InputExample], **kwargs): class CESoftmaxAccuracyEvaluator (line 79) | class CESoftmaxAccuracyEvaluator(CrossEncoderClassificationEvaluator): method from_input_examples (line 85) | def from_input_examples(cls, examples: list[InputExample], **kwargs): class CECorrelationEvaluator (line 99) | class CECorrelationEvaluator(CrossEncoderCorrelationEvaluator): class CERerankingEvaluator (line 107) | class CERerankingEvaluator(CrossEncoderRerankingEvaluator): FILE: sentence_transformers/cross_encoder/losses/CachedMultipleNegativesRankingLoss.py class RandContext (line 16) | class RandContext: method __init__ (line 24) | def __init__(self, *tensors) -> None: method __enter__ (line 28) | def __enter__(self) -> None: method __exit__ (line 34) | def __exit__(self, exc_type, exc_val, exc_tb) -> None: function _backward_hook (line 39) | def _backward_hook( class CachedMultipleNegativesRankingLoss (line 62) | class CachedMultipleNegativesRankingLoss(MultipleNegativesRankingLoss): method __init__ (line 63) | def __init__( method predict_minibatch (line 186) | def predict_minibatch( method predict_minibatch_iter (line 202) | def predict_minibatch_iter( method calculate_loss_and_cache_gradients (line 230) | def calculate_loss_and_cache_gradients(self, logits: list[Tensor], bat... method forward (line 240) | def forward(self, inputs: list[list[str]], labels: Tensor) -> Tensor: method get_config_dict (line 280) | def get_config_dict(self): FILE: sentence_transformers/cross_encoder/losses/CrossEntropyLoss.py class CrossEntropyLoss (line 8) | class CrossEntropyLoss(nn.Module): method __init__ (line 9) | def __init__(self, model: CrossEncoder, activation_fn: nn.Module = nn.... method forward (line 67) | def forward(self, inputs: list[list[str]], labels: Tensor) -> Tensor: