How contrastive pairs generated when model is trained for multi-label classification?
- User
How contrastive pairs generated when model is trained for multi-label classification?
Assistant
The
sentence_pairs_generation_multilabelfunction inscripts/setfit/run_fewshot_multilabel.pygenerates contrastive pairs for multi-label classification. This function takes the input texts and their corresponding multi-hot encoded labels and produces a list of sentence pairs. Each example in the list contains two sentences and a label indicating whether they belong to the same class or not. The function generates positive pairs by selecting sentence pairs that share at least one common label and negative pairs by selecting sentence pairs that do not share any label.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.