External Publication
Visit Post

Custom batches in sentence-transformers for MultipleNegativesRankingLoss

Hugging Face Forums [Unofficial] April 29, 2026
Source

Thank you a lot for your answer, I’ll read it carefully and try to implement it. Since it appears to be (at least partially) LLM-generated, I hope you don’t mind a couple of clarifying questions (I’m new to hf, and I am not sure what’s the ai-generated content policy here):

  1. Did you review the solution yourself? If so, are you familiar with the sentence-transformers library?

  2. Which LLM did you use to generate the answer? I’ve asked ChatGPT 5.4 several times about this issue, but it consistently suggests writing a custom training loop that bypasses SentenceTransformerTrainer and its additional features.

Thanks again!

Discussion in the ATmosphere

Loading comments...