Skip to content

【PaddleNLP No.19】Create ernie1.0 infer example to fit pd3.0.0 #10426

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

hanlintang
Copy link
Contributor

PR types

Function optimization

PR changes

Models

Description

Create ernie1.0 infer example to fit pd3.0.0.
Modified:
slm/model_zoo/ernie-1.0/README.md
slm/model_zoo/ernie-1.0/finetune/deploy/README.md
Added:
slm/model_zoo/ernie-1.0/finetune/deploy/infer.py for adding a new infer example with paddle.inference.
Deleted:
slm/model_zoo/ernie-1.0/finetune/deploy/seq_cls_infer.py for outdated implementation.

Issue: #9763
@DrownFish19

Copy link

paddle-bot bot commented Apr 16, 2025

Thanks for your contribution!

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.01%. Comparing base (9f5b697) to head (526a9be).
Report is 21 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #10426   +/-   ##
========================================
  Coverage    49.01%   49.01%           
========================================
  Files          765      765           
  Lines       125877   125877           
========================================
  Hits         61699    61699           
  Misses       64178    64178           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


## 快速开始

以下示例展示如何基于 FastDeploy 库完成 ERNIE 1.0 模型在 ChnSenticorp 数据集上进行文本分类任务的 Python 预测部署,可通过命令行参数`--device`以及`--backend`指定运行在不同的硬件以及推理引擎后端,并使用`--model_dir`参数指定运行的模型,具体参数设置可查看下面[参数说明](#参数说明)。示例中的模型是按照 [ERNIE 1.0 训练文档](../../README.md)导出得到的部署模型,其模型目录为`model_zoo/ernie-1.0/finetune/tmp/export`(用户可按实际情况设置)。
以下示例展示 ERNIE 1.0 模型在 ChnSenticorp 数据集上进行文本分类任务的 Python 预测部署,可通过命令行参数`--device`指定运行在不同的硬件,并使用`--model_dir`参数指定运行的模型,具体参数设置可查看下面[参数说明](#参数说明)。示例中的模型是按照 [ERNIE 1.0 训练文档](../../README.md)导出得到的部署模型,其模型目录为`model_zoo/ernie-1.0/finetune/tmp/export`(用户可按实际情况设置)。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

赞👍

Copy link
Collaborator

@DrownFish19 DrownFish19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DrownFish19 DrownFish19 merged commit 1d5591b into PaddlePaddle:develop Apr 17, 2025
10 of 12 checks passed
@hanlintang hanlintang deleted the ernie1 branch April 17, 2025 05:12
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 21, 2025
@luotao1
Copy link
Collaborator

luotao1 commented Apr 22, 2025

hi, @hanlintang

  • 非常感谢你对飞桨的贡献,我们正在运营一个PFCC组织。PFCC是飞桨开源的贡献者俱乐部,只有给飞桨合入过代码的开发者才能加入,俱乐部里每两周会有一次例会(按兴趣参加),也会时不时办线下meetup面基,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 [email protected],我们会邀请你加入~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants