IP Library Granted Patent US 11,803,734
Granted Patent B2
US 11,803,734 · App. 15/849,617 · Granted Oct 31, 2023

Adaptive quantization for neural networks

Inventors: Daniel I. Lowell (Austin, TX); Sergey Voronov (Chapel Hill, NC); Mayank Daga (Austin, TX)
Assignee: Advanced Micro Devices, Inc.
G06N3/063G06N3/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 11,803,734
App. No.
15/849,617
Granted
Oct 31, 2023
Kind
B2
Abstract

Methods, devices, systems, and instructions for adaptive quantization in an artificial neural network (ANN) calculate a distribution of ANN information; select a quantization function from a set of quantization functions based on the distribution; apply the quantization function to the ANN information to generate quantized ANN information; load the quantized ANN information into the ANN; and generate an output based on the quantized ANN information. Some examples recalculate the distribution of ANN information and reselect the quantization function from the set of quantization functions based on the resampled distribution if the output does not sufficiently correlate with a known correct output. In some examples, the ANN information includes a set of training data. In some examples, the ANN information includes a plurality of link weights.

Claims (66)

1. A processor configured for adaptive quantization in an artificial neural network (ANN), the processor comprising:

processor circuitry configured to calculate a distribution of ANN information;

processor circuitry configured to select a quantization function for each layer of the ANN from a set of quantization functions based on the distribution, wherein a first layer of the ANN has a different selected quantization function than a second layer of the ANN;

processor circuitry configured to apply the quantization function to the ANN information to generate quantized ANN information;

processor circuitry configured to load the quantized ANN information into the ANN; and

processor circuitry configured to generate an output based on the quantized ANN information.

2. The processor of claim 1 , further comprising processor circuitry configured to, on a condition that the output does not meet an acceptability criterion:

recalculate the distribution of ANN information; and

reselect the quantization function from the set of quantization functions based on the recalculated distribution.

3. The processor of claim 1 , wherein the ANN information comprises a set of training data.

4. The processor of claim 1 , wherein the ANN information comprises a plurality of link weights.

5. The processor of claim 4 , further comprising processor circuitry configured to:

calculate a distribution of link weights for each of a plurality of layers of the ANN;

select a quantization function to the plurality of link weights for each of the plurality of layers of the ANN based on each distribution; and

apply the respective quantization function to the link weights for each of the plurality of layers.

6. The processor of claim 4 , further comprising processor circuitry configured to:

calculate a distribution of link weights for each of a plurality of subsets of layers of the ANN;

select a quantization function to the plurality of link weights for each of the plurality of subsets of layers of the ANN based on each distribution; and

apply the respective quantization function to the link weights for each of the plurality of subsets of layers.

7. The processor of claim 1 , further comprising processor circuitry configured to apply a heuristic to the output and a known correct output, and on a condition that the heuristic is satisfied, to:

recalculate the distribution of ANN information; and

reselect the quantization function from the set of quantization functions based on the recalculated distribution.

8. The processor of claim 1 , wherein the different selected quantization function is selected for a group of layers which includes the first layer.

9. A method for adaptive quantization in an artificial neural network (ANN), comprising:

calculating a distribution of ANN information;

selecting a quantization function for each layer of the ANN from a set of quantization functions based on the distribution, wherein a first layer of the ANN has a different selected quantization function than a second layer of the ANN;

applying the quantization function to the ANN information to generate quantized ANN information;

loading the quantized ANN information into the ANN; and

generating an output based on the quantized ANN information.

10. The method of claim 9 , further comprising, on a condition that the output does not meet an acceptability criterion:

recalculating the distribution of ANN information; and

reselecting the quantization function from the set of quantization functions based on the recalculated distribution.

11. The method of claim 9 , wherein the ANN information comprises a set of training data.

12. The method of claim 9 , wherein the ANN information comprises a plurality of link weights.

13. The method of claim 12 , further comprising:

calculating a distribution of link weights for each of a plurality of layers of the ANN;

selecting a quantization function to the plurality of link weights for each of the plurality of layers of the ANN based on each distribution; and

applying the respective quantization function to the link weights for each of the plurality of layers.

14. The method of claim 12 , further comprising:

calculating a distribution of link weights for each of a plurality of subsets of layers of the ANN;

selecting a quantization function to the plurality of link weights for each of the plurality of subsets of layers of the ANN based on each distribution; and

applying the respective quantization function to the link weights for each of the plurality of subsets of layers.

15. The method of claim 9 , further comprising applying a heuristic to the output and a known correct output on a condition that the output does not meet an acceptability criterion, and on a condition that the heuristic is satisfied:

recalculate the distribution of ANN information; and

reselect the quantization function from the set of quantization functions based on the recalculated distribution.

16. The method of claim 9 , wherein the different selected quantization function is selected for a group of layers which includes the first layer.

17. A non-transitory computer-readable medium comprising instructions thereon which when executed by a processor configured for adaptive quantization in an artificial neural network (ANN), cause circuitry of the processor to:

calculate a distribution of ANN information;

select a quantization function for each layer of the ANN from a set of quantization functions based on the distribution, wherein a first layer of the ANN has a different selected quantization function than a second layer of the ANN;

apply the quantization function to the ANN information to generate quantized ANN information;

load the quantized ANN information into the ANN; and

generate an output based on the quantized ANN information.

18. The non-transitory computer-readable medium of claim 17 , further comprising instructions thereon which when executed by a processor configured for adaptive quantization in an artificial neural network (ANN), cause circuitry of the processor to, on a condition that the output does not meet an acceptability criterion:

recalculate the distribution of ANN information; and

reselect the quantization function from the set of quantization functions based on the recalculated distribution.

19. The non-transitory computer-readable medium of claim 17 , wherein the ANN information comprises a set of training data.

20. The non-transitory computer-readable medium of claim 17 , wherein the ANN information comprises a plurality of link weights.

21. The non-transitory computer-readable medium of claim 20 , further comprising instructions thereon which when executed by a processor configured for adaptive quantization in an artificial neural network (ANN), cause circuitry of the processor to:

calculate a distribution of link weights for each of a plurality of layers of the ANN;

select a quantization function to the plurality of link weights for each of the plurality of layers of the ANN based on each distribution; and

apply the respective quantization function to the link weights for each of the plurality of layers.

22. The non-transitory computer-readable medium of claim 20 , further comprising instructions thereon which when executed by a processor configured for adaptive quantization in an artificial neural network (ANN), cause circuitry of the processor to:

calculate a distribution of link weights for each of a plurality of subsets of layers of the ANN;

select a quantization function to the plurality of link weights for each of the plurality of subsets of layers of the ANN based on each distribution; and

apply the respective quantization function to the link weights for each of the plurality of subsets of layers.

23. The non-transitory computer-readable medium of claim 17 , wherein the different selected quantization function is selected for a group of layers which includes the first layer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 19, 2018
From: LOWELL, DANIEL I.; VORONOV, SERGEY; DAGA, MAYANK
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 044682/0434 →
Continuity (1)
Related Publication 20190188557A1 · Jun 20, 2019
Cited By (1)
US 12,694,285