SuperCompress is distributed directly from its GitHub repository. A singleDocumentation 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.
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
| Requirement | Minimum version |
|---|---|
| Python | 3.10+ |
| torch | 2.0.0+ |
| numpy | 1.24.0+ |
checkpoints/default.pt.
Optional extras
The following extras are declared inpyproject.toml and can be installed individually or together:
| Extra | Packages | Use case |
|---|---|---|
dev | pytest, ruff, httpx | Development & testing |
serve | fastapi, uvicorn, pydantic, httpx | Local HTTP server |
firebase | firebase-admin | Production key store |
CLI entry points
Installing SuperCompress registers two command-line scripts frompyproject.toml:
| Command | Entry point | Purpose |
|---|---|---|
supercompress | supercompress.cli:main | Run compression from the command line |
supercompress-train | supercompress.cli:train_main | Train or fine-tune the eviction policy |
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.