IP Library Granted Patent US 12,002,453
Granted Patent B2
US 12,002,453 · App. 17/213,010 · Granted Jun 4, 2024

Methods and devices for irregular pruning for automatic speech recognition

Inventors: Yongxiong Ren (San Jose, CA); Bingbing Li (Stafford Spring, CT); Yang Liu (San Jose, CA); Lingzhi Liu (San Jose, CA)
Assignee: BEIJING TRANSTREAMS TECHNOLOGY CO. LTD.
G10L15/16G06N3/082G10L25/30
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,002,453
App. No.
17/213,010
Granted
Jun 4, 2024
Kind
B2
Abstract

A method and an apparatus for automatic speech recognition are provided. The method includes: generating a weight matrix for a layer of a plurality of layers in a neural network; dividing the weight matrix into a plurality of blocks, each block including a plurality of weights; selecting a pre-determined percentage of weights from at least one block for block-wise pruning; and generating a block-wise pruned weight matrix by setting the pre-determined percentage of weights selected from the at least one block to zero. The weight matrix includes a set of weights associated with the layer, the plurality of layers includes a first layer receiving a first input associated with one or more audio feature sequences, and the plurality of layers are executed on one or more processors. The method efficiently accelerates model inference using irregular pruning.

Claims (50)

1. A method for automatic speech recognition, comprising:

receiving, by a first layer in a neural network that is executed on one or more processors, a first input associated with one or more audio feature sequences;

generating a weight matrix for a layer of a plurality of layers in the neural network, wherein the weight matrix comprises a set of weights associated with the layer, the plurality of layers comprises the first layer receiving the first input, and the plurality of layers are executed on the one or more processors;

dividing the weight matrix into a plurality of blocks, each block comprising a plurality of weights, wherein each block has an identical dimension and the identical dimension of each block that is obtained by dividing the weight matrix is determined according to a size of a tensor core unit of the one or more processors;

determining a pre-determined percentage for each block, wherein the pre-determined percentage is X %, X is a positive integer;

selecting, based on the pre-determined percentage, a sub-set of weights from the plurality of weights in each block for block-wise pruning, wherein a first ratio of a number of the sub-set of weights in each block to a number of the plurality of weights in each block is X %, wherein the sub-set of weights comprise at least one weight;

setting the sub-set of weights in each block to zero to generate a block-wise pruned weight matrix, wherein other weights in each block remain non-zero, wherein a second ratio of a number of the other weights in each block to the number of the plurality of weights in each block is 1-X %; and

generating, by the one or more processors, a final output for the one or more audio feature sequences based on the block-wise pruned weight matrix.

2. The method of claim 1 , wherein the pre-determined percentage is at least 50%.

3. The method of claim 1 , wherein the pre-determined percentage of weights are selected by using a heuristic regularization algorithm.

4. The method of claim 1 , further comprising:

determining, based on a heuristic regularization algorithm, the pre-determined percentage for each block.

5. The method of claim 4 , wherein each block has a dimension of 1×4 or 2×2.

6. The method of claim 1 , wherein the plurality of layers comprise one or more convolution layers.

7. The method of claim 6 , further comprising:

transforming a three-dimensional weight tensor of the convolutional layer to the weight matrix.

8. An apparatus for automatic speech recognition, comprising:

one or more processors; and

a memory configured to store instructions executable by the one or more processors;

wherein the one or more processors, upon execution of the instructions, are configured to:

receive, by a first layer in a neural network that is executed on the one or more processors, a first input associated with one or more audio feature sequences;

generate a weight matrix for a layer of a plurality of layers in the neural network, wherein the weight matrix comprises a set of weights associated with the layer, the plurality of layers comprises the first layer receiving a first, and the plurality of layers are executed on the one or more processors;

divide the weight matrix into a plurality of blocks, each block comprising a plurality of weights, wherein each block has an identical dimension and the identical dimension of each block that is obtained by dividing the weight matrix is determined according to a size of a tensor core unit of the one or more processors;

determine a pre-determined percentage for each block, wherein the pre-determined percentage is X %, X is a positive integer;

select, based on the pre-determined percentage, a sub-set of weights from the plurality of weights in each block for block-wise pruning, wherein a first ratio of a number of the sub-set of weights in each block to a number of the plurality of weights in each block is X %, wherein the sub-set of weights comprise at least one weight;

