sayon ramanan

projects

small systems built to understand how fast inference actually works, one layer at a time.

On-device speculative decoding

source ↗
Raspberry Pi 5

Two LLMs on a single Raspberry Pi 5, a draft and a target on separate CPU cores, with hand-tuned INT8 matmul kernels written in ARM NEON intrinsics and benchmarked against llama.cpp. Grouped quantization cuts the weights’ memory footprint by 75%.

c++ · arm neon · quantization

Flash Attention, from scratch

source ↗
Kernel

A tiled forward pass that streams KV blocks through an online softmax, so the N×N score matrix is never materialized while still matching standard attention exactly. A custom autograd backward pass recomputes scores in tiles, keeping training memory linear in sequence length.

python · pytorch · numpy