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
11.9k stars 2.9k forks source link

[Question]: 调用paddlenlp的uie模型,报错Segmentation fault (core dumped) #8764

Open dragronstranding opened 1 month ago

dragronstranding commented 1 month ago

请提出你的问题

使用脚本: from paddlenlp import Taskflow schema = ["成绩"] ie = Taskflow('information_extraction', schema=schema) allStr = "小明是个优秀的学生,这次考试成绩是100分" res = ie(allStr) data = {} for key in schema: data[key] = res[0].get(key, [{'text': ''}])[0]['text'] print(data) 版本: paddlepaddle-gpu=2.3.2.post112 paddlenlp=2.5.2 scipy=1.7.3 python==3.7 报错信息: Segmentation fault (core dumped)

DrownFish19 commented 1 month ago

可能存在的原因如下:

  1. nvidia驱动过高,尝试降低驱动版本至cuda11.2对应驱动
  2. cuda和cudnn没有正确安装,检查/usr/local/cuda/下是否存在cudnn

如果以上尝试无效,建议通过docker启动,可以通过https://hub.docker.com/r/paddlepaddle/paddle/tags/?page=&page_size=&ordering=&name=11.2 进行查询合适的docker镜像

dragronstranding commented 1 month ago

Driver API Version: 12.2, Runtime API Version: 11.2, cuDNN Version: 8.1.这是我的版本,应该没问题,我之前这个环境运行paddleocr都没有问题

DrownFish19 commented 1 month ago

Driver API Version: 12.2, Runtime API Version: 11.2, cuDNN Version: 8.1.这是我的版本,应该没问题,我之前这个环境运行paddleocr都没有问题

driver版本可能过高,是否有尝试import paddle进行测试?

dragronstranding commented 1 month ago

测试过的