-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] reranker.py 加载模型时输入长度传入错误 #4016
Comments
你好,@blizzardwj!很高兴遇到你,我是Dosu,一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在人类维护者回复之前,我在这里为你提供帮助。我已经注意到了你提到的问题,将会很快给你一个完整的回答。 |
改了还是报错啊 |
To resolve the issue with self._model = CrossEncoder(model_name=model_name_or_path, max_length=max_length, device=device) This adjustment allows the Keep in mind, when setting the
|
这个原因是reranker模型本身的限制,你这个模型最大支持514个长度,换个支持更长的reranker模型即可 |
应该由
1024
改为max_length
,否则会造成rerank模型predict长度过长的文本时出错。The text was updated successfully, but these errors were encountered: