pip install pulls in the core library, its two runtime dependencies, and the pretrained checkpoint — no separate model download step is needed. Optional extras are available for development, running the local HTTP server, and production Firebase key storage.
Installation options
Choose the install command that matches your use case:dev,serve variant is for contributors or anyone who wants to run the local HTTP API server alongside the test suite. The firebase variant adds the firebase-admin SDK for production-grade API key storage.
Requirements
SuperCompress runs its eviction policy entirely on CPU before inference, so a GPU is not required. PyTorch is used to load and run the small (~5K-parameter) trained policy checkpoint bundled in
checkpoints/default.pt.
Optional extras
The following extras are declared inpyproject.toml and can be installed individually or together:
Install multiple extras at once by comma-separating them:
CLI entry points
Installing SuperCompress registers two command-line scripts frompyproject.toml:
Both commands become available on your
PATH immediately after installation with no additional setup.
Verify your installation
After installing, confirm everything is working with a one-line import check:SuperCompress ready printed without errors. If PyTorch or NumPy are missing you will see an ImportError — re-run the install command above to resolve it.
The trained checkpoint is included in the repository at
checkpoints/default.pt and is loaded automatically by compress_context(). No separate download or environment variable is required. If the checkpoint file is missing (for example in a stripped clone), the library falls back gracefully to the H2OPolicy baseline and logs a warning.