Closed zhupeifox closed 2 months ago
`经过测试可能是模型的问题,采用"rocketqa-zh-dureader-cross-encoder"与"rocketqa-base-cross-encoder"会出现这个问题,采用“simbert-base-chinese”会出现一下错误```
__similarity([["XXXXX关于XXXXXXXXXXX的通知", "XXXXXXXXXXXXXXXX"]]) File "
", line 1, in results = self.task_instance(inputs) outputs = self._run_model(inputs) File "D:\Project\electronicrecordslibrary\TextTranslator.venv\lib\site-packages\paddlenlp\taskflow\text_similarity.py", line 293, in _run_model self.predictor.run() ValueError: (InvalidArgument) Variable value (input) of OP(fluid.layers.embedding) expected >= 0 and < 512, but got -4988613369508970118. Please check input value. [Hint: Expected ids[i] >= 0, but received ids[i]:-4988613369508970118 < 0:0.] (at ..\paddle\phi\kernels\cpu\embedding_kernel.cc:76) [operator < lookup_table_v2 > error]```
采用"rocketqa-medium-cross-encoder"模型可正常使用
发一下复现代码
from paddlenlp import Taskflow
__similarity = Taskflow(
... "text_similarity", model="rocketqa-zh-dureader-cross-encoder"
... )
__similarity([["XXXXX关于XXXXXXXXXXX的通知", "XXXXXXXXXXXXXXXX"]])
__similarity([["XXXXX关于XXXXXXXXXXX的通知", "XXXXXXXXXXXXXXXX"]])
__similarity([["XXXXX关于XXXXXXXXXXX的通知", "XXXXXXXXXXXXXXXX"]])
我也遇到这样的问题,现在还没有解决,求教各位大神~
软件环境
重复问题
错误描述
稳定复现步骤 & 代码