Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/arjunkshah/supercompress/llms.txt

Use this file to discover all available pages before exploring further.

SuperCompress is distributed directly from its GitHub repository. A single 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:
pip install git+https://github.com/arjunkshah/supercompress.git
The first command is the standard install for production use. The 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

RequirementMinimum version
Python3.10+
torch2.0.0+
numpy1.24.0+
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 in pyproject.toml and can be installed individually or together:
ExtraPackagesUse case
devpytest, ruff, httpxDevelopment & testing
servefastapi, uvicorn, pydantic, httpxLocal HTTP server
firebasefirebase-adminProduction key store
Install multiple extras at once by comma-separating them:
pip install -e ".[dev,serve,firebase]"

CLI entry points

Installing SuperCompress registers two command-line scripts from pyproject.toml:
CommandEntry pointPurpose
supercompresssupercompress.cli:mainRun compression from the command line
supercompress-trainsupercompress.cli:train_mainTrain or fine-tune the eviction policy
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:
python -c "from supercompress import compress_context; print('SuperCompress ready')"
You should see 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.

Build docs developers (and LLMs) love