opensi·si

sentencetransformers.sparseencoder.losses defines different loss functions that can be used to fine-tune sparse embedding models on training data. The choice of loss function…

Losses

sentence_transformers.sparse_encoder.losses defines different loss functions that can be used to fine-tune sparse embedding models on training data. The choice of loss function plays a critical role when fine-tuning the model. It determines how well our embedding model will work for the specific downstream task.

Sadly, there is no "one size fits all" loss function. Which loss function is suitable depends on the available training data and on the target task. Consider checking out the Loss Overview to help narrow down your choice of loss function(s).

SpladeLoss

sentence_transformers.sparse_encoder.losses.SpladeLoss

CachedSpladeLoss

sentence_transformers.sparse_encoder.losses.CachedSpladeLoss

FlopsLoss

sentence_transformers.sparse_encoder.losses.FlopsLoss

CSRLoss

sentence_transformers.sparse_encoder.losses.CSRLoss

CSRReconstructionLoss

sentence_transformers.sparse_encoder.losses.CSRReconstructionLoss

SparseMultipleNegativesRankingLoss

sentence_transformers.sparse_encoder.losses.SparseMultipleNegativesRankingLoss

SparseMarginMSELoss

sentence_transformers.sparse_encoder.losses.SparseMarginMSELoss