GPU Conformer Encoder Kernels for ASR Throughput

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conformer models for automatic speech recognition (ASR) require significant computational resources and power to process audio corpora efficiently, posing a challenge for real-world deployments on hardware devices like GPUs.

Innovation Solution

The ASR system employs a conformer encoder with multiple encoder layers executed on GPUs, incorporating a first and second feed-forward module, multi-head self-attention, and convolution modules, with these modules fused into encoder kernels and utilizing ping-pong buffers for efficient data processing, along with a beam search kernel for decoding.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conformer models are used for ASR to achieve state-of-the-art performance, then recognition accuracy is improved, but computational resource consumption and power requirements increase significantly

Engineering Contradiction:
Improverecognition accuracyVSAvoidcomputational resource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The conformer model is segmented into distinct computational modules (feed-forward networks, convolution modules, self-attention modules) that can be independently optimized and executed. This segmentation allows for targeted optimization of each module's computational efficiency while preserving the overall model accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Multiple computational operations within the conformer model are merged into unified kernel functions. By combining related operations into single computational kernels, the patent reduces overhead from multiple separate executions and improves computational throughput, thereby lowering overall resource consumption.

Inventive Principle:
Principle #5Merging (Combining)

2Measurement precision

If conformer models process every audio corpus to achieve accurate transcription, then recognition precision is improved, but processing time and computational load increase

Engineering Contradiction:
Improvetranscription accuracyVSAvoidprocessing throughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

Audio corpora are pre-processed and organized into optimized data structures before being fed into the conformer model. This preliminary preparation reduces the computational burden during actual processing, enabling faster throughput without sacrificing transcription accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements continuous processing pipelines where the conformer model operates without interruption on streaming audio data. By maintaining continuous computation flow and avoiding repeated start-stop cycles, the system achieves both high accuracy and improved processing throughput.

Inventive Principle:
Principle #20Continuity of useful action

3Productivity

If multiple encoder layers with fused modules are implemented on GPUs to accelerate processing, then computational efficiency is improved, but memory access requirements and complexity increase

Engineering Contradiction:
Improvecomputational efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

Multiple encoder sublayers are fused into single GPU kernel operations. This merging reduces the number of separate kernel launches and memory transactions, improving computational efficiency while the fused structure itself manages the complexity through unified operation sequences.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The fused encoder kernels are designed to handle multiple computational tasks within a single unified function. This multi-functionality allows the same kernel structure to perform various operations across different encoder layers, improving efficiency without proportionally increasing system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11562734B2Systems and methods for automatic speech recognition based on graphics processing units
Publication Date: 2023.01.24 KWAI INC
  • US11562734B2 patent drawing
  • US11562734B2 patent drawing
  • US11562734B2 patent drawing

AI summary

The present disclosure relates to an automatic speech recognition system and a method thereof. The system includes a conformer encoder and a pair of ping-pong buffers. The encoder includes a plurality of encoder layers sequentially executed by one or more graphic processing units. At least one encoder layer includes a first feed forward module, a multi-head self-attention module, a convolution module, and a second feed forward module. The convolution module and the multi-head self-attention module are sandwiched between the first feedforward module and the second feed forward module. The four modules respectively include a plurality of encoder sublayers fused into one or more encoder kernels. The one or more encoder kernels respectively read from one of the pair of ping-pong buffers and write into the other of the pair of ping-pong buffers.