# US 2025/0094791 A1 · Value-dependent quantization for machine learning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094791 A1
- Document ID: US20250094791A1
- Status: Published application
- Kind: A1
- Application number: 18/759,483
- Filed: 2024-06-28
- Published: 2025-03-20
- Earliest claimed: 2023-09-14
- Applicants: Seagate Technology LLC
- Inventors: Foo Yee YEO; Yasaman KESHTKARJAHROMI; Paul Roger HEATH
- Web page: https://patentgrep.com/patent/US20250094791A1

## CPC

- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computing system determines a maximum field size for a field containing values of quantized versions of a weight matrix, an input data matrix, and a bias matrix and determines a weight upper bound of scaling factors for the weight matrix based on values of the weight matrix, an input data upper bound of scaling factors for the input data matrix based on values of the input data matrix, and a bias upper bound of scaling factors for the bias matrix based on values of the bias matrix. The computing system also sets a weight scaling factor of the weight matrix, an input data scaling factor of the input data matrix, and a bias scaling factor for the bias matrix in two different cases: when the sum is less than or equal to the bias upper bound and when the sum is greater than the bias upper bound.

## Claims

### Claim 1

A computing-processor-implemented method for quantizing linear operations of machine learning computations, the computing-processor-implemented method comprising:
determining a maximum field size for a field containing values of a quantized version of a weight matrix, a quantized version of an input data matrix, and a quantized version of a bias matrix;
determining a weight upper bound of scaling factors for the weight matrix based on values of elements of the weight matrix and the maximum field size, an input data upper bound of scaling factors for the input data matrix based on values of elements of the input data matrix and the maximum field size, and a bias upper bound of scaling factors for the bias matrix based on values of elements of the bias matrix and the maximum field size;
setting a weight scaling factor of the weight matrix to the weight upper bound, an input data scaling factor of the input data matrix to the input data upper bound, and a bias scaling factor for the bias matrix to a sum of the weight upper bound and the input data upper bound, when the sum is less than or equal to the bias upper bound; and
setting the bias scaling factor for the bias matrix to the bias upper bound and the weight scaling factor of the weight matrix and the input data scaling factor of the input data matrix based on the bias upper bound, when the sum is greater than the bias upper bound.

### Claim 2 (depends on 1)

The computing-processor-implemented method of claim 1, further comprising:
performing an inference on a linear operation as a function of the weight matrix, the input data matrix, and the bias matrix using a neural network.

### Claim 3 (depends on 2)

The computing-processor-implemented method of claim 2, wherein the linear operation includes a multiplication as a function of the weight matrix and the input data matrix to yield a product matrix.

### Claim 4 (depends on 3)

The computing-processor-implemented method of claim 3, wherein the linear operation includes an addition operation as a function of the product matrix and the bias matrix.

### Claim 5 (depends on 1)

The computing-processor-implemented method of claim 1, further comprising:
quantizing the weight matrix based on the weight scaling factor to yield a quantized weight matrix;
quantizing the input data matrix based on the input data scaling factor to yield a quantized input data matrix;
quantizing the bias matrix based on the bias scaling factor to yield a quantized bias matrix; and
performing an inference on a linear operation as a function of the quantized weight matrix, the quantized input data matrix, and the quantized bias matrix using a neural network to yield a quantized output matrix.

### Claim 6 (depends on 5)

The computing-processor-implemented method of claim 5, further comprising:
de-quantizing the quantized output matrix to yield a scaled-down output matrix.

### Claim 7 (depends on 5)

The computing-processor-implemented method of claim 5, wherein the linear operation includes a multiplication of the quantized weight matrix and the quantized input data matrix that yields a product matrix and an addition of the product matrix to the quantized bias matrix.

### Claim 8

A computing system for quantizing linear operations of machine learning computations, the computing system comprising:
one or more hardware computing processors;
a field size bounding engine executable by the one or more hardware computing processors and configured to determine a maximum field size for a field containing values of a quantized version of a weight matrix, a quantized version of an input data matrix, and a quantized version of a bias matrix;
a scaling factor bounding engine executable by the one or more hardware computing processors and configured to determine a weight upper bound of scaling factors for the weight matrix based on values of elements of the weight matrix and the maximum field size, an input data upper bound of scaling factors for the input data matrix based on values of elements of the input data matrix and the maximum field size, and a bias upper bound of scaling factors for the bias matrix based on values of elements of the bias matrix and the maximum field size; and
a scaling factor assigner executable by the one or more hardware computing processors and configured to set a weight scaling factor of the weight matrix to the weight upper bound, an input data scaling factor of the input data matrix to the input data upper bound, and a bias scaling factor for the bias matrix to a sum of the weight upper bound and the input data upper bound, when the sum is less than or equal to the bias upper bound and to set the bias scaling factor for the bias matrix to the bias upper bound and the weight scaling factor of the weight matrix and the input data scaling factor of the input data matrix based on the bias upper bound, when the sum is greater than the bias upper bound.

