IP Library Granted Patent US 11,507,823
Granted Patent B2
US 11,507,823 · App. 16/380,813 · Granted Nov 22, 2022

Adaptive quantization and mixed precision in a network

Inventors: Zuoguan Wang (Los Gatos, CA); Tian Zhou (Menlo Park, CA); Qun Gu (San Jose, CA)
Assignee: Black Sesame Technologies Inc.
G06N3/08G06F7/5443
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 11,507,823
App. No.
16/380,813
Granted
Nov 22, 2022
Kind
B2
Abstract

A method of adaptive quantization for a convolutional neural network, includes at least one of receiving an acceptable model accuracy, determining a float value multiply accumulate for the layer based on a float value weight and a float value input, quantizing the float value weight at multiple weight quantization precisions, quantizing the float value input at multiple input quantization precisions, determining a multiply accumulate at multiple multiply accumulate quantization precisions based on the weight quantization precisions and the input quantization precisions, determining multiple quantization errors based on differences between the float value multiply accumulate and the multiple multiply accumulate quantization precisions and selecting one of the multiple weight quantization precisions, one of the multiple input quantization precisions and one of the multiple multiply accumulate quantization precisions based on the predetermined acceptable model accuracy and the multiple quantization errors.

Claims (22)

1. A method of adaptive quantization for a convolutional neural network, comprising:

receiving a predetermined acceptable model accuracy for a layer in the network;

determining a float value multiply accumulate for the layer based on a float value weight and a float value input;

quantizing the float value weight at a plurality of weight quantization precisions;

quantizing the float value input at a plurality of input quantization precisions;

determining a multiply accumulate at a plurality of multiply accumulate quantization precisions based on the plurality of weight quantization precisions and the plurality of input quantization precisions;

determining a plurality of quantization errors based on differences between the float value multiply accumulate and the plurality of multiply accumulate quantization precisions; and

selecting the one of the plurality of weight quantization precisions, one of the plurality of input quantization precisions and one of the plurality of multiply accumulate quantization precisions based on the predetermined acceptable model accuracy for the layer and the plurality of quantization errors.

2. The method of adaptive quantization of claim 1 , further comprising determining a weight quantization sensitivity based on the plurality of weight quantization precisions and the float value weight.

3. The method of adaptive quantization of claim 2 , further comprising determining an input quantization sensitivity based on the plurality of input quantization precisions and the float value input.

4. The method of adaptive quantization of claim 3 , further comprising determining a multiply accumulate quantization sensitivity based on the plurality of multiply accumulate quantization precisions and the float value multiply accumulate.

5. The method of adaptive quantization of claim 4 , further comprising determining an overall quantization sensitivity based on the weight quantization sensitivity, the input quantization sensitivity and the multiply accumulate quantization sensitivity.

6. The method of adaptive quantization of claim 5 , further comprising minimizing the quantization sensitivity based on the predetermined acceptable model accuracy.

7. The method of adaptive quantization of claim 1 , further comprising iterating the layer in the network.

8. The method of adaptive quantization of claim 1 , further comprising:

inputting the float value weight for the layer; and

inputting the float value input for the layer.

9. The method of adaptive quantization of claim 8 , wherein the float weight is signed.

10. The method of adaptive quantization of claim 8 , wherein float input is unsigned.

11. The method of adaptive quantization of claim 1 , further comprising selecting the number of quantization bits for the layer.

12. The method of adaptive quantization of claim 11 , wherein the number of quantization bits for the layer is determined based on its influence to an overall accuracy for the network.

13. The method of adaptive quantization of claim 11 , wherein a lower number of quantization bits for the layer is selected if the layer is less sensitive to quantization.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 3, 2021
From: BLACK SESAME INTERNATIONAL HOLDING LIMITED
To: BLACK SESAME TECHNOLOGIES INC.
Reel/Frame 058301/0364 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 21, 2021
From: WANG, ZUOGUAN; ZHOU, TIAN; GU, QUN
To: BLACK SESAME INTERNATIONAL HOLDING LIMITED
Reel/Frame 057868/0017 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2019
From: WANG, ZUOGUAN; ZHOU, TIAN; GU, QUN
To: BLACK SESAME INTERNATIONAL HOLDING LIMITED
Reel/Frame 050159/0812 →
Continuity (2)
Provisional Application 62795407 · Jan 22, 2019
Related Publication 20200234112A1 · Jul 23, 2020