Inside tensorflow/compression: frozen at TensorFlow 2.14, with an ops-only escape hatch
Data compression in TensorFlow
At a glance
- What is it?
- TensorFlow Compression has been in maintenance mode since February 2024, and its support window narrowed twice after that: the full package stopped at TensorFlow 2.14, and the C++ ops package now stops at 2.18. What remains is a range coder, a set of entropy models and four install recipes that all assume you pin things correctly.
- Who is it for?
- This is a library to adopt deliberately rather than reach for. If you are training learned-compression models today, the full package gives you the range coder and the entropy models but pins you to TensorFlow 2.14, and the file that says so is the one you should read first.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- tensorflow/compression924 ★ · +1
| Repository | 2026-09-12 | 2026-11-15 |
|---|---|---|
| tensorflow/compression | 923 | 924 |
1 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The freeze is dated and it has a stated cause
Maintenance mode carries a date: February 1, 2024. From that point the full feature set is frozen, no new features will be developed, and the repository takes maintenance fixes. The freeze also draws a hard boundary. New packages will work only with TensorFlow 2.14, and the reason given is concrete rather than procedural: the Keras version shipped with TF 2.15 introduced an incompatibility that would require a rewrite of the layer and entropy model classes. The dependency file agrees with the prose, pinning tensorflow ~= 2.14.0. Two version signals in the repository then point in opposite directions. The newest tag is v2.17.0 from 2024-08-07, following v2.16.0 and v2.15.0 in early 2024, while the most recent commit is dated 2026-04-17. Neither number says which TensorFlow the tip of master builds against. Support is also routed by kind rather than by queue: questions and comments belong on Discussions, while Issues is reserved for actual bugs and feature requests.
Two distributions with two different support windows
The route for people who need a newer TensorFlow is a second package on pypi.org. tensorflow-compression-ops contains only the C++ custom ops, which is enough to run existing trained models on TF 2.15 and later without depending on the layer classes that broke. That splits the two distributions into separate contracts. The main package carries the full library and stops at TensorFlow 2.14. The ops package carries only the ops and was promised to be updated for as long as possible, so people with trained checkpoints had a forward path. That promise has since been narrowed in the same file: due to technical challenges in maintaining C++ custom ops against newer TensorFlow releases, TF 2.18 will be the last version tensorflow-compression-ops supports. Beyond that ceiling neither package has a stated successor, and neither has a stated replacement. Anything still on TensorFlow 1 is sent further back, to the previous releases rather than to a branch here.
Precompiled wheels stop at Linux and Darwin
The installation note says precompiled packages are currently only provided for Linux and Darwin/Mac OS. Windows is routed around the gap rather than served: readers are sent to the TensorFlow pip instructions for WSL2, or to a TensorFlow Docker image, and told to install the Linux package inside it. The Docker recipe shows the shape it expects, pairing the install with the test suite in one shell:
docker run tensorflow/tensorflow:latest bash -c \
"python -m pip install tensorflow-compression &&
python -m tensorflow_compression.all_tests"The image tag is latest, which floats as upstream TensorFlow moves, while the package installed inside is tied to one TensorFlow minor version. Those two halves drift apart over time, and because the recipe runs the test module straight after the install, a mismatch shows up as an environment change rather than as a clean error. The Windows note has the same shape of problem, one layer down.
The Colab cell computes the pin with perl
The notebook recipe scrapes the installed TensorFlow version and rewrites it before installing:
%pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\d+\.\d+).*/\1.0/sg')The regex keeps major and minor and drops the patch, then the constraint asks pip for a compatible release on that line. That matches the stated rule elsewhere in the file, that binary packages of TFC are tied to TensorFlow with the same minor version, with TFC 2.9.1 requiring TF 2.9.x. Two costs come with that expression: the cell needs perl available in the runtime, and it depends on pip show returning a Version field in the shape the pattern expects. The same section explains why the cell exists at all, since Colab sometimes lags a few days behind the newest TensorFlow, and an unpinned pip install tensorflow-compression in that window can attempt to upgrade TensorFlow itself.
The install check bakes a skip count into prose
Verification is one module invocation:
python -m tensorflow_compression.all_testsThe expected outcome is written into the text as a message reading OK (skipped=29) or similar in the last line. That count of skipped tests is a property of the run it was observed on, quoted as prose rather than produced by the command, so on any platform whose skip set differs the literal 29 is the first thing that will not line up. The word similar is what absorbs the difference, and it absorbs a great deal: it would also cover a run where the skips were not the reason anything differed. Everything around this check defers to the TensorFlow installation instructions for building a Python environment able to accept precompiled binary packages, which is the only real prerequisite the section names.
requirements.txt is three lines and names neither Python nor the ops
The dependency file holds scipy ~= 1.11.0, tensorflow ~= 2.14.0, and tensorflow-probability >= 0.15, < 0.23. Three absences are worth noting. The ops package has no entry, consistent with it being installed on its own but leaving nothing in the repository to resolve it. Python itself has no version constraint anywhere in that file or in the installation prose, which spends its length on building an environment that can take binary wheels instead. And tensorflow-probability, a hard requirement of the library, never appears in the install narrative at all. The wider shape matters too: every documented path, pip, Colab, Docker and conda, installs a wheel, while the source tree is a Bazel workspace with BUILD, WORKSPACE, workspace.bzl, .bazelrc, .bazelversion, plus tools/, models/ and results/ directories that no install path refers to. The plain pip path is a single unconstrained line:
python -m pip install tensorflow-compressionNo version, no TensorFlow bound, nothing. The tree also carries .pylintrc, .style.yapf, CONTRIBUTING.md and MANIFEST.in, so the source is wired for linting, formatting and packaging even though every documented route avoids building it.
Anaconda ships a TensorFlow the wheels do not match
One installation method gets its own paragraph because it changes the interpreter underneath you. Anaconda ships its own binary build of TensorFlow, described as incompatible with the pip package, and the instruction is to install TensorFlow through pip rather than conda inside an environment that conda created. The recipe that follows begins by creating a named environment with python, and that is the whole command: the line ends there and the document ends with it, so the pip steps it was introducing are not present in this version of the README. That makes the Anaconda recipe the last installation method the file reaches. For a project whose support story is one TensorFlow version and a fixed set of platform wheels, the environment question is most of the installation problem, and it is the part with the fewest documented checks. Nothing there explains how to confirm which TensorFlow build an environment already holds, which is the one number the entire support window turns on.
What the frozen ops layer still gives you
The freeze stopped new work, not the existing surface, and the surviving pieces are specific. Range coding, arithmetic coding in the form of flexible TensorFlow ops written in C++, carries an optional overflow function that embeds an Elias gamma code into the range encoded bit sequence. That is what allows the alphabet to be the entire set of signed integers rather than a finite range. The entropy model classes act as likelihood models during training and, once training is finished, encode floating point tensors into bit sequences by automating the design of the range coding tables and calling that coder behind the scenes. Around them sit helper layers and functions: numerically finding quantiles of density functions, taking expectations with respect to dithering noise, convolution layers with more flexible padding, reparameterizing kernels and biases in the Fourier domain, and an implementation of generalized divisive normalization. Background reading is pointed at through an arXiv paper on nonlinear transform coding and a review of lossy data compression from a machine learning perspective, with a third-party talk on learned image compression alongside them. Two tutorials serve as entry points instead, one on lossy data compression and one on model compression, and both live on the TensorFlow site rather than in this repository.
Editorial conclusion
This is a library to adopt deliberately rather than reach for. If you are training learned-compression models today, the full package gives you the range coder and the entropy models but pins you to TensorFlow 2.14, and the file that says so is the one you should read first. If you only need to run models somebody else trained, tensorflow-compression-ops is the smaller surface and it still has a stated end of the road at TensorFlow 2.18. Before installing anything, check three things: that your environment can take a precompiled wheel at all, since Windows is routed through WSL2 or a container; that your install cannot quietly move your TensorFlow version, because the Colab recipe exists precisely to prevent that; and that the skip count you see in the test output does not need to match the 29 printed in the documentation. For anything new, the arithmetic coding and the entropy model classes are frozen, so design around them rather than around the project.
Frequently asked questions
Why did TensorFlow Compression stop adding features?
It has been in maintenance mode since February 1, 2024, with the full feature set frozen and only maintenance fixes going in. New packages work only with TensorFlow 2.14 because the Keras version shipped with TF 2.15 introduced an incompatibility that would require a rewrite of the layer and entropy model classes.
Which TensorFlow versions does tensorflow-compression support?
The full package pins tensorflow ~= 2.14.0 in requirements.txt. The separate tensorflow-compression-ops package carries only the C++ ops so that existing models can run on TF 2.15 and later, with TF 2.18 named as the last version it will support.
Can I install TensorFlow Compression on Windows?
Precompiled packages are currently only provided for Linux and Darwin/Mac OS. The note points Windows users at the TensorFlow pip instructions for WSL2, or at a TensorFlow Docker image, and then installing the Linux package inside it.
Why does the Colab install for tensorflow-compression use perl?
The cell reads the installed TensorFlow version with pip show, rewrites it to major.minor.0 with a perl one-liner, and passes it as a compatible-release constraint. That is because the binary packages are tied to TensorFlow with the same minor version, so TFC 2.9.1 needs TF 2.9.x.
What does the verification command for tensorflow-compression print?
Running python -m tensorflow_compression.all_tests is the check, and the documented outcome is a last line reading OK (skipped=29) or similar. The skip count is quoted from an earlier run rather than produced by the command.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tensorflow-compression)Star history chart for your README
[](https://hysenlabs.com/projects/tensorflow-compression)Was this useful?