### Claim 9 (depends on 8)

The computing system of claim 8, further comprising:
a neural network executable by the one or more hardware computing processors and configured to perform an inference on a linear operation as a function of the weight matrix, the input data matrix, and the bias matrix using a neural network.

### Claim 10 (depends on 9)

The computing system of claim 9, wherein the linear operation includes a multiplication as a function of the weight matrix and the input data matrix to yield a product matrix.

### Claim 11 (depends on 10)

The computing system of claim 10, wherein the linear operation includes an addition operation as a function of the product matrix and the bias matrix.

### Claim 12 (depends on 8)

The computing system of claim 8, further comprising:
a quantizing engine executable by the one or more hardware computing processors and configured to quantize the weight matrix based on the weight scaling factor to yield a quantized weight matrix, quantize the input data matrix based on the input data scaling factor to yield a quantized input data matrix, and quantize the bias matrix based on the bias scaling factor to yield a quantized bias matrix; and
a neural network executable by the one or more hardware computing processors and configured to perform an inference on a linear operation as a function of the quantized weight matrix, the quantized input data matrix, and the quantized bias matrix using a neural network to yield a quantized output matrix.

### Claim 13 (depends on 12)

The computing system of claim 12, wherein the quantizing engine is further configured to de-quantize the quantized output matrix to yield a scaled-down output matrix.

### Claim 14 (depends on 12)

The computing system of claim 12, wherein the linear operation includes a multiplication of the quantized weight matrix and the quantized input data matrix that yields a product matrix and an addition of the product matrix to the quantized bias matrix.

### Claim 15

One or more tangible processor-readable storage media embodied with instructions for executing on one or more processors and circuits of a computing device a process for quantizing linear operations of machine learning computations, the process comprising:
determining a maximum field size for a field containing values of a quantized version of a weight matrix, a quantized version of an input data matrix, and a quantized version of a bias matrix;
determining a weight upper bound of scaling factors for the weight matrix based on values of elements of the weight matrix and the maximum field size, an input data upper bound of scaling factors for the input data matrix based on values of elements of the input data matrix and the maximum field size, and a bias upper bound of scaling factors for the bias matrix based on values of elements of the bias matrix and the maximum field size;
setting a weight scaling factor of the weight matrix to the weight upper bound, an input data scaling factor of the input data matrix to the input data upper bound, and a bias scaling factor for the bias matrix to a sum of the weight upper bound and the input data upper bound, when the sum is less than or equal to the bias upper bound; and
setting the bias scaling factor for the bias matrix to the bias upper bound and the weight scaling factor of the weight matrix and the input data scaling factor of the input data matrix based on the bias upper bound, when the sum is greater than the bias upper bound.

### Claim 16 (depends on 15)

The one or more tangible processor-readable storage media of claim 15, wherein the process further comprises:
performing an inference on a linear operation as a function of the weight matrix, the input data matrix, and the bias matrix using a neural network.

### Claim 17 (depends on 16)

The one or more tangible processor-readable storage media of claim 16, wherein the linear operation includes a multiplication as a function of the weight matrix and the input data matrix to yield a product matrix and an addition operation as a function of the product matrix and the bias matrix.

### Claim 18 (depends on 15)

The one or more tangible processor-readable storage media of claim 15, wherein the process further comprises:
quantizing the weight matrix based on the weight scaling factor to yield a quantized weight matrix;
quantizing the input data matrix based on the input data scaling factor to yield a quantized input data matrix;
quantizing the bias matrix based on the bias scaling factor to yield a quantized bias matrix; and
performing an inference on a linear operation as a function of the quantized weight matrix, the quantized input data matrix, and the quantized bias matrix using a neural network to yield a quantized output matrix.

### Claim 19 (depends on 18)

The one or more tangible processor-readable storage media of claim 18, wherein the process further comprises:
de-quantizing the quantized output matrix to yield a scaled-down output matrix.

### Claim 20 (depends on 18)

The one or more tangible processor-readable storage media of claim 18, wherein the linear operation includes a multiplication of the quantized weight matrix and the quantized input data matrix that yields a product matrix and an addition of the product matrix to the quantized bias matrix.
