Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grillycompression-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grillycompression-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for grillycompression-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b9d86a6207bb00c3f89d651a02fba888ebf6bb8c8275c2fbe610f75c2efeaf8a
MD5 ca9f4240024db2fb3d9c18a6e4279037
BLAKE2b-256 e6de3e409107f7ee87806a010fca0f4905db56d393c13723ea05b74053b9444d

See more details on using hashes here.

Provenance

The following attestation bundles were made for grillycompression-0.1.0.tar.gz:

Publisher: publish.yml on Grillcheese-AI/GrillyCompression

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grillycompression-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for grillycompression-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4468d89bc00f73972e62b054f7b5c3dc9ed18d653106fdcb6ad2327a2f7c47ef
MD5 383fa631226b23435fcb0e322158a6bc
BLAKE2b-256 3126b219e905f5acb2693377ce76ee480f0099c8b44c237819fcf7f30fe04039

See more details on using hashes here.

Provenance

The following attestation bundles were made for grillycompression-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Grillcheese-AI/GrillyCompression

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page