PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.11k stars 2.94k forks source link

请问,语义检索系统,预测的结果很好,模型转静态部署之后变得很不准,测试过后,发现动态模型生产的向量和静态模型生成的向量有很大区别 #3173

Closed zxz2001 closed 1 year ago

zxz2001 commented 2 years ago

Thanks for your issue. To help us solve the issue better, please provide following information:

  1. PaddleNLP version: (please specify the branch as well,e.g. PaddleNLP v2.2.1)
  2. PaddlePaddle version: (e.g. PaddlePaddle 2.1.0)
  3. Operation system: (e.g. Linux/Windows/MacOS)
  4. Python version: (e.g. Python3.6/3.7/3.8)
  5. CUDA/cuDNN version: (e.g. CUDA 10.2/cuDNN 7.6.5)
  6. Additional context: (Add any other context about the problem)

欢迎您反馈PaddleNLP使用问题,辛苦您提供以下信息,方便我们快速定位和解决问题:

  1. PaddleNLP版本:(请提供版本号和分支信息,如PaddleNLP v2.2.1)
  2. PaddlePaddle版本:(如PaddlePaddle 2.1.0)
  3. 操作系统信息:(如Linux/Windows/MacOS)
  4. Python版本号:(如Python3.6/3.7/3.8)
  5. CUDA/cuDNN版本:( 如CUDA 10.2/cuDNN 7.6.5等)
  6. 其他内容: (增加其他与问题相关的内容)
w5688414 commented 2 years ago

请参考一下这个pr的解决方法,tokenizer和预训练模型,需要保持一致,请参考检查一下。https://github.com/PaddlePaddle/PaddleNLP/issues/3113

zxz2001 commented 2 years ago

已经检查过了,tokenizer都是一致的

w5688414 commented 2 years ago

已经检查过了,tokenizer都是一致的

您是用的哪个预训练模型,请问您的导出export_model.py有做修改没?

zxz2001 commented 2 years ago

使用的是rocketqa-zh-dureader-query-encoder,export_model.py文件中两个ernie-3.0-medium-zh都改成了rocketqa-zh-dureader-query-encoder

zxz2001 commented 2 years ago

谢谢大佬,全部换成ernie-3.0-medium-zh之后解决了

w5688414 commented 2 years ago

谢谢大佬,全部换成ernie-3.0-medium-zh之后解决了

ernie-3.0有很多个版本,rocketqa-zh也有很多版本,注意动态图转静态图的时候,用的预训练语言模型要一致哈

panmyuan commented 2 years ago

您好,请问一下,语义检索系统搭建的过程中,有点问题请教一下,我遇到这个问题? Downloading from https://bj.bcebos.com/paddlenlp/models/community/rocketqa-zh-nano-query-encoder/model_state.pdparams failed with code 404! 不知道啥原因,自己去下载权重也下不到

w5688414 commented 2 years ago

您好,请问一下,语义检索系统搭建的过程中,有点问题请教一下,我遇到这个问题? Downloading from https://bj.bcebos.com/paddlenlp/models/community/rocketqa-zh-nano-query-encoder/model_state.pdparams failed with code 404! 不知道啥原因,自己去下载权重也下不到

rocketqa模型2.3.7之后才添加,paddlenlp版本需要升级:

pip install paddlenlp --upgrade
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。