# US 2026/0037595 A1 · Tensor matrix multiplication with quantization

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

- Number: US 2026/0037595 A1
- Document ID: US20260037595A1
- Status: Published application
- Kind: A1
- Application number: 18/792,884
- Filed: 2024-08-02
- Published: 2026-02-05
- Earliest claimed: 2024-08-02
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Cedric LICHTENAU; Dan GREINER; Razvan Peter FIGULI; Simon BUBECK
- Web page: https://patentgrep.com/patent/US20260037595A1

## CPC

- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 5/01: for shifting, e.g. justifying, scaling, normalising {(digital stores in which the information is moved stepwise, e.g. shift-registers G11C19/00; digital stores in which the information circulates G11C21/00)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Tensor multiplication with quantization includes obtaining first and second input tensors, obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor, performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication, and generating output elements, for an output tensor, using the scaled results. Optional additional quantization is performed on elements of an input tensor to provide at least some of the elements of the selected data type for the matrix multiplication.

## Claims

### Claim 1

A computer program product comprising:
a set of one or more computer-readable storage media;
program instructions, collectively stored in the set of one or more computer-readable storage media, for causing at least one computing device to perform computer operations including:
executing an instruction, the executing the instruction including:
obtaining a first input tensor and a second input tensor;
obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor;
performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication; and
generating output elements, for an output tensor, using the scaled results.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization is to be performed.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the elements of the first input tensor include elements of a first data type, and the elements of the second input tensor include elements of a second data type, the first data type being different than the second data type.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein elements of an input tensor, of the first input tensor or the second input tensor, are of a different data type than the selected data type, and wherein the executing the instruction further includes performing quantization of the elements of the input tensor to provide at least some of the elements of the selected data type for the matrix multiplication.

### Claim 5 (depends on 4)

The computer program product of claim 4, wherein the quantization of an element of the input tensor includes converting the element of the input tensor using a scale value to scale the element, using an offset value to apply an offset, and using a clip maximum value and a clip minimum value to enforce a maximum value and a minimum value for the element of the selected data type.

### Claim 6 (depends on 4)

The computer program product of claim 4, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization of the intermediate results and the quantization of the elements of the input tensor are to be performed.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the generating includes performing one or more operations using a third input tensor and the scaled results to obtain the output elements.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the selected data type is of a length that is shorter than a length of the elements of the first input tensor or the elements of the second input tensor.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the generated output elements are provided in another data type, the another data type being of a length that is greater than the length of the selected data type.

### Claim 10

A computer system comprising:
at least one computing device;
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more computer-readable storage media, for causing the at least one computing device to perform computer operations including:
executing an instruction, the executing the instruction including:
obtaining a first input tensor and a second input tensor;
obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor;
performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication; and
generating output elements, for an output tensor, using the scaled results.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization is to be performed.

### Claim 12 (depends on 10)

The computer system of claim 10, wherein the elements of the first input tensor include elements of a first data type, and the elements of the second input tensor include elements of a second data type, the first data type being different than the second data type.

### Claim 13 (depends on 10)

The computer system of claim 10, wherein elements of an input tensor, of the first input tensor or the second input tensor, are of a different data type than the selected data type, and wherein the wherein the executing the instruction further includes performing quantization of the elements of the input tensor to provide at least some of the elements of the selected data type for the matrix multiplication.

### Claim 14 (depends on 13)

The computer system of claim 13, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization of the intermediate results and the quantization of the elements of the input tensor are to be performed.

### Claim 15 (depends on 10)

The computer system of claim 10, wherein the generating includes performing one or more operations using a third input tensor and the scaled results to obtain the output elements.

### Claim 16 (depends on 10)

The computer system of claim 10, wherein the selected data type is of a length that is shorter than a length of the elements of the first input tensor or the elements of the second input tensor, and wherein the generated output elements are provided in another data type, the another data type being of a length that is greater than the length of the selected data type.

### Claim 17

A computer-implemented method comprising:
executing an instruction, the executing the instruction including:
obtaining a first input tensor and a second input tensor;
obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor;
performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication; and
generating output elements, for an output tensor, using the scaled results.

### Claim 18 (depends on 17)

The method of claim 17, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization is to be performed.

### Claim 19 (depends on 17)

The method of claim 17, wherein the elements of the first input tensor include elements of a first data type, and the elements of the second input tensor include elements of a second data type, the first data type being different than the second data type.

### Claim 20 (depends on 17)

The method of claim 17, wherein elements of an input tensor, of the first input tensor or the second input tensor, are of a different data type than the selected data type, and wherein the wherein the executing the instruction further includes performing quantization of the elements of the input tensor to provide at least some of the elements of the selected data type for the matrix multiplication.

### Claim 21 (depends on 20)

The method of claim 20, wherein the executing the instruction further includes checking a value of an indicator and determining, based on the value, that the quantization of the intermediate results and the quantization of the elements of the input tensor are to be performed.

### Claim 22 (depends on 17)

The method of claim 17, wherein the generating includes performing one or more operations using a third input tensor and the scaled results to obtain the output elements.

### Claim 23 (depends on 17)

The method of claim 17, wherein the selected data type is of a length that is shorter than a length of the elements of the first input tensor or the elements of the second input tensor, and wherein the generated output elements are provided in another data type, the another data type being of a length that is greater than the length of the selected data type.

### Claim 24

A computer system comprising:
at least one hardware accelerator to be used in executing an instruction, the executing the instruction including:
obtaining a first input tensor and a second input tensor;
checking a value of an indicator and determining, based on the value, that quantization is to be performed;
obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor, wherein the selected data type is of a length that is shorter than a length of the elements of the first input tensor or the elements of the second input tensor;
performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication; and
generating output elements, for an output tensor, using the scaled results, wherein the generated output elements are provided in another data type, the another data type being of a length that is greater than the length of the selected data type.

### Claim 25

A computer-implemented method comprising:
executing an instruction, the executing the instruction including:
obtaining a first input tensor and a second input tensor;
checking a value of an indicator and determining, based on the value, that quantization is to be performed;
obtaining elements of a selected data type based on elements of the first input tensor and elements of the second input tensor, wherein the selected data type is of a length that is shorter than a length of the elements of the first input tensor or the elements of the second input tensor;
performing matrix multiplication on the elements of the selected data type, the matrix multiplication including performing quantization of intermediate results, and the quantization scaling the intermediate results to provide scaled results of the matrix multiplication; and
generating output elements, for an output tensor, using the scaled results, wherein the generated output elements are provided in another data type, the another data type being of a length that is greater than the length of the selected data type.
