# US 2026/0303119 A1 · Variable length encoding for ml matrices

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

- Number: US 2026/0303119 A1
- Document ID: US20260303119A1
- Status: Published application
- Kind: A1
- Application number: 19/093,061
- Filed: 2025-03-27
- Published: 2026-10-01
- Earliest claimed: 2025-03-27
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Holger Heinrich GRUEN
- Web page: https://patentgrep.com/patent/US20260303119A1

## CPC

- H03M 7/4093: {Variable length to variable length coding}
- H03M 7/6011: {Encoder aspects}
- H03M 7/6058: {Saving memory space in the encoder or decoder}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

Embodiments herein relate to storing the bit widths of values of matrices associated with an ML model, including quantized matrices, in a header. In the header, each number of bits included in a matrix is represented by an encoded value, and the encoded value is stored in a header. Different bits can be represented by a different encoded value, where each encoded value occupies the same amount of bits.

## Claims

### Claim 1

A computing system comprising:
a processor; and
memory comprising:
a matrix associated with an ML (machine learning) model, wherein the matrix comprises at least two entries, wherein the at least two entries store a different number of bits; and
a block header for the matrix that stores encoded values for representing bit widths of the at least two entries, wherein the encoded values are different.

### Claim 2 (depends on 1)

The computing system of claim 1, wherein the matrix comprises at least three entries, wherein a first entry and a second entry store a same number of bits, and wherein a third entry stores a number of bits different than the second entry and different than the first entry.

### Claim 3 (depends on 2)

The computing system of claim 2 wherein the block header stores two copies of a first encoded value to represent the first entry and the second entry, and
a second, different encoded value, to represent the third entry.

### Claim 4 (depends on 1)

The computing system of claim 1 further comprising:
an address in memory of one of the at least two entries based on the block header, wherein determining the address comprises:
selecting an entry of the block header;
summing previous entries of the block header; and
determining the address in memory of the entry based on the summation.

### Claim 5 (depends on 4)

The computing system of claim 4, wherein summing the previous entries comprises summing the previous at least two entries from left to right.

### Claim 6 (depends on 4)

The computing system of claim 4 wherein summing the previous entries comprises summing the previous at least two entries in a randomized pattern.

### Claim 7 (depends on 1)

The computing system of claim 1, wherein each of the encoded values occupies the same amount of memory.

### Claim 8 (depends on 1)

The computing system of claim 1, wherein the ML model is a trained ML model.

### Claim 9 (depends on 8)

The computing system of claim 8, wherein the matrix is a quantized weight matrix from the trained ML model.

### Claim 10 (depends on 1)

The computing system of claim 1, wherein the matrix comprises at least three entries, wherein a first entry, a second entry, and a third entry each store a different number of bits, the computing system further comprising:
a first encoded value to the first entry, a second encoded value to the second entry, and a third encoded value to the third entry, wherein the first, second, and third encoded values are all different.

### Claim 11

A method comprising:
receiving a matrix associated with an ML (machine learning) model, wherein the matrix comprises at least two entries, wherein the at least two entries store a different number of bits;
assigning encoded values to the at least two entries based on the number of bits, wherein the encoded values are different; and
generating a block header for the matrix that stores the encoded values.

### Claim 12 (depends on 11)

The method of claim 11, wherein the matrix comprises at least three entries, wherein a first entry and a second entry store a same number of bits, and wherein a third entry stores a number of bits different than the second entry and different than the first entry.

### Claim 13 (depends on 12)

The method of claim 12 further comprising:
assigning a first encoded value to the first entry and the second entry; and
assigning a second, different encoded value, to the third entry.

### Claim 14 (depends on 11)

The method of claim 11 further comprising:
determining, based on the block header, an address in memory of one of the at least two entries, wherein determining the address comprises:
selecting an entry of the block header;
summing previous entries of the block header; and
determining the address in memory of the entry based on the summation.

### Claim 15 (depends on 14)

The method of claim 14, wherein summing the previous entries comprises summing the previous at least two entries from left to right.

### Claim 16 (depends on 14)

The method of claim 14 wherein summing the previous entries comprises summing the previous at least two entries in a randomized pattern.

### Claim 17 (depends on 11)

The method of claim 11, wherein each of the encoded values occupies the same amount of memory.

### Claim 18 (depends on 11)

The method of claim 11, wherein the ML model is a trained ML model.

### Claim 19 (depends on 11)

The method of claim 11, wherein the matrix comprises at least three entries, wherein a first entry, a second entry, and a third entry each store a different number of bits, the method further comprising:
assigning a first encoded value to the first entry, a second encoded value to the second entry, and a third encoded value to the third entry, wherein the first, second, and third encoded values are all different.

### Claim 20

A computer-readable storage medium having computer-readable program code embodied therewith, the computer-readable program code executable by one or more computer processors to perform operations, the operations comprising:
receiving a matrix associated with an ML (machine learning) model, wherein the matrix comprises at least two entries, wherein the at least two entries store a different number of bits;
assigning encoded values to the at least two entries based on the number of bits, wherein the encoded values are different; and
generating a block header for the matrix that stores the encoded values.
