The invention belongs to the technical field of
artificial intelligence and
data compression. In particular to a neural
network parameter compression method based on bit-plane run-length coding, which aims at bit-level distribution characteristics of quantization parameters, and realizes efficient
lossless compression through
sign bit separation, negative non-
sign bit flipping, high-bit-plane expansion and extended run-length coding. The method comprises the following steps: separating sign bits and flipping negative non-sign bits to optimize high-order sparsity; selecting the maximum m bit planes (m ranges from 2 to 5 and can be adaptively selected) from the next bit of the
sign bit, and expanding the m bit planes into a one-dimensional bit
stream according to columns; extended run length types of all zero segments, all one segment, a zero segment ending with a single 1 and a zero segment ending with two continuous 1 are adopted for coding, and the run length supports multi-gear self-adaptive bit width. A code
stream formed by combining the low-order transparent transmission part, the sign bit and the run length code is output, and the efficiency can be further improved by combining numerical-level sparse coding. By optimizing
bit plane distribution and a run-length mode, the compression rate is remarkably improved, hardware is easy and convenient to implement, and the method is suitable for storage and transmission of neural network weights and intermediate features and particularly suitable for end-side equipment with
limited resources and efficient
cloud storage scenes.