Skip to content
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

[Question]: PP-UIE模型本地部署问题 #10018

Open
leaf19 opened this issue Mar 6, 2025 · 1 comment
Open

[Question]: PP-UIE模型本地部署问题 #10018

leaf19 opened this issue Mar 6, 2025 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@leaf19
Copy link

leaf19 commented Mar 6, 2025

请提出你的问题

本人小白,想要在本地部署新发布的PP-UIE模型,按照说明,新建python文件,输入如下代码:

`from pprint import pprint
from paddlenlp import Taskflow

schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction
ie = Taskflow('information_extraction',
schema= ['时间', '选手', '赛事名称'],
schema_lang="zh",
batch_size=1,
model="paddlenlp/PP-UIE-0.5B",
precision='float16')
pprint(ie("2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!")) # Better print results using pprint
`
无法直接下载PP-UIE-0.5B模型到本地,使用官方文档给出的另一种方法,把相关权重下载到工程中,结构如图所示,当再次运行时仍然报错,请问是哪里配置有问题吗?

Image

@leaf19 leaf19 added the question Further information is requested label Mar 6, 2025
@DrownFish19
Copy link
Collaborator

需要升级paddlenlp版本,当前使用版本应该是合入代码之前的版本。

当前使用可以使用nightly版本,安装方式:

pip install --pre --upgrade paddlenlp -f https://www.paddlepaddle.org.cn/whl/paddlenlp.html

ps. 当前正在适配paddle 3.0自动并行能力,可能出现不兼容升级,需同时升级paddle

python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu123/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants