Layer Normalization Pipelining for Large AI Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Layer Normalization (LN) acts as a bottleneck in the execution of large computing graphs due to its linear dependence on embedding size and incompatibility with internal pipelining, especially in large AI models like GPTs.

Innovation Solution

The implementation composes LN from simpler operations, making it amenable to pipelining, and incorporates LayerNorm checkpoints to facilitate efficient computation of gradients during backward propagation, thereby improving throughput and performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If Layer Normalization is implemented with linear dependence on embedding size, then normalization accuracy is maintained, but processing speed deteriorates and it becomes incompatible with internal pipelining

Engineering Contradiction:
Improvenormalization accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The Layer Normalization operation is segmented into multiple independent stages: mean computation stage, variance computation stage, normalization stage, and scaling/shifting stage. Each stage processes intermediate results and passes them to the next stage, enabling internal pipelining while maintaining the mathematical correctness of the normalization operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent computes and stores intermediate values (mean, variance, and normalized values) during the forward propagation pass as checkpoints. These preliminary computations are saved to avoid redundant calculations during backward propagation, enabling the pipeline to proceed efficiently without waiting for complete recomputation.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If Layer Normalization is implemented without distribution, then computational simplicity is maintained, but throughput deteriorates as it becomes a bottleneck in large AI models

Engineering Contradiction:
Improvecomputational simplicityVSAvoidthroughput
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

By dividing Layer Normalization into separable computational stages with well-defined interfaces, the operation becomes compatible with distributed execution across multiple processing units. Each unit can handle specific stages or portions of the computation independently, enabling throughput improvement without increasing individual unit complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces dynamic pipelining where intermediate results are buffered and passed between stages asynchronously. This dynamic approach allows the system to adapt to varying computational loads at different stages, improving overall throughput while maintaining the fundamental simplicity of the Layer Normalization algorithm.

Inventive Principle:
Principle #15Dynamics

3Use of energy by moving object

If aggressive tiling is used to optimize memory access, then memory efficiency is improved, but internal pipelining becomes impossible

Engineering Contradiction:
Improvememory efficiencyVSAvoidinternal pipelining capability
Core Design Contradiction:
Use of energy by moving objectVSProductivity

Solution Approach 1:

The computation is segmented into stages that naturally align with memory access patterns. Each stage computes results that are immediately usable by the next stage, allowing for efficient memory utilization without requiring aggressive tiling that would disrupt pipelining. Intermediate results are kept in registers or fast memory between stages.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent ensures continuous data flow between pipeline stages by computing intermediate results in a sequence that maintains both memory efficiency and pipelining capability. Data is produced and consumed continuously across stages without requiring aggressive tiling interruptions, sustaining both memory efficiency and pipeline throughput.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS20250147923A1Reusing select computed values during layer normalization for large models
Publication Date: 2025.05.08 SAMBANOVA SYSTEMS INC
  • US20250147923A1 patent drawing
  • US20250147923A1 patent drawing
  • US20250147923A1 patent drawing

AI summary

Techniques and systems disclosed herein may relate to normalizing data in a reconfigurable dataflow processor. For example, a system may conduct layer normalization computations in a forward-propagation pass and save selected computed values (xHat) from the layer normalization computations. The system may then reuse the selected computed values in a backward-propagation pass.