IP Library Granted Patent US 12,204,488
Granted Patent B2
US 12,204,488 · App. 18/202,030 · Granted Jan 21, 2025

High performance softmax for large models

Inventor: Maulik Desai (Cedar Park, TX)
Assignee: SambaNova Systems, Inc.
G06F15/7867G06F17/18G06N3/02G06N3/08
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,204,488
App. No.
18/202,030
Granted
Jan 21, 2025
Kind
B2
Abstract

The softmax operation is pipelined to evenly balanced operations with 2N latency per sharded M dimension of a tensor shaped M*N, resulting in ˜1.8× performance gain. As each operation is fragmented, the pipeline does not assume a fixed-cost fill that can performance-wise hurt significantly for small Tensor dimensions. In addition, this innovative design is Place-and-Route (PNR) friendly as well as resource efficient. Moreover, it is easily parallelized without requiring additional support at the subnet level.

Claims (36)

1. A computer-implemented method for conducting softmax computations in a reconfigurable dataflow system, the method comprising:

computing a maximum value and a difference between the maximum value and input values in a first compute stage;

performing exponent calculations in a second compute stage; and

computing a sum and a reciprocal in a third compute stage.

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

storing the maximum value in a compute unit's temporary storage of the first compute stage and using the stored maximum value in a next compute cycle of the first compute stage.

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

the first, second, and third compute stages require first, second, and third compute units in the reconfigurable dataflow system.

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

absence of multiple compute units each of the computing, performing, and computing steps with shared fan-in obviates predetermined placement of the first, second, and third compute units when conducting the softmax computations in the reconfigurable dataflow system.

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

each of the first, second, and third compute stages requires 2N latency per sharded M dimension of an M*N shape tensor.

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

computing a maximum value and a difference between the maximum value and input values in a first compute stage;

performing exponent calculations in a second compute stage; and

computing a sum and a reciprocal in a third compute stage.

7. The non-transitory computer-readable storage medium of claim 6 , further comprising:

storing the maximum value in a compute unit's temporary storage of the first compute stage and using the stored maximum value in a next compute cycle of the first compute stage.

8. The non-transitory computer-readable storage medium of claim 6 , wherein:

the first, second, and third compute stages require first, second, and third compute units in the reconfigurable dataflow system.

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

absence of multiple compute units each of the computing, performing, and computing steps with shared fan-in obviates predetermined placement of the first, second, and third compute units when conducting the softmax computations in the reconfigurable dataflow system.

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

each of the first, second, and third compute stages requires 2N latency per sharded M dimension of an M*N shape tensor.

11. 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:

computing a maximum value and a difference between the maximum value and input values in a first compute stage;

performing exponent calculations in a second compute stage; and

computing a sum and a reciprocal in a third compute stage.

12. The system of claim 11 , further comprising:

storing the maximum value in a compute unit's temporary storage of the first compute stage and using the stored maximum value in a next compute cycle of the first compute stage.

13. The system of claim 11 , wherein:

the first, second, and third compute stages require first, second, and third compute units in the reconfigurable dataflow system.

14. The system of claim 13 , wherein:

absence of multiple compute units each of the computing, performing, and computing steps with shared fan-in obviates predetermined placement of the first, second, and third compute units when conducting the softmax computations in the reconfigurable dataflow system.

15. The system of claim 11 , wherein:

each of the first, second, and third compute stages requires 2N latency per sharded M dimension of an M*N shape tensor.

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 Jul 31, 2023
From: DESAI, MAULIK
To: SAMBANOVA SYSTEMS, INC.
Reel/Frame 064431/0228 →
Continuity (2)
Provisional Application 63345732 · May 25, 2022
Related Publication 20230385230A1 · Nov 30, 2023
References Cited (7)
US 7567889B2 · Wismuller · 2009 [cited by examiner]
US 20200302284A1 · Garcia Garcia · 2020 [cited by examiner]
US 20220147821A1 · Nakata · 2022 [cited by examiner]
US 20220391696A1 · Sahin · 2022 [cited by examiner]
Stevens et al.; Softermax: Hardware/Software Co-Design of an Efficient Softmax for Transformers; IEEE; 2021 (Year: 2021). [cited by examiner]
Iwata; Extending the Peak Bandwidth of Parameters for Softmax Selection in Reinforcement Learning; IEEE; 2021 (Year: 2021). [cited by examiner]
Vasyltsov et al.; Efficient Softmax Approximation for Deep Neural Networks with Attention Mechanism; 2021 (Year: 2021). [cited by examiner]