FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

loss 下降到2.7就不下降了

Open Alexender-Ye opened this issue 1 year ago • 1 comments

你好,我在做一个QA的数据集的任务,其中query是question,pos是answer,neg是其他的选项,但是在finetune 的时候,loss下降到2.7就不再下降了,并且最后accuracy也大概只有20-30%,请问大佬知道这种事什么问题么?

脚本:torchrun --nproc_per_node 1 -m FlagEmbedding.baai_general_embedding.finetune.run --output_dir finetune_model --model_name_or_path BAAI/bge-small-en-v1.5 --train_data fine_tune_data_10.jsonl --learning_rate 1e-5 --bf16 --num_train_epochs 5 --per_device_train_batch_size 16 --dataloader_drop_last True --normlized True --temperature 0.02 --query_max_len 82 --passage_max_len 56 --train_group_size 10 --negatives_cross_device --logging_steps 10 --save_steps 10000 --query_instruction_for_retrieval ""

微信图片_20240501012041

Alexender-Ye avatar Apr 30 '24 15:04 Alexender-Ye

The loss seems large. I guess there are pseudo-negative examples in the training data (some samples in the negative sample list neg: List[str] are actually positive samples).

staoxiao avatar May 02 '24 14:05 staoxiao