arXiv:2612.02874v1 Announce Type: new
Abstract: MLPs impose substantial inference cost in Transformers by applying a full, high-capacity transformation to every token. Deployed workloads revisit recurring regions of the MLP input space, which creates an opportunity for compute reuse beyond exact-match caching. We introduce MLP Cache, a post-hoc cache that stores compact local predictors of a frozen MLP without retraining the backbone. The central challenge is to allocate limited memory across region scale and predictor capacity: broader regions cover more inputs but may require larger predictors, while finer regions are easier to approximate but require more entries. MLP Cache constructs a coarse-to-fine hierarchy using shared graph-spectral coordinates, whose signs define candidate regions and whose continuous values provide features for region-specific predictors. Tree dynamic programming selects region-predictor pairs to maximize workload coverage under memory and approximation-error budgets. On frozen Qwen3.5-9B, MLP Cache replaces 24-28% of MLP calls in the cached layers on MME-Coarse and MMStar-Coarse. A cached layer saves time when its hit rate times the time one hit saves exceeds its fixed cost of routing and lookup, so the gain is largest in batch-one decoding, where a hit skips the layer’s weight reads. At batch one on an Apple M5 Pro, a cache that holds 1.2 GiB in memory makes decoding 1.20x faster with a 0.56-point change in MME-Coarse accuracy, and one that holds about 8 GiB makes it 1.38x faster at a cost of about 3 points; with this larger cache, decoding stays faster up to batch 8. On an A100, batch-one decoding is 1.09-1.15x faster against a baseline that runs each decode step as one CUDA graph. A controlled single-MLP benchmark shows that the gain grows with the size of the MLP. Project page: https://huzeyann.github.io/mlp-cache.html
Trending
- What Predicts Forgetting in LoRA Fine-Tuning Across Optimizers
- Republican senator disrupts Ted Cruz attempt to stack FCC with Republicans
- How to Understand the NSA’s and Big Tech’s AI Encryption Warnings
- [2505.15548] Dense Local Dependencies Induce Attention-Logit Explosion and Training Instability During Long-Sequence Transformer Training
- Bayesian experimental design on search graphs
- Meta Won’t Rule Out A Phone-Like Device For Muse AI
- Permuted Evolutionary Tuning Improves Protein Language Modeling for Variant Effect Prediction
- Microsoft sued by families sick of data center’s 24/7 noise, high-pitched squealing
