IP Library Granted Patent US 12,197,379
Granted Patent B2
US 12,197,379 · App. 18/201,390 · Granted Jan 14, 2025

High performance layer normalization for large models

Inventor: Maulik Desai (Cedar Park, TX)
Assignee: SambaNova Systems, Inc.
G06F15/825G06F15/7867G06N3/08G06N3/084
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,197,379
App. No.
18/201,390
Granted
Jan 14, 2025
Kind
B2
Abstract

As general matrix multiply (GEMM) bottlenecks are ameliorated by tensor parallelism that is distributed to several processors, layer normalization (LN) surfaces as a latent bottleneck as it is not amenable to distribution. LN performance is linear to embedding size, which is extremely large in some AI models. Moreover, aggressive tiling prevents the use of internal pipelining. The disclosed implementation addresses this issue, composing LN from simpler operations and this composition is amenable to pipelining, facilitating efficient implementation of large AI models (e.g., GPTs). In both forward and backward propagation, the pipeline is stretched longer with improved balance across stages. This strategy improves throughput for larger batch-sizes as the workload benefits from pipelining operations for better performance. Furthermore, avoiding stochastic rounding further improves performance. In addition, LayerNorm checkpoints facilitate efficient computation of gradients during backward propagation.

Claims (46)

1. A computer-implemented method for normalizing data in a reconfigurable dataflow processor, the method comprising:

partitioning normalization operations into multiple compute stages and intervening buffering stages in a reconfigurable dataflow processor;

configuring the multiple compute stages and the intervening buffering stages; and

processing data (X) using the multiple compute stages and the intervening buffering stages.

2. The computer-implemented method of claim 1 , wherein:

the compute stages comprise a centering stage that computes X−μ.

3. The computer-implemented method of claim 1 , wherein:

the compute stages comprise a normalization stage that computes (X−μ)/σ.

4. The computer-implemented method of claim 1 , wherein:

the compute stages comprise a shift-add stage that computes γ*((X−μ)/σ)+β.

5. The computer-implemented method of claim 1 , further including:

conducting layer normalization computations in a forward-propagation pass.

6. The computer-implemented method of claim 5 , further including:

saving selected computed values (xHat) from the layer normalization computations.

7. The computer-implemented method of claim 6 , further including:

reusing the selected computed values in a backward-propagation pass.

8. The computer-implemented method of claim 7 , wherein:

the selected computed values are computed according to the equation xHat=(X−μ)/σ.

9. A non-transitory computer-readable storage medium storing computer program instructions that, when executed on a processor, perform operations comprising:

partitioning normalization operations into multiple compute stages and intervening buffering stages in a reconfigurable dataflow processor;

configuring the multiple compute stages and the intervening buffering stages; and

processing data (X) using the multiple compute stages and the intervening buffering stages.

10. The non-transitory computer-readable storage medium of claim 9 , wherein:

the compute stages comprise a centering stage that computes X−μ.

11. The non-transitory computer-readable storage medium of claim 9 , wherein:

the compute stages comprise a normalization stage that computes (X−μ)/σ.

12. The non-transitory computer-readable storage medium of claim 9 , wherein:

the compute stages comprise a shift-add stage that computes γ*((X−μ)/σ)+β.

13. The non-transitory computer-readable storage medium of claim 9 , further comprising:

conducting layer normalization computations in a forward-propagation pass.

14. The non-transitory computer-readable storage medium of claim 13 , further comprising:

saving selected computed values (xHat) from the layer normalization computations.

15. The non-transitory computer-readable storage medium of claim 14 , further comprising:

reusing the selected computed values in a backward-propagation pass.

16. The non-transitory computer-readable storage medium of claim 15 , wherein:

the selected computed values are computed according to the equation xHat=(X−μ)/σ.

17. A system comprising one or more processors coupled to a memory device, the memory device to store computer program instructions that are executable by the one or more processors to perform operations comprising:

partitioning normalization operations into multiple compute stages and intervening buffering stages in a reconfigurable dataflow processor;

configuring the multiple compute stages and the intervening buffering stages; and

processing data (X) using the multiple compute stages and the intervening buffering stages.

18. The system of claim 17 , wherein:

the compute stages comprise a centering stage that computes X−μ.

19. The system of claim 17 , wherein:

the compute stages comprise a normalization stage that computes (X−μ)/σ.

20. The system of claim 17 , wherein:

the compute stages comprise a shift-add stage that computes γ*((X−μ)/σ)+β.

Assignments (2)
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Apr 18, 2025
From: SAMBANOVA SYSTEMS, INC.
To: SILICON VALLEY BANK, A DIVISION OF FIRST-CITIZENS BANK & TRUST COMPANY, AS AGENT
Reel/Frame 070892/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 24, 2023
From: DESAI, MAULIK
To: SAMBANOVA SYSTEMS, INC.
Reel/Frame 063748/0155 →
Continuity (2)
Provisional Application 63345740 · May 25, 2022
Related Publication 20230385234A1 · Nov 30, 2023
References Cited (14)
US 10768899B2 · Koeplinger et al. · 2020 [cited by applicant]
US 11204889B1 · Prabhakar et al. · 2021 [cited by applicant]
US 11237971B1 · Brown · 2022 [cited by examiner]
US 11250105B2 · Wang et al. · 2022 [cited by applicant]
US 11429349B1 · Oklobdzija · 2022 [cited by examiner]
US 11443014B1 · Wang et al. · 2022 [cited by applicant]
US 20210157550A1 · Wang · 2021 [cited by examiner]
US 20210373867A1 · Chen et al. · 2021 [cited by applicant]
US 20220092247A1 · Koeplinger et al. · 2022 [cited by applicant]
US 20220129320A1 · Mohapatra · 2022 [cited by examiner]
US 20230273879A1 · Bordelon · 2023 [cited by examiner]
Koeplinger et al., “Spatial: A Language And Compiler For Application Accelerators,” Proceedings Of The 39th ACM SIGPLAN Conference On Programming Language Design And Embodiment (PLDI), Proceedings of the 43rd Internatio… [cited by applicant]
Prabhakar et al., “Plasticine: A Reconfigurable Architecture for Parallel Patterns,” ISCA '17, Jun. 24-28, 2017. [cited by applicant]
Zhang et al., “SARA: Scaling a Reconfigurable Dataflow Accelerator,” 2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA), 2021, pp. 1041-1054. [cited by applicant]