tensorflow / tensorflow/tflite-micro

feat(compression): update tooling to use DECODE operators

Open
#3,256 1 comment 0 reactions 1 assignee View on GitHub

@rkuester is already working on this.

Since Nov 25, 2025.

Dominant language
C++
Stars
3.1k
Forks
1.1k
Avg merge
1d 5h
Merged PRs (30d)
43

Description

Summary

Update the compression tooling to produce models that use DECODE
operators instead of the metadata-based compression scheme.

The interpreter already supports DECODE operators for decompression.
The previous tooling stored compression metadata in the flatbuffer,
requiring the interpreter to detect compressed tensors and requiring
each kernel to implement decompression internally. The updated tooling
inserts explicit DECODE custom operators into the graph, handling
decompression before kernels execute and eliminating per-kernel
decompression logic.

Additionally, refactor the tooling to use a plugin architecture,
enabling multiple compression methods (LUT, Huffman, Pruning) to be
implemented independently.

Changes

  • Replace model_facade with model_editor for TFLite model manipulation
  • Add DECODE operator insertion logic for compressed tensors
  • Add Compressor protocol for compression plugins
  • Implement LUT compression as a plugin (Huffman and Pruning are stubs)
  • Add integration tests verifying compressed models produce correct
    inference results through the TFLM interpreter

Testing

All changes include unit tests. Integration tests run with
--//:with_compression and verify:

  • Compressed model outputs match uncompressed
  • DECODE operators are inserted
  • Compressed models are smaller than originals

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.