# US 2026/0300701 A1 · Intra-layer mixed precision quantization for neural networks

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

- Number: US 2026/0300701 A1
- Document ID: US20260300701A1
- Status: Published application
- Kind: A1
- Application number: 19/096,233
- Filed: 2025-03-31
- Published: 2026-10-01
- Earliest claimed: 2025-03-31
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Julian Faraone; Qiuwen Lou; Sankalp Dayal
- Web page: https://patentgrep.com/patent/US20260300701A1

## 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/048: Activation functions
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Devices and techniques are generally described for intra-layer mixed precision quantization. In some examples, a first activation matrix comprising a plurality of rows may be computed. A set of outlier rows may be determined from the first activation matrix. A set of non-outliers may be determined from the first activation matrix. A first quantization algorithm may be selected for the set of outlier rows. A second quantization algorithm may be selected for the set of non-outlier rows. A first quantized activation matrix may be generated using the first quantization algorithm and the second quantization algorithm. A second activation matrix for a second layer of the neural network may be computed using the first quantized activation matrix and a first weight matrix.

## Claims

### Claim 1

A system comprising:
a neural network accelerator apparatus comprising:
one or more processors;
a compute engine; and
one or more computer-readable media comprising static random access memory (SRAM) and dynamic random access memory (DRAM), the one or more computer-readable media storing processor-executable instructions which, when executed using the one or more processors, perform operations comprising:
computing, for a first layer of a neural network, a first activation matrix, wherein the first activation matrix comprises a first plurality of rows, wherein a first row of the first plurality of rows comprises a plurality of activation values;
determining, based on the plurality of activation values, a set of outlier rows;
determining, based on the plurality of activation values, a set of non-outlier rows;
selecting, for the set of outlier rows, a first quantization algorithm, wherein the first quantization algorithm generates output having a first bitwidth;
selecting, for the set of non-outlier rows, a second quantization algorithm, wherein the second quantization algorithm generates output having a second bitwidth, wherein the second bitwidth is less than the first bitwidth;
generating, a first quantized activation matrix using the first quantization algorithm to quantize activation values of the set of outlier rows and using the second quantization algorithm to quantize activation values of the set of non-outlier rows; and
computing, by the compute engine, a second activation matrix for a second layer of the neural network using the first quantized activation matrix and a first weight matrix.

### Claim 2 (depends on 1)

The system of claim 1, further comprising an adder circuit, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
computing, using the adder circuit, a set of accumulated activation values comprising a accumulated activation value for each row of the first activation matrix; and
generating a ranking of the set of accumulated activation values, wherein determining the set of outlier rows is based on the ranking of the set of accumulated activation values.

### Claim 3 (depends on 2)

The system of claim 2, further comprising a first memory bus and a second memory bus, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
generating, an outlier matrix, wherein the outlier matrix comprises the set of outlier rows from the first activation matrix;
generating, a non-outlier matrix, wherein the non-outlier matrix comprises the set of non-outlier rows from the first activation matrix;
generating, by quantizing the outlier matrix using the first quantization algorithm, a quantized outlier matrix;
generating, by quantizing the non-outlier matrix using the second quantization algorithm, a quantized non-outlier matrix;
sending, by the first memory bus, the quantized outlier matrix to the second layer of the neural network, wherein the first memory bus has a first bitwidth; and
sending, by the second memory bus, the quantized non-outlier matrix to the second layer of the neural network, wherein the second memory bus has a second bitwidth, wherein the second bitwidth is lower than the first bitwidth, wherein the first quantized activation matrix comprises the quantized outlier matrix and the quantized non-outlier matrix.

### Claim 4

A system comprising:
a neural network accelerator apparatus comprising:
one or more processors; and
one or more computer-readable media storing processor executable instructions which, when executed using the one or more processors, perform operations comprising:
determining, for a first layer of a neural network, a first tensor wherein the first tensor comprises a plurality of rows;
selecting, from the first tensor, a first set of rows from among the plurality of rows;
selecting, from the first tensor, a second set of rows from among the plurality of rows;
selecting, for the first set of rows, a first quantization algorithm associated with a first bitwidth;
selecting, for the second set of rows, a second quantization algorithm associated with a second bitwidth;
generating, a quantized first tensor by quantizing values of the first set of rows using the first quantization algorithm and quantizing values of the second set of rows using the second quantization algorithm; and
computing an output for a second layer of the neural network using the quantized first tensor.

### Claim 5 (depends on 4)

The system of claim 4 further comprising a comparator circuit, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
determining, using the comparator circuit, a first maximum value for a first row of the first tensor;
determining, using the comparator circuit, a second maximum value for a second row of the first tensor;
determining, by the comparator circuit, that the first maximum value is greater than the second maximum value; and
determining, based on the first maximum value being greater than the second maximum value, the first set of rows as outlier rows for the first tensor, wherein the first row is included in the first set of rows.

### Claim 6 (depends on 4)

The system of claim 4, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
predicting the first set of rows using a first machine learning model.

### Claim 7 (depends on 6)

The system of claim 6, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising;
determining, using the first machine learning model, the first bitwidth for the first set of rows, wherein the first bitwidth is determined based on compliance with a first performance metric of the neural network; and
determining, using the first machine learning model, the second bitwidth for the second set of rows, wherein the second bitwidth is determined based on compliance with the first performance metric of the neural network.

### Claim 8 (depends on 4)

The system of claim 4, further comprising a first memory bus and a second memory bus, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
generating a reordered tensor based on the first tensor, wherein the reordered tensor comprises the first set of rows grouped together in the reordered tensor, and the second set of rows grouped together in the reordered tensor, wherein a quantized first tensor comprises the reordered tensor;
sending, using the first memory bus, values from the first set of rows to the second layer of the neural network, wherein the first memory bus has the first bitwidth; and
sending, using the second memory bus, values from the second set of rows to the second layer of the neural network, wherein the second memory bus has the second bitwidth.

