Hi, I'm Saman.
I'm an ML engineer at Meta working on LLM efficiency: quantization, inference optimization, and the GPU kernels underneath. Before that I spent a decade on backend and infrastructure work, from SRE and multi-cloud architecture to co-founding a trading company's software stack.
This site collects my writing. The blog covers how modern LLMs actually work under the hood (attention, MoE, RoPE, sampling, batching) and a hands-on series on writing Triton and CUDA kernels, with benchmarks. I also build MintEngine, an educational inference engine for checking model implementations layer by layer against production engines.
Recent posts
RoPE: The Phase Geometry Behind Long-Context TransformersHow rotating query and key vectors turns absolute position into relative attentionJun 6, 2026 · #llm
From Greedy to Nucleus, How LLMs Choose the Next TokenDecoding algorithms and sampling techniques explainedDec 22, 2025 · #llm
MatmulA tiled CUDA matmul kernel with shared-memory caching, benchmarked against Torch.Dec 1, 2025 · #kernels
2D WorkloadsMapping images onto CUDA thread blocks: row-major memory, 2D indexing, and a grayscale conversion kernel.Nov 22, 2025 · #kernels
Fused Softmax::P3::Cuda KernelA CUDA softmax kernel taken from a naive per-row loop to shared memory, float4 loads, and warp-shuffle reductions.Nov 16, 2025 · #kernels
Fused Softmax::P2::Triton optimizationDebugging a Triton softmax that falls off a cliff at large row sizes, and what block size has to do with it.Nov 9, 2025 · #kernels