chenyunsai
chenyunsai
i hava the same issue,so there are a solve way?
> 额外提供一个实验中的信息,是否启用normalized参数对于模型的输出分布有很大的影响, 所以是启用normalized 会导致输出分布比较均匀是吧
> normlized应设置为True,设置为False指的是使用内积作为相似度,设置为True才是使用cos_similarity 我在损失函数这块之前把代码改了 self.similarity_fct = nn.CosineSimilarity(dim=-1) def compute_similarity(self, q_reps, p_reps): return self.similarity_fct(q_reps, p_reps) #if len(p_reps.size()) == 2: # return torch.matmul(q_reps, p_reps.transpose(0, 1)) #return torch.matmul(q_reps, p_reps.transpose(-2, -1))
> 你好,我有以下疑问: > > 1. 微调时,per_device_train_batch_size设置为多少比较合适呢? > 2. 若采用use_inbatch_neg,batch_size是否越大越好呢? hello 你这边微调效果怎么样呀
> Did you find the file 'embed_network.py'