Skip to main content
QUICK REVIEW

[论文解读] DFX: A Low-latency Multi-FPGA Appliance for Accelerating Transformer-based Text Generation

Seongmin Hong, Seungjae Moon|arXiv (Cornell University)|Sep 22, 2022
Topic Modeling被引用 5
一句话总结

DFX 是一种多 FPGA 设备,通过利用模型并行性、针对数据流优化的定制计算核心以及对高带宽内存(HBM)的完全利用,实现了低延迟和高吞吐量的端到端 GPT-2 推理。与使用四块 Xilinx Alveo U280 FPGA 的多 GPU 基线相比,其性能提升 5.58×,能效提升 3.99×,成本效益提升 8.21×。

ABSTRACT

Transformer is a deep learning language model widely used for natural language processing (NLP) services in datacenters. Among transformer models, Generative Pre-trained Transformer (GPT) has achieved remarkable performance in text generation, or natural language generation (NLG), which needs the processing of a large input context in the summarization stage, followed by the generation stage that produces a single word at a time. The conventional platforms such as GPU are specialized for the parallel processing of large inputs in the summarization stage, but their performance significantly degrades in the generation stage due to its sequential characteristic. Therefore, an efficient hardware platform is required to address the high latency caused by the sequential characteristic of text generation. In this paper, we present DFX, a multi-FPGA acceleration appliance that executes GPT-2 model inference end-to-end with low latency and high throughput in both summarization and generation stages. DFX uses model parallelism and optimized dataflow that is model-and-hardware-aware for fast simultaneous workload execution among devices. Its compute cores operate on custom instructions and provide GPT-2 operations end-to-end. We implement the proposed hardware architecture on four Xilinx Alveo U280 FPGAs and utilize all of the channels of the high bandwidth memory (HBM) and the maximum number of compute resources for high hardware efficiency. DFX achieves 5.58x speedup and 3.99x energy efficiency over four NVIDIA V100 GPUs on the modern GPT-2 model. DFX is also 8.21x more cost-effective than the GPU appliance, suggesting that it is a promising solution for text generation workloads in cloud datacenters.

研究动机与目标

  • 解决基于 GPU 的系统在基于 Transformer 的文本生成的序列生成阶段中延迟较高的问题。
  • 设计一种统一的可编程硬件平台,支持在摘要生成和文本生成两个阶段均实现端到端的 GPT 推理。
  • 通过充分利用多 FPGA 系统中的 HBM 带宽和计算资源,最大化硬件利用率。
  • 提升数据中心规模文本生成工作负载的成本效益和能效。
  • 提供一种可重构、可扩展的解决方案,以应对不断演进的 Transformer 模型,且无需承担 ASIC 重新设计的成本。

提出的方法

  • DFX 在四块 Xilinx Alveo U280 FPGA 之间采用模型并行性,将 GPT-2 工作负载均匀分布,实现计算能力的可扩展性。
  • 采用针对单 token 生成优化的定制可编程计算核心,提升在本质上具有顺序性的生成阶段中的资源利用率。
  • 通过高效的分块方案和 GPT 优化的数据流,最大化 HBM2 带宽利用率,减少内存瓶颈。
  • 利用自定义指令加速 GPT-2 的关键操作,包括注意力计算、层归一化和残差连接。
  • 完全利用 HBM2(460 GB/s)以及所有可用的 DSP 和 BRAM 资源,确保高硬件效率。
  • 设计完全可重编程,支持在最小化重新设计开销的前提下,适应不断演进的 Transformer 架构。

实验结果

研究问题

  • RQ1如何通过硬件加速器降低基于 GPT 的文本生成中序列生成阶段的延迟,以克服 GPU 的性能瓶颈?
  • RQ2在多 FPGA 部署中实现高吞吐量和低延迟的 Transformer 推理,需要哪些系统级优化?
  • RQ3在多 FPGA 系统中,如何最大化 HBM2 带宽,以应对 GPT-2 等内存密集型 Transformer 模型?
  • RQ4在数据中心工作负载中,可重构的 FPGA 基础设备相比 GPU 替代方案,在性能、能效和成本方面有何优势?
  • RQ5结合模型并行性、自定义指令集和数据流优化,能否实现 GPT-2 的端到端加速并达到高硬件利用率?

主要发现

  • DFX 在 GPT-2 模型上相比使用四块 NVIDIA V100 GPU 的多 GPU 基线,实现了 5.58× 的性能提升。
  • 与基于 GPU 的设备相比,其能效提升了 3.99×。
  • DFX 的成本效益比 GPU 设备高出 8.21×,具有更低的初始成本和更高的性能/美元比。
  • 该系统完全利用了四块 U280 FPGA 上的所有 HBM2 通道和计算资源,实现了高硬件效率。
  • 定制计算核心和优化的数据流在并行摘要生成和顺序生成阶段均实现了高吞吐量和低延迟。
  • 可重构的 FPGA 设计使得系统能够高效适应不断演进的 Transformer 模型,且无需进行 ASIC 重新设计。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。