# US 2021/0174259 A1 · Deep learning numeric data and sparse matrix compression

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

- Number: US 2021/0174259 A1
- Document ID: US20210174259A1
- Status: Published application
- Kind: A1
- Application number: 17/122,384
- Filed: 2020-12-15
- Published: 2021-06-10
- Earliest claimed: 2020-12-15
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Yingyu Miao; Ning Xue
- Web page: https://patentgrep.com/patent/US20210174259A1

## CPC

- G06N 20/00: Machine learning
- 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
- H03M 7/3059: {Digital compression and data reduction techniques where the original information is represented by a subset or similar information, e.g. lossy compression}
- H03M 7/3088: {employing the use of a dictionary, e.g. LZ78}
- H03M 7/702: {Software}
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- H03M 7/6047: {Power optimization with respect to the encoder, decoder, storage or transmission}
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- 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

An apparatus to facilitate deep learning numeric data and sparse matrix compression is disclosed. The apparatus includes a processor comprising a compression engine to: receive a data packet comprising a plurality of cycles of data samples, and for each cycle of the data samples: pass the data samples of the cycle to a compressor dictionary; identify, from the compressor dictionary, tags for each of the data samples, wherein the compressor dictionary comprises at least a first tag for data having a value of zero and a second tag for data having a value of one; and compress the data samples into compressed cycle data by storing the tags as compressed data, wherein the data samples identified with the first tag are compressed using the first tag and the data samples identified with the second tag are compressed using the second tag at the same time as values of the data samples identified with the first tag or the second tag are excluded from the compressed cycle data.

## Claims

### Claim 1

An apparatus comprising:
a processor comprising a compression engine to:
receive a data packet comprising a plurality of cycles of data samples; and
for each cycle of the data samples:
pass the data samples of the cycle to a compressor dictionary;
identify, from the compressor dictionary, tags for each of the data samples, wherein the compressor dictionary comprises at least a first tag for data having a value of zero and a second tag for data having a value of one; and
compress the data samples into compressed cycle data by storing the tags as compressed data, wherein the data samples identified with the first tag are compressed using the first tag and the data samples identified with the second tag are compressed using the second tag at the same time as values of the data samples identified with the first tag or the second tag are excluded from the compressed cycle data.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the compressor dictionary comprises a look up table or a hash table.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the tags further comprise at least a third tag indicating no match in the compressor dictionary, and a plurality of additional tags indicating a partial match of the data sample to at least one value in the compressor dictionary.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the compression engine to compress the data samples further comprises:
storing, subsequent to the tags in the compressed cycle data, partial values of the data samples identified with any of the plurality of additional tags, the partial values comprising sign and exponent values of the data samples having any of the plurality of additional tags; and
storing, subsequent to storing the partial values, a whole portion of the data samples identified with the third tag.

### Claim 5 (depends on 4)

The apparatus of claim 4, wherein the compressed cycle data of each cycle of the data packet is concatenated in a compressed data packet, and wherein a remainder of the compressed data packet subsequent to a last compressed cycle data is zero padded.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein compressing the data samples further comprises adding a size byte to the compressed cycle data, wherein the size byte to indicate a size of the compressed cycle data.

### Claim 7 (depends on 6)

The apparatus of claim 6, wherein the size byte is stored in the compressed cycle data subsequent to the tags and prior to the partial values.

### Claim 8 (depends on 3)

The apparatus of claim 3, wherein the plurality of additional tags are updated after compressing each cycle of the data packet using data values of the data samples from a previous compressed cycle of the data packet.

### Claim 9 (depends on 1)

The apparatus of claim 1, wherein for each cycle of data samples:
divide the data samples into upper half data samples and lower half data samples;
pass the upper half data samples to a first sub-dictionary of the compressor dictionary and the lower half data samples to a second sub-dictionary of the compressor dictionary, wherein the first sub-dictionary and the second sub-dictionary comprise identical entries;
identify the tags for each of the upper half data samples using the first sub-dictionary; and
identify the tags for each of the lower half data samples using the second sub-dictionary;
wherein the identifying the tags for each of the upper half data samples and each of the lower half data sample is performed in parallel.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the tags comprise a 3-bit value, wherein the compressor dictionary stores 16 entries, and wherein the first sub-dictionary comprises 8 entries of the compressor dictionary and the second sub-dictionary comprises another 8 entries of the compressor dictionary.

