FlagEmbedding
FlagEmbedding copied to clipboard
LLM reranker,为什么output label始终为Yes
https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/llm_reranker/finetune_for_instruction/data.py#L75
在data.py的第75行,明明passages里面存在着负样本
为什么最终在处理的时候
https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/llm_reranker/finetune_for_instruction/data.py#L126
依然要在里面拼接一个yes的回答
我把tokenizer后的input_ids decode出来,结果全是yes
请问是为什么
因为yes不关键,关键是使用的yes的logits
取出yes的logit,根据大小进行排序
为什么不直接取倒数第二个位置的索引,或者不加yes直接取-1
yes这里应该是个标识,在做模型计算的时候应该是取了yes位置前一个位置的logits