arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.19626cs.ITcs.CLmath.IT
收藏

Nacrith:通过集成上下文建模和高精度CDF编码的神经无损压缩

Nacrith: Neural Lossless Compression via Ensemble Context Modeling and High-Precision CDF Coding

Independent Researcher(独立研究者)

Roberto Tacconelli

AI总结:

Nacrith通过集成上下文建模和高精度CDF编码,实现高效的神经无损压缩,优于现有方法并适用于任意二进制文件。

摘要:

我们介绍了Nacrith,一种结合1.35亿参数的Transformer语言模型(SmolLM2-135M)与一组轻量级在线预测器和32位算术编码器的无损压缩系统,实现了在自然语言文本上评估的系统中最佳的压缩结果。除了基础的LLM加算术编码范式之外,Nacrith还引入了几个贡献:(1)将CDF精度从2^16提升到2^24,消除了约75%由大词汇量中的最小概率地板引起的量化开销;(2)一个基于令牌的N-gram模型用于快速的本地预测;(3)通过在线梯度下降自适应地调整对数空间偏置头以纠正每文档LLM的错误;(4)基于置信度的LLM跳过以加速高度可预测的令牌;(5)一种混合二进制格式(NC06),将神经压缩扩展到任意二进制文件——据我们所知,这是首个基于LLM的压缩器;(6)一个llama cpp推理后端,实现单令牌解码速度比PyTorch快约7倍;(7)跨多达8个工作节点的并行多GPU压缩;(8)原生的KV缓存滑动窗口,将每片成本降低约37倍。该系统仅需要约500MB的GGUF权重和每个工作节点约1.2GB的VRAM,可在消费级GPU上运行。在alice29(Canterbury Corpus,152KB)上,Nacrith实现0.918 bit per byte(bpb)——优于gzip 3.1倍,优于bzip2 2.5倍,优于CMIX v21 44%,优于ts_zip 20%,同时压缩在0阶、1阶和2阶字节级香农熵界之下。在enwik8(100MB)上,Nacrith实现0.9389 bpb(11.74%),尽管使用了60倍更小的模型且未进行微调,仍优于ts_zip(约1.11 bpb)15%和FineZip(1.024 bpb)8%。对训练截止后发布的文档的分布外(OOD)评估确认这些增益不是记忆艺术,实现了0.723 bpb的未见过文本压缩。

英文摘要:

We present Nacrith, a lossless compression system that combines a 135M-parameter transformer language model (SmolLM2-135M) with an ensemble of lightweight online predictors and a 32-bit arithmetic coder, achieving the best compression results among the systems evaluated in this study on natural language text. Beyond the base LLM-plus-arithmetic-coding paradigm, Nacrith introduces several contributions: (1) a CDF precision upgrade from 2^16 to 2^24 that eliminates ~75% of quantization overhead caused by minimum-probability floors in large vocabularies; (2) a token-level N-gram model for fast local predictions; (3) an adaptive log-space bias head correcting per-document LLM errors via online gradient descent; (4) confidence-based LLM skip for accelerating highly predictable tokens; (5) a hybrid binary format (NC06) extending neural compression to arbitrary binary files--to our knowledge a first among LLM-based compressors; (6) a llama cpp inference backend achieving ~7x faster single-token decode than PyTorch; (7) parallel multi-GPU compression across up to 8 workers; and (8) native KV cache sliding window reducing per-slide cost by ~37x. The system requires only ~500 MB of GGUF weights and ~1.2 GB VRAM per worker, running on consumer GPUs. On alice29 (Canterbury Corpus, 152 KB), Nacrith achieves 0.918 bits per byte (bpb)--outperforming gzip by 3.1x, bzip2 by 2.5x, CMIX v21 by 44%, and ts_zip by 20%, while compressing below the 0th-, 1st-, and 2nd-order byte-level Shannon entropy bounds. On enwik8 (100 MB), Nacrith achieves 0.9389 bpb (11.74%), surpassing ts_zip (~1.11 bpb) by 15% and FineZip (1.024 bpb) by 8% despite using a 60x smaller model with no fine-tuning. An out-of-distribution (OOD) evaluation on a document published after the model's training cutoff confirms these gains are not memorization artifacts, achieving 0.723 bpb on unseen text.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