Closed BlueSkyBubble closed 1 year ago
我在使用ernie1.0的时候发现了同样的问题,大概在小数点5位以后出现精度不对齐情况
你好,可以 share 一下多次预测的结果对比图?
sentence_transformers也是如此,醉了
您好,我本地验分别验证了 ERNIE-Gram Point-wise、Pair-wise 2种训练范式的下推理结果,多次推理结果完全一致,具体数值如下:
基于 ERNIE-Gram 的 Point-wise 范式 2 次推理结果
基于 ERNIE-Gram 的 Pair-wise 范式 2 次推理结果
本地测试环境如下:
paddlepaddle-gpu 2.2.0
paddlenlp develop 分支
可否提供多次推理结果不一致的可复现环境,我们可以帮助定位问题。具体包括:
1. 使用的训练代码、启动脚本
2. 使用的预测代码、启动脚本
3. 多次推理结果不一致所加载的模型参数
4. 测试数据
5. PaddlePaddle 版本号
6. PaddleNLP 版本号
@BlueSkyBubble @hermitgreen @sunhaha123
@tianxin1860 是 nlp_example\text_matching\sentence_transformers ,
,其次想问下nlp_example\text_matching\simbert 为什么没有train.py,谢谢?
SimBERT 模型目前提供基于开源模型的预测能力,训练策略暂未集成。@sunhaha123
@sunhaha123 是否能够提供最小复现代码?
@Steffy-zxf 这个图片我在aistudio里直接运行的,什么都没改。就是sentences_transform这个文件内下的模型,我看是可能因为导入了from model import SentenceTransformer。
@HarderThenHarder 明天我们的工程师会回复您这个问题。@Steffy-zxf 明天重点关注下哈
@HarderThenHarder @sunhaha123 你好!请确认下训练后保存的模型参数是否被正确加载,如以下代码
if args.init_from_ckpt and os.path.isfile(args.init_from_ckpt):
state_dict = paddle.load(args.init_from_ckpt)
model.set_dict(state_dict)
Fine-Tuning模型应该是被正确加载了的: 您方便给个如流号吗,我通过如流联系您。
@HarderThenHarder 你好, 我的如流号叫做 张雪菲。
@BlueSkyBubble @hermitgreen @sunhaha123
这个bug 解决了没有,我也发现QuestionMatching 里面的inference结果不一样。 LQ那个数据集,test 推理跑了几次,每次acc都不一样。acc: 0.86576 acc: 0.86632, acc: 0.86512 虽然相隔不大
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。
在paddle模型预测过程中,虽然使用了model.eval(),但每次模型的推理结果仍然不相同,比如PaddleNLP/examples/text_matching/ernie_matching/predict_pairwise.py,训练好模型后,通过如下命令每次执行这个predict.py文件得到的结果都不相同。
请问这是哪里的问题?