StateSMix: Online Lossless Compression via Mamba State Space Models and Sparse N-gram Context Mixing
arXiv cs.LG / 5/6/2026
📰 NewsDeveloper Stack & InfrastructureTools & Practical UsageModels & Research
Key Points
- StateSMix is a new fully self-contained lossless compression approach that trains a Mamba-style state space model online (token-by-token) on the file being compressed, without pre-trained weights, GPUs, or external dependencies.
- The compressor combines continuously updated probability estimates from the SSM over BPE tokens with sparse n-gram context mixing (bigram through 32-gram) implemented as nine large hash tables and integrated via a softmax-invariant logit-bias mechanism.
- An entropy-adaptive scaling mechanism modulates how much the n-gram component contributes based on the SSM’s predictive confidence, aiming to avoid over-correcting when the neural predictor is already reliable.
- On the enwik8 benchmark, StateSMix reports 2.123 bpb (1 MB), 2.149 bpb (3 MB), and 2.162 bpb (10 MB), outperforming xz (LZMA2) by 8.7%, 5.4%, and 0.7% respectively, with ablations showing the SSM is the primary driver and n-grams add a smaller complementary gain.
- The system is implemented in pure C using AVX2 SIMD, achieves about 2,000 tokens/second on commodity x86-64 hardware, and gains about 1.9x speedup from OpenMP parallelization on 4 cores.
Related Articles

Black Hat USA
AI Business

Top 10 Free AI Tools for Students in 2026: The Ultimate Study Guide
Dev.to

PaioClaw Review: What You Actually Get for $15/mo vs DIY OpenClaw
Dev.to

PaioClaw Review: What You Actually Get for $15/mo vs DIY OpenClaw
Dev.to

SIFS (SIFS Is Fast Search) - local code search for coding agents
Dev.to