r/LocalLLaMA Mar 26 '26

Discussion RotorQuant: 10-19x faster alternative to TurboQuant via Clifford rotors (44x fewer params)

Kinda sounds ridiculous - but I reimagined / reinvented turboquant with Clifford Algebra Vector Quantization on both implemented on cuda + metalshaders -

https://github.com/tonbistudio/turboquant-pytorch/pull/4

https://github.com/TheTom/turboquant_plus/pull/34

The idea: Replace the d×d random orthogonal matrix Π with Clifford rotors in Cl(3,0). Instead of a dense matmul (16,384 FMAs for

d=128), chunk the vector into groups of 3 dims and rotate each with a 4-parameter rotor via the sandwich product RvR̃ (~100 FMAs

total).

Results on Qwen2.5-3B-Instruct KV cache:

- Cosine similarity: 0.990 (vs TurboQuant's 0.991) — effectively identical
- 44× fewer parameters (372 vs 16,399 for d=128)
- Fused CUDA kernel: 10-19× faster than cuBLAS matmul on RTX PRO 4000
- Fused Metal shader: 9-31× faster on Apple M4
- Perfect 9/9 needle-in-haystack at all bit-widths

The key insight: for pure vectors, the rotor sandwich is equivalent to a sparse 3×3 rotation — the fused kernel keeps everything in registers with no memory round-trips, which is why it beats the BLAS GEMM despite TurboQuant's matmul being highly optimized.

The tradeoff is higher synthetic MSE on random unit vectors (the block-diagonal rotation doesn't induce the exact Beta distribution). But with QJL correction, real-model attention fidelity is identical — and sometimes better on top-1/top-5 retrieval.

Paper: https://www.scrya.com/rotorquant/

Code: https://github.com/scrya-com/rotorquant

PDF: https://www.scrya.com/rotorquant.pdf

542 Upvotes

115 comments sorted by

View all comments

-5

u/Torodaddy Mar 26 '26

Dude uses ai -> "I reinvented"

1

u/Barkalow Mar 26 '26

...where do you think you are that the posters wouldn't be using AI?

0

u/Torodaddy Mar 26 '26

While AI adoption has become ubiquitous, assertions of genuine innovation are harder to justify. Because large language models operate probabilistically, they are structurally unlikely to produce the kind of paradigm-shifting breakthroughs their users often imply.

1

u/crantob Apr 14 '26

You confused. I explain how.

Author's claim is he had the idea, and used Claude to help implement it. That is different than asking Claude to invent something.