Lossless Tensor Compression as Program Synthesis

Hugging Face Daily Papers Papers

Summary

This paper introduces Brevis, a lossless tensor compression method that formulates compression as program synthesis using a typed DSL. It achieves 33.93% storage reduction on public checkpoints and outperforms general-purpose and tensor-specific compressors.

Model checkpoints are growing in both number and size, which makes archival, transfer, and deployment increasingly costly. General-purpose compressors can reduce storage requirements but ignore tensor structure, whereas existing tensor-specific compressors rely on fixed and format-specific pipelines. We present Brevis, which formulates lossless tensor compression as program synthesis. We design a typed domain-specific language (DSL) that captures recurring tensor structures, such as repeated regions and floating-point fields, through a set of reversible operators. Given a tensor, Brevis synthesizes a self-contained DSL program that reconstructs it bit-exactly. A checkpoint-specific production prior, learned from a small representative sample of tensors, guides a bounded A* search to synthesize compact programs, which can later be executed directly for bit-exact decompression. On 10 public checkpoints spanning language, audio, and image generation models, Brevis reduces 2.13 TB of checkpoint data to 1.41 TB, a 33.93% storage reduction. It produces archives up to 30.87% smaller than those of four general-purpose compressors, including zstd and gzip, and smaller archives than the tensor-specific compressors ZipNN and DFloat11. Under a practical concurrency configuration, Brevis achieves 3.60 GB/s compression and 6.61 GB/s decompression while preserving every source byte.
Original Article
View Cached Full Text

Cached at: 08/06/26, 05:52 PM

Paper page - Lossless Tensor Compression as Program Synthesis

Source: https://huggingface.co/papers/2608.02162 Authors:

,

,

,

,

,

,

,

,

,

,

,

,

Abstract

Modelcheckpointsaregrowinginbothnumberandsize,whichmakesarchival,transfer,anddeploymentincreasinglycostly.General-purposecompressorscanreducestoragerequirementsbutignoretensorstructure,whereasexistingtensor-specificcompressorsrelyonfixedandformat-specificpipelines.WepresentBrevis,whichformulateslosslesstensorcompressionasprogramsynthesis.Wedesignatypeddomain-specificlanguage(DSL)thatcapturesrecurringtensorstructures,suchasrepeatedregionsandfloating-pointfields,throughasetofreversibleoperators.Givenatensor,Brevissynthesizesaself-containedDSLprogramthatreconstructsitbit-exactly.Acheckpoint-specificproductionprior,learnedfromasmallrepresentativesampleoftensors,guidesaboundedA*searchtosynthesizecompactprograms,whichcanlaterbeexecuteddirectlyforbit-exactdecompression.On10publiccheckpointsspanninglanguage,audio,andimagegenerationmodels,Brevisreduces2.13TBofcheckpointdatato1.41TB,a33.93%storagereduction.Itproducesarchivesupto30.87%smallerthanthoseoffourgeneral-purposecompressors,includingzstdandgzip,andsmallerarchivesthanthetensor-specificcompressorsZipNNandDFloat11.Underapracticalconcurrencyconfiguration,Brevisachieves3.60GB/scompressionand6.61GB/sdecompressionwhilepreservingeverysourcebyte.

View arXiv pageView PDFGitHub1Add to collection

Get this paper in your agent:

hf papers read 2608\.02162

Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash

Models citing this paper0

No model linking this paper

Cite arxiv.org/abs/2608.02162 in a model README.md to link it from this page.

Datasets citing this paper0

No dataset linking this paper

Cite arxiv.org/abs/2608.02162 in a dataset README.md to link it from this page.

Spaces citing this paper0

No Space linking this paper

Cite arxiv.org/abs/2608.02162 in a Space README.md to link it from this page.

Collections including this paper0

No Collection including this paper

Add this paper to acollectionto link it from this page.

Similar Articles

The risk of KV cache compression

arXiv cs.LG

This paper theoretically characterizes the minimax risk of KV cache compression in transformers, providing design principles for accurate compression under causal masking, and instantiates them in a practical algorithm with promising results on LongBench.

KV Cache Compression 900000x Beyond TurboQuant and Per-Vector Shannon Limit

Hacker News Top

A new paper proposes sequential KV cache compression using probabilistic language tries and predictive delta coding, achieving theoretical compression ratios of ~914,000× beyond TurboQuant by exploiting the sequential structure of language model tokens rather than treating vectors independently.