Custom batches in sentence-transformers for MultipleNegativesRankingLoss
Hugging Face Forums [Unofficial]
May 1, 2026
Sorry if you’re the type of person who hates LLM responses…
I am not sure what’s the ai-generated content policy here
Me too actually…
Did you review the solution yourself?
I haven’t actually tested this myself this time. I just looked at past cases. When I’m unsure about an answer, I often run the code myself to verify it. But this time, not yet.
are you familiar with the
sentence-transformerslibrary?
I use it on a daily basis, but I’m not very familiar with fine-tuning models of SentenceTransformers.
Which LLM did you use to generate the answer?
ChatGPT 5.5 (GPT-5.5 Thinking) + A collection of simple knowledge MD files stored locally on my computer. Also, these aren’t answers I got in a single go.
Discussion in the ATmosphere