### Claim 9 (depends on 8)

The system of claim 8, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising reordering a first weight tensor based on the reordered tensor, wherein the first weight tensor is reordered prior to computing the output for the second layer of the neural network.

### Claim 10 (depends on 4)

The system of claim 4, further comprising an adder circuit, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
computing, using the adder circuit, a set of accumulated values comprising a respective accumulated value for each row of the first tensor; and
generating a ranking of the set of accumulated values, wherein selecting the first set of rows is based on the ranking of the set of accumulated values.

### Claim 11 (depends on 4)

The system of claim 4, wherein the first set of rows comprises a set of outlier rows wherein, the set of outlier rows are determined to be outliers from remaining rows in the first tensor.

### Claim 12 (depends on 11)

The system of claim 11, wherein the one or more computer-readable media stores further processor-executable instructions which, when executed using the one or more processors, perform further operations comprising:
selecting, the first quantization algorithm that generates a high bitwidth representation of the set of outlier rows;
selecting, the second quantization algorithm that generates a low bitwidth representation of the second set of rows comprising a set of non-outlier rows;
generating, the high bitwidth representation of the set of outlier rows; and
generating, the low bitwidth representation of the set of non-outlier rows, wherein the first set of rows comprises a set of outlier rows, generating a quantized first tensor, using the high bitwidth representation of the set of outlier rows and the low bitwidth representation of the set of non-outlier rows.

### Claim 13

A method comprising:
computing, for a first layer of a neural network, a first tensor wherein the first tensor comprises a plurality of rows;
selecting, from the first tensor, a first set of rows from among the plurality of rows;
selecting, from the first tensor, a second set of rows from among the plurality of rows;
selecting, for the first set of rows, a first quantization algorithm associated with a first bitwidth;
selecting, for the second set of rows, a second quantization algorithm associated with a second bitwidth;
generating, a quantized first tensor by quantizing values of the first set of rows using the first quantization algorithm and quantizing values of the second set of rows using the second quantization algorithm; and
computing an output for a second layer of the neural network using the quantized first tensor.

### Claim 14 (depends on 13)

The method of claim 13 comprising:
determining, using a comparator circuit, a first maximum value for a first row of the first tensor;
determining, using the comparator circuit, a second maximum value for a second row of the first tensor; and
determining, based on the first maximum value being greater that the second maximum value, the first set of rows as outlier rows for the first tensor, wherein the first row is included in the first set of rows.

### Claim 15 (depends on 13)

The method of claim 13 comprising predicting the first set of rows using a first machine learning model.

### Claim 16 (depends on 15)

The method of claim 15 comprising:
determining, using the first machine learning model, the first bitwidth for the first set of rows, wherein the first bitwidth is determined based on compliance with a first performance metric of the neural network; and
determining, using the first machine learning model, the second bitwidth for the second set of rows, wherein the second bitwidth is determined based on compliance with the first performance metric of the neural network.

### Claim 17 (depends on 13)

The method of claim 13, comprising:
generating a reordered tensor based on the first tensor, wherein the reordered tensor comprises the first set of rows grouped together in the reordered tensor, and the second set of rows grouped together in the reordered tensor, wherein a quantized first tensor comprises the reordered tensor;
sending, using a first memory bus, values from the first set of rows, to the second layer of the neural network, wherein the first memory bus has the first bitwidth; and
sending, using a second memory bus, values from the second set of rows, to the second layer of the neural network, wherein the second memory bus has the second bitwidth.

### Claim 18 (depends on 17)

The method of claim 17, comprising reordering a first weight tensor based on the reordered tensor, wherein the first weight tensor is reordered prior to computing the output for the second layer of the neural network.

### Claim 19 (depends on 13)

The method of claim 13, comprising:
computer, using an adder circuit, a set of accumulated values comprising a respective accumulated value for each row of the first tensor; and
generating a ranking of the set of accumulated values, wherein selecting the first set of rows is based on the ranking of the set of accumulated values.

### Claim 20 (depends on 13)

The method of claim 13, comprising:
selecting, the first quantization algorithm that generates a high bitwidth representation of the first set of rows;
selecting, the second quantization algorithm that generates a low bitwidth representation of the second set of rows;
generating, the high bitwidth representation of the first set of rows; and
generating, the low bitwidth representation of the second set of rows, wherein the first set of rows comprises a set of outlier rows and the second set of rows comprises a set of non-outlier rows, generating the quantized first tensor, using the high bitwidth representation of the set of outlier rows and the low bitwidth representation of the set of non-outlier rows.

### Claim 21 (depends on 13)

The method of claim 13, wherein the computing the output for the second layer of the neural network using the quantized first tensor comprises:
sending, using a first memory bus, a first row of the quantized first tensor to a first neural processing unit, wherein the first row of the quantized first tensor comprises values quantized using the first quantization algorithm; and
sending, using a second memory bus, a second row of the quantized first tensor to a second neural processing unit, wherein the second row of the quantized first tensor comprises values quantized using the second quantization algorithm.

### Claim 22 (depends on 13)

The method of claim 13, wherein the computing the output for the second layer of the neural network using the quantized first tensor comprises:
sending, using a first memory bus, a first row of the quantized first tensor to a first neural processing unit during a first time slot, wherein the first row of the quantized first tensor comprises values quantized using the first quantization algorithm; and
sending, using the first memory bus, a second row of the quantized first tensor to a second neural processing unit during a second time slot, wherein the second row of the quantized first tensor comprises values quantized using the second quantization algorithm.
