FlagEmbedding
FlagEmbedding copied to clipboard
Retrieval and Retrieval-augmented LLMs
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 请问是为什么
@hotchpotch @yzhliu @zh217 @neofung 首先,特别感谢您的优秀工作。在学习您的工作时遇到了理解上的问题,想请教您。如题所述,对于这个含义有点不清楚,请帮忙解答一下。我的理解如下,请帮忙看看是否正确:**use_inbatch_neg:同一个batch中query对应的neg数据是否参与loss计算。** 具体分析其中的代码(FlagEmbedding/baai_general_embedding/finetune/modeling.py forward函数),又有些不理解的地方: 1. if self.use_inbatch_neg: 为每个查询创建了一个查询索引,将查询索引乘以 group_size,确保了每个查询都指向其对应的文档组的第一个文档,这可以视为正样本。但是后续的loss计算为self.compute_loss(scores, target),我的理解是只计算了正样本与query之间的loss,这里并没有体现出**use_inbatch_neg** 2. else:(也即 not self.use_inbatch_neg) 为每个查询创建了一个查询索引0, 表示每个查询只考虑第一个文档。第一个文档作为batch中的第一个文档,它只与第一个query对应,且为第一个query的正样本。将第一个query的正样本与所有的query求loss,这样是为了区分不同的query吗?那为什么不用第二个query的第一个文档与所有的query求loss呢? 非常期待您的回复。
Very good paper. I hope to have a detailed introduction to the "basic training form of dense retrieval" mentioned in the Distant supervision section on page 5. Does it train...
The first commit fixes a problem where the layerwise reranker classes could not download models from HF because `local_files_only=True` was set. closes #721 The second commit adds as `progress` keyword...
Dear authors, Great work, thanks for sharing. I am trying to fine-tune bge-reranker-v2-gemma using my own dataset. However, according to the officail finetuning command provided: ```bash torchrun --nproc_per_node {number of...
我在进行使用时,遇到 from FlagEmbedding import FlagModel zsh: segmentation fault python zsh: segmentation fault python eval_C-MTEB.py 这两个包均不能使用,sentence_transformers在进行使用时也会报错,但进行修改降低版本为2.2.2后可进行使用, 希望大家复现成功的可以给我一份详细的环境配置版本。感谢
我的电脑是 mac m1, python 3.9 完全按照要求安装环境, 准备微调。 在挖掘副样本时: 报错: zsh: segmentation fault python -m FlagEmbedding.baai_general_embedding.finetune.hn_mine --input_fil (embedding) zhangyukun33@ZBMAC-ac2f5b330 FlagEmbedding % /Users/zhangyukun33/mambaforge/envs/embedding/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore...
我用这个做了评测 测试包括bge-m3, https://huggingface.co/Alibaba-NLP/gte-multilingual-base https://huggingface.co/Alibaba-NLP/gte-Qwen2-1.5B-instruct 从中文ndcg10来看,都不怎么样,逊于bm25。 dense search 8k目前看起来暂时达不到传统搜索效果,能否出一个2k的mldr版本?