Activation, KV-cache, and communication compression pipelines — optional grilly extension
Project description
GrillyCompression
Activation, KV-cache, and communication compression pipelines — optional grilly extension.
Features
- Block DCT Codec — 4x4 DCT + scalar quantization with configurable error bounds
- Activation Compression — 30-60% VRAM savings on intermediate tensors
- KV-Cache Compression — 3-5x compression on cached K/V pages
- Communication Compression — 19-37% gradient volume reduction for multi-GPU
- Adaptive Quality — tight bounds for embeddings, looser for FFN activations
- Error Feedback — residual compression for gradient communication
Quick Start
pip install grillycompression
from grillycompression import BlockDCTCodec, ActivationCompressor, KVCacheCompressor
# Compress activations
compressor = ActivationCompressor(quality=32, adaptive=True)
compressed = compressor.compress(activation_tensor, layer_type="activation")
restored = compressor.decompress(compressed)
# Compress KV-cache pages
kv_comp = KVCacheCompressor(quality=48)
compressed_page = kv_comp.compress_page(k_data, v_data)
k_restored, v_restored = kv_comp.decompress_page(compressed_page)
Requirements
- Python 3.12+
- grilly >= 0.4.0
- numpy
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grillycompression-0.1.0.tar.gz.
File metadata
- Download URL: grillycompression-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9d86a6207bb00c3f89d651a02fba888ebf6bb8c8275c2fbe610f75c2efeaf8a
|
|
| MD5 |
ca9f4240024db2fb3d9c18a6e4279037
|
|
| BLAKE2b-256 |
e6de3e409107f7ee87806a010fca0f4905db56d393c13723ea05b74053b9444d
|
Provenance
The following attestation bundles were made for grillycompression-0.1.0.tar.gz:
Publisher:
publish.yml on Grillcheese-AI/GrillyCompression
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grillycompression-0.1.0.tar.gz -
Subject digest:
b9d86a6207bb00c3f89d651a02fba888ebf6bb8c8275c2fbe610f75c2efeaf8a - Sigstore transparency entry: 976483536
- Sigstore integration time:
-
Permalink:
Grillcheese-AI/GrillyCompression@071c5b38eae8e27b9a12b859eb75f8bff0587c11 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Grillcheese-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@071c5b38eae8e27b9a12b859eb75f8bff0587c11 -
Trigger Event:
release
-
Statement type:
File details
Details for the file grillycompression-0.1.0-py3-none-any.whl.
File metadata
- Download URL: grillycompression-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4468d89bc00f73972e62b054f7b5c3dc9ed18d653106fdcb6ad2327a2f7c47ef
|
|
| MD5 |
383fa631226b23435fcb0e322158a6bc
|
|
| BLAKE2b-256 |
3126b219e905f5acb2693377ce76ee480f0099c8b44c237819fcf7f30fe04039
|
Provenance
The following attestation bundles were made for grillycompression-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Grillcheese-AI/GrillyCompression
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grillycompression-0.1.0-py3-none-any.whl -
Subject digest:
4468d89bc00f73972e62b054f7b5c3dc9ed18d653106fdcb6ad2327a2f7c47ef - Sigstore transparency entry: 976483538
- Sigstore integration time:
-
Permalink:
Grillcheese-AI/GrillyCompression@071c5b38eae8e27b9a12b859eb75f8bff0587c11 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Grillcheese-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@071c5b38eae8e27b9a12b859eb75f8bff0587c11 -
Trigger Event:
release
-
Statement type: