tensorflow / tensorflow/tflite-micro
feat(compression): update tooling to use DECODE operators
@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_facadewithmodel_editorfor TFLite model manipulation - Add DECODE operator insertion logic for compressed tensors
- Add
Compressorprotocol 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.