Zakaria Laabsi

Notes on AI & mathematics

Compressing RAG Embeddings with TurboQuant

TurboQuant compresses embeddings aggressively without corpus-specific training. This post covers the algorithm, the turboquant-embed implementation, and the retrieval benchmarks that hold up on BeIR.

April 3, 2026 · 13 min · Zakaria Laabsi

From QJL to TurboQuant: Data-Oblivious Vector Quantization

TurboQuant achieves near-optimal vector quantization without seeing the data. This post traces the full theory, from random projections and 1-bit quantized JL transforms through polar decompositions to the final distortion bounds, with complete proofs.

April 2, 2026 · 24 min · Zakaria Laabsi

Impartial Combinatorial Game Theory: From Nim to Sprague-Grundy

Every impartial combinatorial game reduces to a single XOR computation. This post walks through the full theory (from Nim to the Sprague-Grundy theorem) with proofs, examples, and code.

March 30, 2026 · 25 min · Zakaria Laabsi