set the sub-set of weights in each block to zero to generate a block-wise pruned weight matrix, wherein other weights in each block remain non-zero, wherein a second ratio of a number of the other weights in each block to the number of the plurality of weights in each block is 1-X %; and

generating a final output for the one or more audio feature sequences based on the block-wise pruned weight matrix.

9. The apparatus of claim 8 , wherein the pre-determined percentage is at least 50%.

10. The apparatus of claim 8 , wherein the pre-determined percentage of weights are selected by using a heuristic regularization algorithm.

11. The apparatus of claim 8 , wherein the one or more processors are further configured to:

determine, based on a heuristic regularization algorithm, the pre-determined percentage for each block.

12. The apparatus of claim 11 , wherein each block has a dimension of 1×4 or 2×2.

13. The apparatus of claim 8 , wherein the plurality of layers comprise one or more convolution layers.

14. The apparatus of claim 13 , wherein the one or more processors are further configured to:

transform a three-dimensional weight tensor of the convolutional layer to the weight matrix.

15. A non-transitory computer readable storage medium, comprising instructions stored therein, wherein, upon execution of the instructions by one or more processors, the instructions cause the one or more processors to perform acts comprising:

receiving, by a first layer in a neural network that is executed on the one or more processors, a first input associated with one or more audio feature sequences;

generating a weight matrix for a layer of a plurality of layers in the neural network, wherein the weight matrix comprises a set of weights associated with the layer, the plurality of layers comprises the first layer receiving the first input, and the plurality of layers are executed on the one or more processors;

dividing the weight matrix into a plurality of blocks, each block comprising a plurality of weights, wherein each block has an identical dimension and the identical dimension of each block that is obtained by dividing the weight matrix is determined according to a size of a tensor core unit of the one or more processors;

determining a pre-determined percentage for each block, wherein the pre-determined percentage is X %, X is a positive integer;

selecting, based on the pre-determined percentage, a sub-set of weights from the plurality of weights in each block for block-wise pruning, wherein a first ratio of a number of the sub-set of weights in each block to a number of the plurality of weights in each block is X %, wherein the sub-set of weights comprise at least one weight;

setting the sub-set of weights in each block to zero to generate a block-wise pruned weight matrix, wherein other weights in each block remain non-zero, wherein a second ratio of a number of the other weights in each block to the number of the plurality of weights in each block is 1-X %; and

generating a final output for the one or more audio feature sequences based on the block-wise pruned weight matrix.

16. The non-transitory computer readable storage medium of claim 15 , wherein the pre-determined percentage is at least 50%.

17. The non-transitory computer readable storage medium of claim 15 , wherein the instructions cause the one or more processors to perform acts further comprising:

determining, based on a heuristic regularization algorithm, the pre-determined percentage for each block.

18. The non-transitory computer readable storage medium of claim 17 , wherein each block has a dimension of 1×4 or 2×2.

19. The non-transitory computer readable storage medium of claim 15 , wherein the plurality of layers comprise one or more convolution layers.

20. The non-transitory computer readable storage medium of claim 15 , wherein the instructions cause the one or more processors to perform acts further comprising:

transforming a three-dimensional weight tensor of the convolutional layer to the weight matrix.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 28, 2024
From: BEIJING DAJIA INTERNET INFORMATION TECHNOLOGY CO. LTD.,
To: BEIJING TRANSTREAMS TECHNOLOGY CO. LTD.
Reel/Frame 066941/0319 →
CORRECTIVE ASSIGNMENT TO CORRECT THE APPLICATION 11830480 TO PATENT NUMBER PREVIOUSLY RECORDED AT REEL: 66622 FRAME: 672. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT . Recorded Mar 12, 2024
From: KWAI INC.
To: BEIJING DAJIA INTERNET INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 066795/0775 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 1, 2024
From: KWAI INC.
To: BEIJING DAJIA INTERNET INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 066622/0672 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 25, 2021
From: REN, YONGXIONG; LI, BINGBING; LIU, YANG; LIU, LINGZHI
To: KWAI INC.
Reel/Frame 055724/0524 →
Continuity (1)
Related Publication 20220310069A1 · Sep 29, 2022