RSR
Redundant Segment Reduction, a fast binary/ternary matrix multiplication algorithm (ICML 2025) with up to 24× speedup over NumPy.
RSR (Redundant Segment Reduction) is a matrix multiplication algorithm for the matrices used in binary and ternary neural networks, such as 1.58-bit LLMs. Once a model is trained, its weights are fixed and take only a few distinct values. RSR uses this to preprocess the weight matrix once: it groups columns into segments and removes repeated work, which cuts the cost of every later matrix-vector product by a factor of log(n).
Highlights
- Up to 24× faster than an optimised NumPy baseline.
- Up to 2.5× faster inference on quantised LLMs.
- Published at ICML 2025 (arXiv:2411.06360).
- Open-source Python and native C++ implementations. A kernel-level version is available in RSR-core.
Joint work with Mohsen Dehghankar and Dr. Abolfazl Asudeh.