Skip to content

Commit 40484be

Browse files
committed
Merge branch 'rename_diffuser_paddle' of https://github.com/JunnYu/PaddleNLP into rename_diffuser_paddle
2 parents 10e00d1 + 18e2faf commit 40484be

File tree

12 files changed

+192
-475
lines changed

12 files changed

+192
-475
lines changed

README_cn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
**PaddleNLP**是一款**简单易用****功能强大**的自然语言处理开发库。聚合业界**优质预训练模型**并提供**开箱即用**的开发体验,覆盖NLP多场景的模型库搭配**产业实践范例**可满足开发者**灵活定制**的需求。
3131

3232
## News 📢
33+
* 🔥 **2022.10.27 发布 [PaddleNLP v2.4.2](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.4.2)**
34+
* NLG能力扩充:📄 新增[**基于Pegasus的中文文本摘要方案**](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/applications/text_summarization/pegasus),效果领先;❓新增[**问题生成解决方案**](./examples/question_generation),提供基于业界领先模型UNIMO-Text和大规模多领域问题生成数据集训练的**通用问题生成预训练模型**。均支持Taskflow一键调用,支持FasterGeneration高性能推理,训练推理部署全流程打通。
3335

3436
* 🔥 **2022.10.14 发布 [PaddleNLP v2.4.1](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.4.1)**
3537
* 🧾 发布多语言跨模态布局增强文档智能大模型 [**ERNIE-Layout**](./model_zoo/ernie-layout/),刷新11项任务SOTA。同步发布基于ERNIE-Layout的**文档抽取问答模型DocPrompt** 🔖,精准理解文档图片布局与语义信息,轻松应对各类业务场景。

README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
<div align="center">
3838
<img src="https://user-images.githubusercontent.com/11793384/197535273-75db1fb3-3a34-4bd2-bac3-bcacb1b986a8.jpg" width="150" height="150" />
3939
</div>
40+
* 🔥 **2022.10.27 [PaddleNLP v2.4.2](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.4.2) Released!**
41+
* NLG Upgrade: 📄 Release [**Solution of Text Summarization**](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/applications/text_summarization/pegasus) based on Pegasus;❓ Release [**Solution of Problem Generation**](./examples/question_generation), providing **general problem generation pre-trained model** based on Baidu's UNIMO Text and large-scale multi domain problem generation dataset。Supporting high-performance inference ability based on FasterGeneration , and covering the whole process of training , inference and deployment.
4042

4143
* 🔥 **2022.10.14 [PaddleNLP v2.4.1](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.4.1) Released!**
4244
* 🧾 Release multilingual/cross-lingual pre-trained models [**ERNIE-Layout**](./model_zoo/ernie-layout/) which achieves new SOTA results in 11 downstream tasks. **DocPrompt** 🔖 based on ERNIE-Layout is also released which has the ability for multilingual document information extraction and question ansering.

examples/language_model/gpt-3/dygraph/run_pretrain.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ def do_train(args):
266266
# and add it to 'paddle.amp.decorate'
267267
multi_precision=args.use_pure_fp16)
268268

269+
# decorate @to_static for benchmark, skip it by default.
270+
if args.to_static:
271+
specs = None
272+
model = paddle.jit.to_static(model, input_spec=specs)
273+
logger.info(
274+
"Successfully to apply @to_static with specs: {}".format(specs))
275+
269276
if args.use_pure_fp16:
270277
scaler = paddle.amp.GradScaler(init_loss_scaling=args.scale_loss)
271278
# level O2 means converting the network to FP16
@@ -301,13 +308,6 @@ def do_train(args):
301308
logger.warning("No optimizer checkpoint file found in %s." %
302309
opt_path)
303310

304-
# decorate @to_static for benchmark, skip it by default.
305-
if args.to_static:
306-
specs = None
307-
model = paddle.jit.to_static(model, input_spec=specs)
308-
logger.info(
309-
"Successfully to apply @to_static with specs: {}".format(specs))
310-
311311
global_step = 0
312312
tic_train = time.time()
313313
for epoch in range(args.num_train_epochs):

examples/language_model/moe/dygraph/framework/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
from .storage_process import assign_group_by_size
1616
from .storage_process import flatten_dense_tensors
1717
from .storage_process import obtain_storage
18-
from .adamw import AdamW
18+
from paddle.optimizer import AdamW
1919
from .group_sharded import group_sharded_parallel

0 commit comments

Comments
 (0)