Linear Attention Sequence Parallelism for Long-Sequence GPU Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing sequence parallelism (SP) methods for processing long sequences on a single graphics processing unit (GPU) do not fully utilize linear attention properties, leading to poor parallel efficiency and usability of linear attention-based language models.

Innovation Solution

A linear attention sequence parallelism (LASP) method that distributes subsequences of an original sequence across multiple processing devices, utilizing a preconfigured data distribution strategy, and employs a forward propagation and backpropagation mechanism to determine and update parameters, optimizing communication and processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Length of stationary object

If existing sequence parallelism method is used to process long sequences, then memory limit of single GPU is extended, but parallel efficiency is poor

Engineering Contradiction:
Improvesequence lengthVSAvoidparallel efficiency
Core Design Contradiction:
Length of stationary objectVSProductivity

Solution Approach 1:

The patent divides the original sequence into multiple subsequences and distributes them across different processing devices. Each device processes a specific subsequence independently, enabling parallel computation while maintaining the ability to handle long sequences that exceed single-GPU memory capacity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from single-device sequential processing to multi-device parallel processing by introducing a distributed dimension. The sequence parallelism is achieved by distributing subsequences across multiple devices along the sequence dimension, thereby extending the effective sequence length beyond single-device limits while maintaining parallel efficiency.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Length of stationary object

If existing sequence parallelism method is used, then processing capability for long sequences is improved, but communication overhead is high

Engineering Contradiction:
Improvesequence lengthVSAvoidcommunication overhead
Core Design Contradiction:
Length of stationary objectVSLoss of energy

Solution Approach 1:

The patent extracts and utilizes the linear attention properties from the transformer architecture to optimize the sequence parallelism implementation. By identifying and leveraging the specific computational patterns in linear attention, the method reduces unnecessary communication operations between devices while maintaining the ability to process long sequences.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the computational parameters and communication patterns to exploit linear attention properties. By modifying how attention computations are performed and communicated across devices, the method reduces communication overhead compared to standard sequence parallelism approaches.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If linear attention properties are not fully utilized, then implementation is simpler, but parallel efficiency is poor

Engineering Contradiction:
Improveimplementation complexityVSAvoidparallel efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent performs preliminary analysis and configuration to identify and exploit linear attention properties before executing the sequence parallelism algorithm. By pre-configuring the data distribution strategy and forward propagation method to leverage linear attention characteristics, the system achieves high parallel efficiency without requiring complex runtime adjustments.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250292348A1Linear attention sequence parallelism method and apparatus, device, and medium
Publication Date: 2025.09.18 SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT
  • US20250292348A1 patent drawing
  • US20250292348A1 patent drawing
  • US20250292348A1 patent drawing

AI summary

A linear attention sequence parallelism method includes distributing, by a first processing device, each of multiple subsequences corresponding to an original sequence in a distributed environment to a respective one of multiple second processing devices according to a data distribution strategy; determining, by the respective second processing device, a respective one of multiple forward total output matrices corresponding to each subsequence according to a preconfigured forward propagation manner; and determining, by the respective second processing device, a respective one of multiple parameter gradients corresponding to each subsequence according to a preconfigured backpropagation manner and the forward total output matrix, and updating a parameter corresponding to each subsequence according to the respective parameter gradient.