ML Optimization
Pakit ships five machine learning models that can advise the storage and network layers on compression, deduplication, prefetching, peer selection and gossip parameters. They are off by default and advisory-only when enabled — no trained checkpoint is bundled, and the core storage engine never depends on them.
Optimization Models
CompressionPredictor
Three-layer MLP (128→64→32→4) in PyTorch that picks a compression algorithm per block. No trained checkpoint ships with the repo, so it is advisory-only until you train one with ml/training.
DeduplicationOptimizer
SimHash 64-bit fingerprints combined with Locality-Sensitive Hashing across 16 tables, with a 0.85 similarity threshold for near-duplicate detection. This one is deterministic and needs no training.
PrefetchEngine
Two-layer LSTM with 64 hidden units that predicts the most likely next blocks and warms the cache ahead of demand.
PeerSelector
Thompson Sampling with a contextual bandit that scores peers by observed latency and reliability for routing decisions.
NetworkOptimizer
Q-Learning agent that adapts gossip fanout and TTL to observed network conditions.
Multi-Algorithm Compression
ZSTD, LZ4, Brotli, LZMA, BZ2 and ZLIB, with an AUTO mode that delegates to the CompressionPredictor. Quantum compression is not available: Pakit’s CompressionEngine raises for it.