File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -74,4 +74,6 @@ TODO(add training and inference perf data)
74
74
75
75
## FasterGeneration:高性能生成任务加速
76
76
77
- TBD
77
+ [ FasterGeneration] ( https://github.com/PaddlePaddle/PaddleNLP/tree/develop/examples/faster/faster_generation ) 是PaddleNLP v2.2版本加入的一个高性能推理功能,可实现基于CUDA的序列解码。该功能可以用于多种生成类的预训练NLP模型,例如GPT、BART、UnifiedTransformer等,并且支持多种解码策略。因此该功能主要适用于机器翻译,文本续写,文本摘要,对话生成等任务。
78
+
79
+ 功能底层依托于[ FasterTransformer] ( https://github.com/NVIDIA/FasterTransformer ) ,该库专门针对Transformer系列模型及各种解码策略进行了优化。功能顶层封装于` model.generate ` 函数。功能的开启和关闭通过传入` use_faster ` 参数进行控制(默认为关闭状态)。通过调用generate函数,用户可以简单实现模型的高性能推理功能。
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ outputs, _ = model.generate(
124
124
...
125
125
```
126
126
127
- 关于该函数的详细介绍可以参考API文档[ generate] ( https://paddlenlp.readthedocs.io/zh/latest/source/paddlenlp.transformers.generation_utils.html ) , ` samples ` 文件夹中的其他示例的使用方法相同。
127
+ 关于该函数的详细介绍可以参考API文档[ generate] ( https://paddlenlp.readthedocs.io/zh/latest/source/paddlenlp.transformers.generation_utils.html ) 和 ** Aistudio教程 [ 文本生成任务实战:如何使用PaddleNLP实现各种解码策略 ] ( https://aistudio.baidu.com/aistudio/projectdetail/3243711?contributionType=1 ) 。 ** ` samples ` 文件夹中的其他示例的使用方法相同。
128
128
129
129
## Generate Examples
130
130
You can’t perform that action at this time.
0 commit comments