### Claim 11 (depends on 1)

The apparatus of claim 1, wherein compression engine is applied to output of at least one of activation functions or weight values of a machine learning workload or a deep learning workload.

### Claim 12

At least one non-transitory machine readable storage medium comprising instructions that, when executed, cause at least one processor to at least:
receive, by the at least one processor, a data packet comprising a plurality of cycles of data samples; and
for each cycle of the data samples:
pass the data samples of the cycle to a compressor dictionary;
identify, from the compressor dictionary, tags for each of the data samples, wherein the compressor dictionary comprises at least a first tag for data having a value of zero and a second tag for data having a value of one; and
compress the data samples into compressed cycle data by storing the tags as compressed data, wherein the data samples identified with the first tag are compressed using the first tag and the data samples identified with the second tag are compressed using the second tag at the same time as values of the data samples identified with the first tag or the second tag are excluded from the compressed cycle data.

### Claim 13 (depends on 12)

The at least one non-transitory machine readable storage medium of claim 12, wherein the tags further comprise at least a third tag indicating no match in the compressor dictionary, and a plurality of additional tags indicating a partial match of the data sample to a value in the compressor dictionary.

### Claim 14 (depends on 13)

The at least one non-transitory machine readable storage medium of claim 13, wherein the at least one processor to compress the data samples further comprises the at least one processor to:
store, subsequent to the tags in the compressed cycle data, partial values of the data samples identified with any of the plurality of additional tags, the partial values comprising sign and exponent values of the data samples having any of the plurality of additional tags; and
store, subsequent to storing the partial values, a whole portion of the data samples identified with the third tag.

### Claim 15 (depends on 14)

The at least one non-transitory machine readable storage medium of claim 14, wherein the compressed cycle data of each cycle of the data packet is concatenated in a compressed data packet, and wherein a remainder of the compressed data packet subsequent to a last compressed cycle data is zero padded.

### Claim 16 (depends on 15)

The at least one non-transitory machine readable storage medium of claim 15, wherein the at least one processor to compress the data samples further comprises the at least one processor to add a size byte to the compressed cycle data, wherein the size byte to indicate a size of the compressed cycle data.

### Claim 17

A method comprising:
receiving, by at least one processor, a data packet comprising a plurality of cycles of data samples; and
for each cycle of the data samples:
passing the data samples of the cycle to a compressor dictionary;
identifying, from the compressor dictionary, tags for each of the data samples, wherein the compressor dictionary comprises at least a first tag for data having a value of zero and a second tag for data having a value of one; and
compressing the data samples into compressed cycle data by storing the tags as compressed data, wherein the data samples identified with the first tag are compressed using the first tag and the data samples identified with the second tag are compressed using the second tag at the same time as values of the data samples identified with the first tag or the second tag are excluded from the compressed cycle data.

### Claim 18 (depends on 17)

The method of claim 17, wherein the tags further comprise at least a third tag indicating no match in the compressor dictionary, and a plurality of additional tags indicating a partial match of the data sample to a value in the compressor dictionary.

### Claim 19 (depends on 18)

The method of claim 18, wherein compressing the data samples further comprises:
storing, subsequent to the tags in the compressed cycle data, partial values of the data samples identified with any of the plurality of additional tags, the partial values comprising sign and exponent values of the data samples having any of the plurality of additional tags;
storing, subsequent to storing the partial values, a whole portion of the data samples identified with the third tag; and
adding a size byte to the compressed cycle data, wherein the size byte to indicate a size of the compressed cycle data.

### Claim 20 (depends on 19)

The method of claim 19, wherein the compressed cycle data of each cycle of the data packet is concatenated in a compressed data packet, and wherein a remainder of the compressed data packet subsequent to a last compressed cycle data is zero padded.
