【24h】

FastSeq: Make Sequence Generation Faster

机译:FastSeq:更快地制作序列生成

获取原文

摘要

Transformer-based models have made tremendous impacts in natural language generation. However the inference speed is a bottleneck due to large model size and intensive computing involved in auto-regressive decoding process. We develop FastSeq framework to accelerate sequence generation without accuracy loss. The proposed optimization techniques include an attention cache optimization, an efficient algorithm for detecting repeated n-grams, and an asynchronous generation pipeline with parallel I/O. These optimizations are general enough to be applicable to Transformer-based models (e.g., T5, GPT2, and UniLM). Our benchmark results on a set of widely used and diverse models demonstrate 4-9x inference speed gain. Additionally. FastSeq is easy to use with a simple one-line code change.
机译:基于变压器的模型对自然语言生成产生了巨大的影响。 然而推理速度是由于大型模型尺寸和自动回归解码过程中涉及的大型模型大小和密集计算导致的瓶颈。 我们开发FastSeq框架以加速序列生成而无需精确损失。 所提出的优化技术包括注意高速缓存优化,一种用于检测重复的n-gram的有效算法,以及具有并行I / O的异步产生流水线。 这些优化通常足以适用于基于变压器的模型(例如,T5,GPT2和Unilm)。 我们的基准导致一套广泛使用和多样化的模型展示了4-9倍推理速度增益。 此外。 FastSeq易于使用简单的单行代码更改。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号