fireworks-delta-compression
Delta compression utilities used by the Fireworks AI serving stack to ship incremental model weight updates (hot-loads) over the wire.
This package exposes the same compression / decompression backends that the Fireworks serving servers use internally, so you can produce or consume deltas on the customer side without copy-pasting source from the monorepo and without risk of dependency version drift.
Install
pip install fireworks-delta-compression
Quick start
import torch
from fireworks_delta_compression import (
delta_compress,
delta_decompress,
)
src = torch.randn(1024, 1024, dtype=torch.bfloat16)
dst = src + 1e-3 * torch.randn_like(src)
compressed_diff, checksum = delta_compress(
src=src,
dst=dst,
compression_format="arc_v3",
)
restored = delta_decompress(
src=src,
compressed_diff=compressed_diff,
checksum=checksum,
compression_format="arc_v3",
)
torch.testing.assert_close(restored, dst)
Supported compression formats
| Format | Backend |
|---|---|
arc_v1 |
XOR diff + zlib |
arc_v2 |
XOR diff + zstd |
arc_v3 |
ARC v3 (typed, multi-strategy) |
Higher-level helpers
delta_compress_dicts_to_file/delta_decompress_dict_from_file— work ondict[str, torch.Tensor]and persist to safetensors with checksums in the metadata block.delta_compress_files_to_file— read two safetensors files and write the delta out as a third safetensors file.delta_compress_dirs/decompress_delta_into_source— walk a directory of safetensors shards in parallel.delta_decompress_inplace— mmap-based in-place decompression that rewrites the base safetensors file with the diff applied (no extra RAM copy).
Versioning
Dependencies (torch, safetensors, numpy, zstd) use loose compatible-
release pins so this wheel installs cleanly alongside customer code. The
upper bounds (<3, <1, <3, <2) protect against silent breakage from
major-version upgrades; bump them after validating against a new server
release.
License
MIT — see LICENSE.
Metadata
Release files for fireworks-delta-compression 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fireworks_delta_compression-0.1.0.tar.gz | 19.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fireworks_delta_compression-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.8 kB
Release files / fireworks_delta_compression-0.1.0.tar.gz
| Download URL | fireworks_delta_compression-0.1.0.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdc649b28e4dddd0913761f2f2ca98a3423a5fe9f818135cf4950bba2e888097
|
|
BLAKE2b-256 checksum How to use checksums |
8969bfc8f89a267e8c773f3a33633100f7cfa379e54b6d5ed4d2080668a42bb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / fireworks_delta_compression-0.1.0-py3-none-any.whl
| Download URL | fireworks_delta_compression-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24a568d31ff2b460ce2724b825a2478dbeba36b511fdfc6543f28f4a39ece4b0
|
|
BLAKE2b-256 checksum How to use checksums |
f3b791c6c8af4308b55a101d12df6be9203a5834a67b73d0b33f5a8d0354c308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|